mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-27 10:14:32 +00:00
Merge pull request #461 from QuasarApp/fix_webEngineWidgets
Fix Deploy web engine widgets
This commit is contained in:
commit
580bbc5e33
@ -24,13 +24,16 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 14) {
|
||||
tests/TestQMLWidgets
|
||||
|
||||
unix:SUBDIRS += tests/quicknanobrowser
|
||||
unix:SUBDIRS += tests/webui
|
||||
|
||||
|
||||
contains(DEFINES, WITHOUT_TESTS) {
|
||||
SUBDIRS -= UnitTests \
|
||||
tests/TestOnlyC \
|
||||
tests/TestQtWidgets \
|
||||
tests/TestQMLWidgets \
|
||||
tests/quicknanobrowser
|
||||
tests/quicknanobrowser \
|
||||
tests/webui
|
||||
}
|
||||
|
||||
CQtDeployer.depends=QuasarAppLib
|
||||
|
@ -26,60 +26,60 @@
|
||||
const DeployConfig* DeployCore::_config = nullptr;
|
||||
|
||||
QtModuleEntry DeployCore::qtModuleEntries[] = {
|
||||
{ QtBluetoothModule, "bluetooth", "Bluetooth", nullptr },
|
||||
{ QtConcurrentModule, "concurrent", "Concurrent", "qtbase" },
|
||||
{ QtCoreModule, "core", "Core", "qtbase" },
|
||||
{ QtDeclarativeModule, "declarative", "Declarative", "qtquick1" },
|
||||
{ QtDesignerModule, "designer", "Designer", nullptr },
|
||||
{ QtDesignerComponents, "designercomponents", "DesignerComponents", nullptr },
|
||||
{ QtBluetoothModule, "bluetooth", "QtXBluetooth", nullptr },
|
||||
{ QtConcurrentModule, "concurrent", "QtXConcurrent", "qtbase" },
|
||||
{ QtCoreModule, "core", "QtXCore", "qtbase" },
|
||||
{ QtDeclarativeModule, "declarative", "QtXDeclarative", "qtquick1" },
|
||||
{ QtDesignerModule, "designer", "QtXDesigner", nullptr },
|
||||
{ QtDesignerComponents, "designercomponents", "QtXDesignerComponents", nullptr },
|
||||
{ QtEnginioModule, "enginio", "Enginio", nullptr },
|
||||
{ QtGamePadModule, "gamepad", "Gamepad", nullptr },
|
||||
{ QtGuiModule, "gui", "Gui", "qtbase" },
|
||||
{ QtHelpModule, "qthelp", "Help", "qt_help" },
|
||||
{ QtMultimediaModule, "multimedia", "Multimedia", "qtmultimedia" },
|
||||
{ QtMultimediaWidgetsModule, "multimediawidgets", "MultimediaWidgets", "qtmultimedia" },
|
||||
{ QtMultimediaQuickModule, "multimediaquick", "MultimediaQuick_p", "qtmultimedia" },
|
||||
{ QtNetworkModule, "network", "Network", "qtbase" },
|
||||
{ QtNfcModule, "nfc", "Nfc", nullptr },
|
||||
{ QtOpenGLModule, "opengl", "OpenGL", nullptr },
|
||||
{ QtOpenGLWidgetsModule, "openglwidgets", "OpenGLWidgets", nullptr },
|
||||
{ QtPositioningModule, "positioning", "Positioning", nullptr },
|
||||
{ QtPrintSupportModule, "printsupport", "PrintSupport", nullptr },
|
||||
{ QtQmlModule, "qml", "Qml", "qtdeclarative" },
|
||||
{ QtGamePadModule, "gamepad", "QtXGamepad", nullptr },
|
||||
{ QtGuiModule, "gui", "QtXGui", "qtbase" },
|
||||
{ QtHelpModule, "qthelp", "QtXHelp", "qt_help" },
|
||||
{ QtMultimediaModule, "multimedia", "QtXMultimedia", "qtmultimedia" },
|
||||
{ QtMultimediaWidgetsModule, "multimediawidgets", "QtXMultimediaWidgets", "qtmultimedia" },
|
||||
{ QtMultimediaQuickModule, "multimediaquick", "QtXMultimediaQuick_p", "qtmultimedia" },
|
||||
{ QtNetworkModule, "network", "QtXNetwork", "qtbase" },
|
||||
{ QtNfcModule, "nfc", "QtXNfc", nullptr },
|
||||
{ QtOpenGLModule, "opengl", "QtXOpenGL", nullptr },
|
||||
{ QtOpenGLWidgetsModule, "openglwidgets", "QtXOpenGLWidgets", nullptr },
|
||||
{ QtPositioningModule, "positioning", "QtXPositioning", nullptr },
|
||||
{ QtPrintSupportModule, "printsupport", "QtXPrintSupport", nullptr },
|
||||
{ QtQmlModule, "qml", "QtXQml", "qtdeclarative" },
|
||||
{ QtQmlToolingModule, "qmltooling", "qmltooling", nullptr },
|
||||
{ QtQuickModule, "quick", "Quick", "qtdeclarative" },
|
||||
{ QtQuickParticlesModule, "quickparticles", "QuickParticles", nullptr },
|
||||
{ QtQuickWidgetsModule, "quickwidgets", "QuickWidgets", nullptr },
|
||||
{ QtScriptModule, "script", "Script", "qtscript" },
|
||||
{ QtScriptToolsModule, "scripttools", "ScriptTools", "qtscript" },
|
||||
{ QtSensorsModule, "sensors", "Sensors", nullptr },
|
||||
{ QtSerialPortModule, "serialport", "SerialPort", "qtserialport" },
|
||||
{ QtSqlModule, "sql", "Sql", "qtbase" },
|
||||
{ QtSvgWidgetsModule, "svgwidgets", "SvgWidgets", nullptr },
|
||||
{ QtSvgModule, "svg", "Svg", nullptr },
|
||||
{ QtTestModule, "test", "Test", "qtbase" },
|
||||
{ QtWebKitModule, "webkit", "WebKit", nullptr },
|
||||
{ QtWebKitWidgetsModule, "webkitwidgets", "WebKitWidgets", nullptr },
|
||||
{ QtWebSocketsModule, "websockets", "WebSockets", nullptr },
|
||||
{ QtWidgetsModule, "widgets", "Widgets", "qtbase" },
|
||||
{ QtWinExtrasModule, "winextras", "WinExtras", nullptr },
|
||||
{ QtXmlModule, "xml", "Xml", "qtbase" },
|
||||
{ QtXmlPatternsModule, "xmlpatterns", "XmlPatterns", "qtxmlpatterns" },
|
||||
{ QtWebEngineCoreModule, "webenginecore", "WebEngineCore", nullptr },
|
||||
{ QtWebEngineModule, "webengine", "WebEngine", "qtwebengine" },
|
||||
{ QtWebEngineWidgetsModule, "webenginewidgets", "WebEngineWidgets", nullptr },
|
||||
{ Qt3DCoreModule, "3dcore", "3DCore", nullptr },
|
||||
{ Qt3DRendererModule, "3drenderer", "3DRender", nullptr },
|
||||
{ Qt3DQuickModule, "3dquick", "3DQuick", nullptr },
|
||||
{ Qt3DQuickRendererModule, "3dquickrenderer", "3DQuickRender", nullptr },
|
||||
{ Qt3DInputModule, "3dinput", "3DInput", nullptr },
|
||||
{ Qt3DAnimationModule, "3danimation", "3DAnimation", nullptr },
|
||||
{ Qt3DExtrasModule, "3dextras", "3DExtras", nullptr },
|
||||
{ QtLocationModule, "geoservices", "Location", nullptr },
|
||||
{ QtWebChannelModule, "webchannel", "WebChannel", nullptr },
|
||||
{ QtTextToSpeechModule, "texttospeech", "TextToSpeech", nullptr },
|
||||
{ QtSerialBusModule, "serialbus", "SerialBus", nullptr },
|
||||
{ QtWebViewModule, "webview", "WebView", nullptr }
|
||||
{ QtQuickModule, "quick", "QtXQuick", "qtdeclarative" },
|
||||
{ QtQuickParticlesModule, "quickparticles", "QtXQuickParticles", nullptr },
|
||||
{ QtQuickWidgetsModule, "quickwidgets", "QtXQuickWidgets", nullptr },
|
||||
{ QtScriptModule, "script", "QtXScript", "qtscript" },
|
||||
{ QtScriptToolsModule, "scripttools", "QtXScriptTools", "qtscript" },
|
||||
{ QtSensorsModule, "sensors", "QtXSensors", nullptr },
|
||||
{ QtSerialPortModule, "serialport", "QtXSerialPort", "qtserialport" },
|
||||
{ QtSqlModule, "sql", "QtXSql", "qtbase" },
|
||||
{ QtSvgWidgetsModule, "svgwidgets", "QtXSvgWidgets", nullptr },
|
||||
{ QtSvgModule, "svg", "QtXSvg", nullptr },
|
||||
{ QtTestModule, "test", "QtXTest", "qtbase" },
|
||||
{ QtWebKitModule, "webkit", "QtXWebKit", nullptr },
|
||||
{ QtWebKitWidgetsModule, "webkitwidgets", "QtXWebKitWidgets", nullptr },
|
||||
{ QtWebSocketsModule, "websockets", "QtXWebSockets", nullptr },
|
||||
{ QtWidgetsModule, "widgets", "QtXWidgets", "qtbase" },
|
||||
{ QtWinExtrasModule, "winextras", "QtXWinExtras", nullptr },
|
||||
{ QtXmlModule, "xml", "QtXXml", "qtbase" },
|
||||
{ QtXmlPatternsModule, "xmlpatterns", "QtXXmlPatterns", "qtxmlpatterns" },
|
||||
{ QtWebEngineCoreModule, "webenginecore", "QtXWebEngineCore", nullptr },
|
||||
{ QtWebEngineModule, "webengine", "QtXWebEngine", "qtwebengine" },
|
||||
{ QtWebEngineWidgetsModule, "webenginewidgets", "QtXWebEngineWidgets", nullptr },
|
||||
{ Qt3DCoreModule, "3dcore", "QtX3DCore", nullptr },
|
||||
{ Qt3DRendererModule, "3drenderer", "QtX3DRender", nullptr },
|
||||
{ Qt3DQuickModule, "3dquick", "QtX3DQuick", nullptr },
|
||||
{ Qt3DQuickRendererModule, "3dquickrenderer", "QtX3DQuickRender", nullptr },
|
||||
{ Qt3DInputModule, "3dinput", "QtX3DInput", nullptr },
|
||||
{ Qt3DAnimationModule, "3danimation", "QtX3DAnimation", nullptr },
|
||||
{ Qt3DExtrasModule, "3dextras", "QtX3DExtras", nullptr },
|
||||
{ QtLocationModule, "geoservices", "QtXLocation", nullptr },
|
||||
{ QtWebChannelModule, "webchannel", "QtXWebChannel", nullptr },
|
||||
{ QtTextToSpeechModule, "texttospeech", "QtXTextToSpeech", nullptr },
|
||||
{ QtSerialBusModule, "serialbus", "QtXSerialBus", nullptr },
|
||||
{ QtWebViewModule, "webview", "QtXWebView", nullptr }
|
||||
};
|
||||
|
||||
DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
|
||||
@ -94,7 +94,7 @@ DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
|
||||
auto lIbName = QFileInfo(path).fileName();
|
||||
|
||||
for (int i = 0; i < modulesCount; ++i) {
|
||||
if (lIbName.contains(qtModuleEntries[i].libraryName)) {
|
||||
if (containsModule(qtModuleEntries[i].libraryName, lIbName)) {
|
||||
return static_cast<DeployCore::QtModule>(qtModuleEntries[i].module);
|
||||
}
|
||||
}
|
||||
@ -144,6 +144,11 @@ LibPriority DeployCore::getLibPriority(const QString &lib) {
|
||||
return SystemLib;
|
||||
}
|
||||
|
||||
bool DeployCore::containsModule(const QString& moduleLibrary, const QString& lib) {
|
||||
QRegExp erfexp(QString(moduleLibrary).replace("QtX", "Qt[4,5,6]"));
|
||||
return lib.contains(erfexp);
|
||||
}
|
||||
|
||||
#define C(X) QuasarAppUtils::Params::isEndable(X)
|
||||
RunMode DeployCore::getMode() {
|
||||
if (C("help") || C("h") || C("v") || C("version")) {
|
||||
@ -342,8 +347,7 @@ QStringList DeployCore::extractTranslation(const QSet<QString> &libs) {
|
||||
|
||||
for (const auto &lib: libs) {
|
||||
for (size_t i = 0; i < qtModulesCount; ++i) {
|
||||
if (lib.contains(qtModuleEntries[i].libraryName) &&
|
||||
qtModuleEntries[i].translation) {
|
||||
if (containsModule(qtModuleEntries[i].libraryName, lib) && qtModuleEntries[i].translation) {
|
||||
res.insert(qtModuleEntries[i].translation);
|
||||
}
|
||||
}
|
||||
|
@ -213,6 +213,14 @@ public:
|
||||
static char getEnvSeparator();
|
||||
|
||||
static LibPriority getLibPriority(const QString &lib);
|
||||
|
||||
/**
|
||||
* @brief containsModule This method compare lib name and module of qt.
|
||||
* @param muduleIndex this is name of module library
|
||||
* @param lib This is library name
|
||||
* @return true if library has some module that as muduleIndex
|
||||
*/
|
||||
static bool containsModule(const QString &moduleLibrary, const QString &lib);
|
||||
static DeployCore::QtModule getQtModule(const QString& path);
|
||||
static void addQtModule(DeployCore::QtModule& module, const QString& path);
|
||||
|
||||
|
@ -40,8 +40,7 @@ bool Extracter::deployMSVC() {
|
||||
|
||||
bool Extracter::isWebEngine(const QString &package) const {
|
||||
auto qtModules = _packageDependencyes.value(package).qtModules();
|
||||
|
||||
return static_cast<quint64>(qtModules) & static_cast<quint64>(DeployCore::QtModule::QtWebEngineModule);
|
||||
return static_cast<quint64>(qtModules) & static_cast<quint64>(DeployCore::QtModule::QtWebEngineCoreModule);
|
||||
}
|
||||
|
||||
bool Extracter::extractWebEngine() {
|
||||
@ -49,8 +48,8 @@ bool Extracter::extractWebEngine() {
|
||||
auto cnf = DeployCore::_config;
|
||||
|
||||
for (auto i = cnf->packages().cbegin(); i != cnf->packages().cend(); ++i) {
|
||||
|
||||
const auto &package = i.key();
|
||||
|
||||
if (isWebEngine(package)) {
|
||||
auto webEngeneBin = cnf->qtDir.getLibexecs();
|
||||
|
||||
@ -65,7 +64,6 @@ bool Extracter::extractWebEngine() {
|
||||
auto libOut = cnf->getTargetDir() + "/" + package + cnf->packages()[package].getLibOutDir();
|
||||
|
||||
auto res = cnf->qtDir.getResources();
|
||||
|
||||
if (!_fileManager->copyFiles(angleGLLibs(), libOut)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -747,27 +747,6 @@ QSet<QString> ModulesQt513::qmlLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/translations/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/translations/qtscript_ar.qm",
|
||||
"./" + distDir + "/translations/qtscript_bg.qm",
|
||||
"./" + distDir + "/translations/qtscript_ca.qm",
|
||||
"./" + distDir + "/translations/qtscript_cs.qm",
|
||||
"./" + distDir + "/translations/qtscript_da.qm",
|
||||
"./" + distDir + "/translations/qtscript_de.qm",
|
||||
"./" + distDir + "/translations/qtscript_en.qm",
|
||||
"./" + distDir + "/translations/qtscript_es.qm",
|
||||
"./" + distDir + "/translations/qtscript_fi.qm",
|
||||
"./" + distDir + "/translations/qtscript_fr.qm",
|
||||
"./" + distDir + "/translations/qtscript_he.qm",
|
||||
"./" + distDir + "/translations/qtscript_hu.qm",
|
||||
"./" + distDir + "/translations/qtscript_it.qm",
|
||||
"./" + distDir + "/translations/qtscript_ja.qm",
|
||||
"./" + distDir + "/translations/qtscript_ko.qm",
|
||||
"./" + distDir + "/translations/qtscript_lv.qm",
|
||||
"./" + distDir + "/translations/qtscript_pl.qm",
|
||||
"./" + distDir + "/translations/qtscript_ru.qm",
|
||||
"./" + distDir + "/translations/qtscript_sk.qm",
|
||||
"./" + distDir + "/translations/qtscript_tr.qm",
|
||||
"./" + distDir + "/translations/qtscript_uk.qm"
|
||||
});
|
||||
|
||||
#else
|
||||
@ -1278,27 +1257,6 @@ QSet<QString> ModulesQt513::qmlLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/translations/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/translations/qtscript_ar.qm",
|
||||
"./" + distDir + "/translations/qtscript_bg.qm",
|
||||
"./" + distDir + "/translations/qtscript_ca.qm",
|
||||
"./" + distDir + "/translations/qtscript_cs.qm",
|
||||
"./" + distDir + "/translations/qtscript_da.qm",
|
||||
"./" + distDir + "/translations/qtscript_de.qm",
|
||||
"./" + distDir + "/translations/qtscript_en.qm",
|
||||
"./" + distDir + "/translations/qtscript_es.qm",
|
||||
"./" + distDir + "/translations/qtscript_fi.qm",
|
||||
"./" + distDir + "/translations/qtscript_fr.qm",
|
||||
"./" + distDir + "/translations/qtscript_he.qm",
|
||||
"./" + distDir + "/translations/qtscript_hu.qm",
|
||||
"./" + distDir + "/translations/qtscript_it.qm",
|
||||
"./" + distDir + "/translations/qtscript_ja.qm",
|
||||
"./" + distDir + "/translations/qtscript_ko.qm",
|
||||
"./" + distDir + "/translations/qtscript_lv.qm",
|
||||
"./" + distDir + "/translations/qtscript_pl.qm",
|
||||
"./" + distDir + "/translations/qtscript_ru.qm",
|
||||
"./" + distDir + "/translations/qtscript_sk.qm",
|
||||
"./" + distDir + "/translations/qtscript_tr.qm",
|
||||
"./" + distDir + "/translations/qtscript_uk.qm"
|
||||
});
|
||||
#endif
|
||||
|
||||
@ -1896,27 +1854,6 @@ QSet<QString> ModulesQt513::testDistroLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ar.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_bg.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ca.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_cs.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_da.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_de.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_en.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_es.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_fi.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_fr.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_he.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_hu.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_it.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ja.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ko.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_lv.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_pl.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ru.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_sk.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_tr.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_uk.qm"
|
||||
}
|
||||
);
|
||||
#else
|
||||
@ -2571,27 +2508,6 @@ QSet<QString> ModulesQt513::testDistroLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ar.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_bg.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ca.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_cs.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_da.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_de.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_en.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_es.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_fi.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_fr.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_he.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_hu.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_it.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ja.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ko.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_lv.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_pl.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_ru.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_sk.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_tr.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtscript_uk.qm"
|
||||
|
||||
}
|
||||
|
||||
@ -2662,27 +2578,6 @@ QSet<QString> ModulesQt513::testOutLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/lolTr/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/lolTr/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/lolTr/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ar.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_bg.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ca.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_cs.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_da.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_de.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_en.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_es.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_fi.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_fr.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_he.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_hu.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_it.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ja.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ko.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_lv.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_pl.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ru.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_sk.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_tr.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_uk.qm",
|
||||
"./" + distDir + "/p/bearer/qgenericbearer.dll",
|
||||
"./" + distDir + "/p/iconengines/qsvgicon.dll",
|
||||
"./" + distDir + "/p/imageformats/qgif.dll",
|
||||
@ -3227,27 +3122,6 @@ QSet<QString> ModulesQt513::testOutLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/lolTr/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/lolTr/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/lolTr/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ar.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_bg.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ca.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_cs.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_da.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_de.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_en.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_es.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_fi.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_fr.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_he.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_hu.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_it.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ja.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ko.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_lv.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_pl.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_ru.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_sk.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_tr.qm",
|
||||
"./" + distDir + "/lolTr/qtscript_uk.qm",
|
||||
"./" + distDir + "/p/bearer/libqconnmanbearer.so",
|
||||
"./" + distDir + "/p/bearer/libqgenericbearer.so",
|
||||
"./" + distDir + "/p/bearer/libqnmbearer.so",
|
||||
@ -4326,27 +4200,6 @@ QSet<QString> ModulesQt513::qtWebEngine(const QString &distDir) const {
|
||||
"./" + distDir + "/translations/qtwebengine_pl.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_ru.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_uk.qm",
|
||||
"./" + distDir + "/translations/qtscript_ar.qm",
|
||||
"./" + distDir + "/translations/qtscript_bg.qm",
|
||||
"./" + distDir + "/translations/qtscript_ca.qm",
|
||||
"./" + distDir + "/translations/qtscript_cs.qm",
|
||||
"./" + distDir + "/translations/qtscript_da.qm",
|
||||
"./" + distDir + "/translations/qtscript_de.qm",
|
||||
"./" + distDir + "/translations/qtscript_en.qm",
|
||||
"./" + distDir + "/translations/qtscript_es.qm",
|
||||
"./" + distDir + "/translations/qtscript_fi.qm",
|
||||
"./" + distDir + "/translations/qtscript_fr.qm",
|
||||
"./" + distDir + "/translations/qtscript_he.qm",
|
||||
"./" + distDir + "/translations/qtscript_hu.qm",
|
||||
"./" + distDir + "/translations/qtscript_it.qm",
|
||||
"./" + distDir + "/translations/qtscript_ja.qm",
|
||||
"./" + distDir + "/translations/qtscript_ko.qm",
|
||||
"./" + distDir + "/translations/qtscript_lv.qm",
|
||||
"./" + distDir + "/translations/qtscript_pl.qm",
|
||||
"./" + distDir + "/translations/qtscript_ru.qm",
|
||||
"./" + distDir + "/translations/qtscript_sk.qm",
|
||||
"./" + distDir + "/translations/qtscript_tr.qm",
|
||||
"./" + distDir + "/translations/qtscript_uk.qm",
|
||||
}
|
||||
);
|
||||
#else
|
||||
@ -4354,6 +4207,154 @@ QSet<QString> ModulesQt513::qtWebEngine(const QString &distDir) const {
|
||||
#endif
|
||||
return Tree;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt513::qtWebEngineWidgets(const QString &distDir) const {
|
||||
|
||||
TestUtils utils;
|
||||
|
||||
auto Tree = qtLibs(distDir);
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
Tree = Tree + utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/bin/QtWebEngineProcess",
|
||||
"./" + distDir + "/bin/webui",
|
||||
"./" + distDir + "/webui.sh",
|
||||
"./" + distDir + "/lib/libQt5Positioning.so",
|
||||
"./" + distDir + "/lib/libQt5SerialPort.so",
|
||||
"./" + distDir + "/lib/libQt5WebChannel.so",
|
||||
"./" + distDir + "/lib/libQt5WebEngineCore.so",
|
||||
"./" + distDir + "/lib/libQt5Network.so",
|
||||
"./" + distDir + "/lib/libQt5PrintSupport.so",
|
||||
"./" + distDir + "/lib/libQt5Qml.so",
|
||||
"./" + distDir + "/lib/libQt5QmlModels.so",
|
||||
"./" + distDir + "/lib/libQt5Quick.so",
|
||||
"./" + distDir + "/lib/libQt5QuickWidgets.so",
|
||||
"./" + distDir + "/lib/libQt5WebEngineWidgets.so",
|
||||
"./" + distDir + "/lib/libQt5WaylandCompositor.so",
|
||||
"./" + distDir + "/plugins/bearer/libqconnmanbearer.so",
|
||||
"./" + distDir + "/plugins/bearer/libqgenericbearer.so",
|
||||
"./" + distDir + "/plugins/bearer/libqnmbearer.so",
|
||||
"./" + distDir + "/plugins/printsupport/libcupsprintersupport.so",
|
||||
"./" + distDir + "/plugins/position/libqtposition_geoclue.so",
|
||||
"./" + distDir + "/plugins/position/libqtposition_geoclue2.so",
|
||||
"./" + distDir + "/plugins/position/libqtposition_positionpoll.so",
|
||||
"./" + distDir + "/plugins/position/libqtposition_serialnmea.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libvulkan-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libvulkan-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libdmabuf-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libdrm-egl-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libshm-emulation-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libxcomposite-egl.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libxcomposite-glx.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so",
|
||||
"./" + distDir + "/plugins/wayland-decoration-client/libbradient.so",
|
||||
"./" + distDir + "/resources/icudtl.dat",
|
||||
"./" + distDir + "/resources/qtwebengine_devtools_resources.pak",
|
||||
"./" + distDir + "/resources/qtwebengine_resources.pak",
|
||||
"./" + distDir + "/resources/qtwebengine_resources_100p.pak",
|
||||
"./" + distDir + "/resources/qtwebengine_resources_200p.pak",
|
||||
"./" + distDir + "/translations/qtserialport_de.qm",
|
||||
"./" + distDir + "/translations/qtserialport_en.qm",
|
||||
"./" + distDir + "/translations/qtserialport_es.qm",
|
||||
"./" + distDir + "/translations/qtserialport_ja.qm",
|
||||
"./" + distDir + "/translations/qtserialport_ko.qm",
|
||||
"./" + distDir + "/translations/qtserialport_pl.qm",
|
||||
"./" + distDir + "/translations/qtserialport_ru.qm",
|
||||
"./" + distDir + "/translations/qtserialport_uk.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_de.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_en.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_es.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_ko.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/am.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ar.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/bg.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/bn.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ca.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/cs.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/da.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/de.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/el.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/en-GB.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/en-US.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/es-419.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/es.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/et.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/fa.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/fi.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/fil.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/fr.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/gu.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/he.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/hi.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/hr.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/hu.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/id.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/it.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ja.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/kn.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ko.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/lt.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/lv.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ml.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/mr.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ms.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/nb.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/nl.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/pl.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/pt-BR.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/pt-PT.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ro.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ru.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/sk.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/sl.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/sr.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/sv.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/sw.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/ta.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/te.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/th.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/tr.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/uk.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/vi.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/zh-CN.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_locales/zh-TW.pak",
|
||||
"./" + distDir + "/translations/qtwebengine_pl.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_ru.qm",
|
||||
"./" + distDir + "/translations/qtwebengine_uk.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_bg.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_da.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_de.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_en.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_es.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_fi.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_fr.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_hu.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_ja.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_ko.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_lv.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_pl.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_ru.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_sk.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_uk.qm",
|
||||
"./" + distDir + "/translations/qtdeclarative_tr.qm",
|
||||
}
|
||||
);
|
||||
#else
|
||||
Tree = Tree + utils.createTree({});
|
||||
#endif
|
||||
return Tree;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt513::testEmptyParamsTree(const QString &distDir) const {
|
||||
TestUtils utils;
|
||||
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
|
||||
virtual QSet<QString> qtWithoutTr(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> testEmptyParamsTree(const QString &distDir = DISTRO_DIR) const;
|
||||
|
||||
|
||||
|
@ -95,3 +95,18 @@ QSet<QString> ModulesQt514::qtWebEngine(const QString &distDir) const
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::qtWebEngineWidgets(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
|
||||
auto res = ModulesQt513::qtWebEngineWidgets(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#else
|
||||
res += utils.createTree({
|
||||
"./" + distDir + "/translations/qtwebengine_ca.qm"
|
||||
});
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,8 @@ public:
|
||||
|
||||
QSet<QString> qtWithoutTr(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const override;
|
||||
|
||||
QSet<QString> qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override;
|
||||
};
|
||||
|
||||
#endif // MODULESQT514_H
|
||||
|
@ -252,3 +252,18 @@ QSet<QString> ModulesQt515::testOutLibs(const QString &distDir) const {
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt515::qtWebEngineWidgets(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
|
||||
auto res = ModulesQt514::qtWebEngineWidgets(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#else
|
||||
res -= utils.createTree({
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libvulkan-server.so"
|
||||
});
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> testDistroLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> testOutLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
|
||||
QSet<QString> qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override;
|
||||
};
|
||||
|
||||
#endif // MODULESQT515_H
|
||||
|
@ -7,6 +7,8 @@
|
||||
["Dstro1", "TestOnlyC"],
|
||||
["Dstro2", "QtWidgetsProject"],
|
||||
["Dstro2", "TestQMLWidgets"],
|
||||
["Dstro2", "quicknanobrowser"]
|
||||
["Dstro2", "quicknanobrowser"],
|
||||
["Dstro2", "webui"]
|
||||
|
||||
]
|
||||
}
|
||||
|
@ -512,30 +512,6 @@ void deploytest::testMSVC() {
|
||||
}
|
||||
|
||||
void deploytest::testEmptyParamsString() {
|
||||
//#ifdef QT_DEBUG
|
||||
// TestUtils utils;
|
||||
|
||||
// QDir("./" + DISTRO_DIR).removeRecursively();
|
||||
|
||||
// auto comapareTree = TestModule.testEmptyParamsTree();
|
||||
|
||||
// runTestParams({}, &comapareTree);
|
||||
|
||||
|
||||
// auto emptyTree = utils.createTree({});
|
||||
|
||||
// runTestParams({"clear"}, &emptyTree);
|
||||
|
||||
// comapareTree = TestModule.testEmptyParamsTree("testDeployDir");
|
||||
|
||||
// runTestParams({"-bin", "./UnitTests",
|
||||
// "-targetDir", "./testDeployDir"}, &comapareTree);
|
||||
|
||||
|
||||
// comapareTree = utils.createTree({});
|
||||
|
||||
// runTestParams({"clear", "-targetDir", "./testDeployDir"}, &comapareTree);
|
||||
//#endif
|
||||
}
|
||||
|
||||
void deploytest::testWebEngine() {
|
||||
@ -551,6 +527,16 @@ void deploytest::testWebEngine() {
|
||||
"-qmake", qmake,
|
||||
"-qmlDir", TestBinDir + "/../quicknanobrowser"}, &comapareTree);
|
||||
|
||||
|
||||
bin = TestBinDir + "webui";
|
||||
qmake = TestQtDir + "bin/qmake";
|
||||
|
||||
comapareTree = TestModule.qtWebEngineWidgets();
|
||||
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-qmake", qmake}, &comapareTree);
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1217,8 +1203,10 @@ void deploytest::testBinDir() {
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
comapareTree += utils.createTree(
|
||||
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh"});
|
||||
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh",
|
||||
"./" + DISTRO_DIR + "/bin/webui",
|
||||
"./" + DISTRO_DIR + "/webui.sh"});
|
||||
#endif
|
||||
|
||||
|
||||
@ -1253,7 +1241,9 @@ void deploytest::testConfFile() {
|
||||
#ifdef Q_OS_UNIX
|
||||
comapareTree += utils.createTree(
|
||||
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh"});
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh",
|
||||
"./" + DISTRO_DIR + "/bin/webui",
|
||||
"./" + DISTRO_DIR + "/webui.sh"});
|
||||
#endif
|
||||
|
||||
runTestParams({"-bin", TestBinDir, "clear" , "noCheckRPATH", "noCheckPATH", "noQt",
|
||||
@ -1264,8 +1254,10 @@ void deploytest::testConfFile() {
|
||||
QFile::remove(TestBinDir + "/TestConf.json");
|
||||
|
||||
comapareTree -= utils.createTree(
|
||||
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh"});
|
||||
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh",
|
||||
"./" + DISTRO_DIR + "/bin/webui",
|
||||
"./" + DISTRO_DIR + "/webui.sh"});
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets",
|
||||
@ -1451,7 +1443,8 @@ void deploytest::testConfFile() {
|
||||
comapareTree = TestModule.onlyC(DISTRO_DIR + "/Dstro1") +
|
||||
TestModule.qtLibs(DISTRO_DIR + "/Dstro2") +
|
||||
TestModule.qmlLibs(DISTRO_DIR + "/Dstro2") +
|
||||
TestModule.qtWebEngine(DISTRO_DIR + "/Dstro2");
|
||||
TestModule.qtWebEngine(DISTRO_DIR + "/Dstro2") +
|
||||
TestModule.qtWebEngineWidgets(DISTRO_DIR + "/Dstro2");
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
auto qmlDir = TestBinDir + "/../";
|
||||
|
129
tests/webui/about.html
Normal file
129
tests/webui/about.html
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Qt WebEngine WebUI Example</title>
|
||||
<style>
|
||||
html {
|
||||
background: #f0f0f0;
|
||||
color: #303030;
|
||||
font: 16px system-ui;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
body > * {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
header {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f0fff0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
header > h1 {
|
||||
font: bold 20px system-ui;
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
footer {
|
||||
flex: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
button {
|
||||
background: #41cd52;
|
||||
color: #f0f0f0;
|
||||
font: 16px system-ui;
|
||||
border: 0;
|
||||
box-shadow: 0px 1px 3px rgb(0,0,0,0.5);
|
||||
cursor: pointer;
|
||||
margin: 0 0 1px;
|
||||
padding: 10px 24px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: #50dc61;
|
||||
}
|
||||
|
||||
button:active {
|
||||
background: #50dc61;
|
||||
box-shadow: 0px 1px 2px rgb(0,0,0,0.5);
|
||||
margin: 1px 0 0;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img width="48px" height="48px"
|
||||
src="qrc:/qt-project.org/qmessagebox/images/qtlogo-64.png">
|
||||
<h1>WebEngine Widgets<br>WebUI Example</h1>
|
||||
</header>
|
||||
<main>
|
||||
<p>
|
||||
Aside from the built-in schemes, such as <code>http</code> and
|
||||
<code>qrc</code>, Qt WebEngine may be extended with <em>custom
|
||||
schemes</em> by creating <em>custom scheme handlers</em>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This is a simple HTML page loaded from a custom scheme and
|
||||
displayed by a <code>QWebEngineView</code>. Even the Quit button
|
||||
below is a standard HTML <code><button></code> element.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Read the documentation to find out
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
How to create a custom scheme handler which serves HTML
|
||||
and handles HTML form submissions.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
How to prevent ordinary web content from accessing the
|
||||
custom scheme.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
How to prevent any other scheme from submitting HTML
|
||||
form data.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</main>
|
||||
<footer>
|
||||
<form action="" method="post">
|
||||
<button name="quit">Quit</button>
|
||||
</form>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
BIN
tests/webui/doc/images/webui-example.png
Normal file
BIN
tests/webui/doc/images/webui-example.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
82
tests/webui/main.cpp
Normal file
82
tests/webui/main.cpp
Normal file
@ -0,0 +1,82 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "webuihandler.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QWebEnginePage>
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineView>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setOrganizationName("QtExamples");
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
|
||||
WebUiHandler::registerUrlScheme();
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QWebEngineProfile profile;
|
||||
|
||||
WebUiHandler handler;
|
||||
profile.installUrlSchemeHandler(WebUiHandler::schemeName, &handler);
|
||||
|
||||
QWebEnginePage page(&profile);
|
||||
page.load(WebUiHandler::aboutUrl);
|
||||
|
||||
QWebEngineView view;
|
||||
view.setPage(&page);
|
||||
view.setContextMenuPolicy(Qt::NoContextMenu);
|
||||
view.resize(500, 600);
|
||||
view.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
15
tests/webui/webui.pro
Normal file
15
tests/webui/webui.pro
Normal file
@ -0,0 +1,15 @@
|
||||
TEMPLATE = app
|
||||
|
||||
QT += webenginewidgets
|
||||
|
||||
HEADERS += \
|
||||
webuihandler.h
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
webuihandler.cpp
|
||||
|
||||
RESOURCES += \
|
||||
webui.qrc
|
||||
|
||||
DESTDIR="$$PWD/../build"
|
5
tests/webui/webui.qrc
Normal file
5
tests/webui/webui.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>about.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
98
tests/webui/webuihandler.cpp
Normal file
98
tests/webui/webuihandler.cpp
Normal file
@ -0,0 +1,98 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "webuihandler.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#include <QWebEngineUrlRequestJob>
|
||||
#include <QWebEngineUrlScheme>
|
||||
|
||||
#define SCHEMENAME "webui"
|
||||
|
||||
const QByteArray WebUiHandler::schemeName = QByteArrayLiteral(SCHEMENAME);
|
||||
const QUrl WebUiHandler::aboutUrl = QUrl(QStringLiteral(SCHEMENAME ":about"));
|
||||
|
||||
WebUiHandler::WebUiHandler(QObject *parent)
|
||||
: QWebEngineUrlSchemeHandler(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void WebUiHandler::requestStarted(QWebEngineUrlRequestJob *job)
|
||||
{
|
||||
static const QUrl webUiOrigin(QStringLiteral(SCHEMENAME ":"));
|
||||
static const QByteArray GET(QByteArrayLiteral("GET"));
|
||||
static const QByteArray POST(QByteArrayLiteral("POST"));
|
||||
|
||||
QByteArray method = job->requestMethod();
|
||||
QUrl url = job->requestUrl();
|
||||
QUrl initiator = job->initiator();
|
||||
|
||||
if (method == GET && url == aboutUrl) {
|
||||
QFile *file = new QFile(QStringLiteral(":/about.html"), job);
|
||||
file->open(QIODevice::ReadOnly);
|
||||
job->reply(QByteArrayLiteral("text/html"), file);
|
||||
} else if (method == POST && url == aboutUrl && initiator == webUiOrigin) {
|
||||
job->fail(QWebEngineUrlRequestJob::RequestAborted);
|
||||
QApplication::exit();
|
||||
} else {
|
||||
job->fail(QWebEngineUrlRequestJob::UrlNotFound);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void WebUiHandler::registerUrlScheme()
|
||||
{
|
||||
QWebEngineUrlScheme webUiScheme(schemeName);
|
||||
webUiScheme.setFlags(QWebEngineUrlScheme::SecureScheme |
|
||||
QWebEngineUrlScheme::LocalScheme |
|
||||
QWebEngineUrlScheme::LocalAccessAllowed);
|
||||
QWebEngineUrlScheme::registerScheme(webUiScheme);
|
||||
}
|
70
tests/webui/webuihandler.h
Normal file
70
tests/webui/webuihandler.h
Normal file
@ -0,0 +1,70 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef WEBUIHANDLER_H
|
||||
#define WEBUIHANDLER_H
|
||||
|
||||
#include <QWebEngineUrlSchemeHandler>
|
||||
|
||||
class WebUiHandler : public QWebEngineUrlSchemeHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WebUiHandler(QObject *parent = nullptr);
|
||||
|
||||
void requestStarted(QWebEngineUrlRequestJob *job) override;
|
||||
|
||||
static void registerUrlScheme();
|
||||
|
||||
const static QByteArray schemeName;
|
||||
const static QUrl aboutUrl;
|
||||
};
|
||||
|
||||
#endif // !WEBUIHANDLER_H
|
Loading…
x
Reference in New Issue
Block a user