From b292fd17bfc1f422242e7e546a732b7a67384c47 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 1 Dec 2014 10:59:29 +0100 Subject: OSX: Don't show QtWebEngineProcess in the dock Set the LSUIElement key as Chromium does in its helper app's Info.plist to prevent seeing a jumping icon in the dock while the OS waits in vain for QtWebEngineProcess to create a window. Change-Id: I6c836621ec506fde04bc3825f64c49630a065351 Task-number: QTBUG-42955 Reviewed-by: Zeno Albisser Reviewed-by: Andras Becsi --- src/process/Info_mac.plist | 22 ++++++++++++++++++++++ src/process/process.pro | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 src/process/Info_mac.plist diff --git a/src/process/Info_mac.plist b/src/process/Info_mac.plist new file mode 100644 index 000000000..de1d010bc --- /dev/null +++ b/src/process/Info_mac.plist @@ -0,0 +1,22 @@ + + + + + NSPrincipalClass + NSApplication + CFBundleIconFile + @ICON@ + CFBundlePackageType + APPL + CFBundleGetInfoString + Created by Qt/QMake + CFBundleSignature + @TYPEINFO@ + CFBundleExecutable + @EXECUTABLE@ + CFBundleIdentifier + @BUNDLEIDENTIFIER@ + LSUIElement + 1 + + diff --git a/src/process/process.pro b/src/process/process.pro index ad1575c81..443c5c3d9 100644 --- a/src/process/process.pro +++ b/src/process/process.pro @@ -1,6 +1,9 @@ TARGET = $$QTWEBENGINEPROCESS_NAME TEMPLATE = app +# Needed to set LSUIElement=1 +QMAKE_INFO_PLIST = Info_mac.plist + load(qt_build_paths) contains(QT_CONFIG, qt_framework) { # Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework. -- cgit v1.2.3 From f3d17dd6e77c297543868ad67f009cc01116ac39 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 5 Jan 2015 16:36:52 +0100 Subject: UIDelegatesManager: Always print errors if component loading fails. This setting is useful when developing a new UI set, and one may not initially know about the suppression of errors, which is a painful problem to run into. Furthermore, make sure to delete the failed component so that subsequent attempted use of it doesn't succeed if UI_DELEGATES_DEBUG isn't enabled. Change-Id: I3d2abc19fb4a007d06795d2e8149ae78d7c9c020 Reviewed-by: Pierre Rossi --- src/webengine/ui_delegates_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 95e04d699..637f3ea36 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -173,10 +173,10 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type) *component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()), QQmlComponent::PreferSynchronous, m_view)); if ((*component)->status() != QQmlComponent::Ready) { -#ifdef UI_DELEGATES_DEBUG Q_FOREACH (const QQmlError& err, (*component)->errors()) - fprintf(stderr, " component error: %s\n", qPrintable(err.toString())); -#endif + qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString())); + delete *component; + *component = 0; return false; } return true; -- cgit v1.2.3 From 16f3ed8044857c881d23a35b3ef8efc12ad72201 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 5 Jan 2015 16:36:57 +0100 Subject: UIDelegatesManager: Communicate load failure back to the dialog controller. If the dialog controller has asked to show a dialog, then if we cannot show a dialog, we should reject its request. Not doing this results in the WebView becoming frozen for input if the load fails, seemingly. Change-Id: I7dddd5357c712f896499cdebb142e60b5e80b4f2 Reviewed-by: Pierre Rossi --- src/webengine/ui_delegates_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 637f3ea36..e2f3855f4 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -296,8 +296,12 @@ void UIDelegatesManager::showDialog(QSharedPointer d Q_UNREACHABLE(); } - if (!ensureComponentLoaded(dialogComponentType)) + if (!ensureComponentLoaded(dialogComponentType)) { + // Let the controller know it couldn't be loaded + qWarning("Failed to load dialog, rejecting."); + dialogController->reject(); return; + } QQmlComponent *dialogComponent = Q_NULLPTR; switch (dialogComponentType) { -- cgit v1.2.3 From 4641376b818dbd05b3303dbae026bdd6bb5a1174 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 5 Jan 2015 16:41:34 +0100 Subject: UIDelegatesManager: Remove creationContextForComponent. This doesn't seem to be too much sense, and according to the QQmlContext documentation, may not work as expected: "This is only valid for components created directly from QML." Change-Id: I49db5dad49288d196e8519b1a60dcf2192147672 Reviewed-by: Pierre Rossi --- src/webengine/api/qquickwebengineview.cpp | 2 +- src/webengine/ui_delegates_manager.cpp | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index ad850e84e..3497c16ad 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -184,7 +184,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu // FIXME: expose the context menu data as an attached property to make this more useful if (contextMenuExtraItems) { ui()->addMenuSeparator(menu); - if (QObject* menuExtras = contextMenuExtraItems->create(ui()->creationContextForComponent(contextMenuExtraItems))) { + if (QObject* menuExtras = contextMenuExtraItems->create(qmlContext(q))) { menuExtras->setParent(menu); QQmlListReference entries(menu, defaultPropertyName(menu), qmlEngine(q)); if (entries.isValid()) diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index e2f3855f4..48e1bee7e 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -182,15 +182,6 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type) return true; } -QQmlContext *UIDelegatesManager::creationContextForComponent(QQmlComponent *component) -{ - Q_ASSERT(component); - - QQmlContext* baseContext = component->creationContext() ? component->creationContext() : qmlContext(m_view); - Q_ASSERT(baseContext); - return baseContext; -} - #define CHECK_QML_SIGNAL_PROPERTY(prop, location) \ if (!prop.isSignalProperty()) \ qWarning("%s is missing %s signal property.\n", qPrintable(location.toString()), qPrintable(prop.name())); @@ -200,7 +191,7 @@ void UIDelegatesManager::addMenuItem(MenuItemHandler *menuItemHandler, const QSt Q_ASSERT(menuItemHandler); if (!ensureComponentLoaded(MenuItem)) return; - QObject *it = menuItemComponent->beginCreate(creationContextForComponent(menuItemComponent)); + QObject *it = menuItemComponent->beginCreate(qmlContext(m_view)); QQmlProperty(it, QStringLiteral("text")).write(text); QQmlProperty(it, QStringLiteral("iconName")).write(iconName); @@ -224,7 +215,7 @@ void UIDelegatesManager::addMenuSeparator(QObject *menu) if (!ensureComponentLoaded(MenuSeparator)) return; - QQmlContext *itemContext = creationContextForComponent(menuSeparatorComponent); + QQmlContext *itemContext = qmlContext(m_view); QObject *sep = menuSeparatorComponent->create(itemContext); sep->setParent(menu); @@ -238,7 +229,7 @@ QObject *UIDelegatesManager::addMenu(QObject *parentMenu, const QString &title, if (!ensureComponentLoaded(Menu)) return 0; - QQmlContext *context(creationContextForComponent(menuComponent)); + QQmlContext *context = qmlContext(m_view); QObject *menu = menuComponent->beginCreate(context); // Useful when not using Qt Quick Controls' Menu if (QQuickItem* item = qobject_cast(menu)) @@ -310,7 +301,7 @@ void UIDelegatesManager::showDialog(QSharedPointer d Q_UNREACHABLE(); } - QQmlContext *context(creationContextForComponent(dialogComponent)); + QQmlContext *context = qmlContext(m_view); QObject *dialog = dialogComponent->beginCreate(context); dialog->setParent(m_view); QQmlProperty textProp(dialog, QStringLiteral("text")); @@ -395,7 +386,7 @@ void UIDelegatesManager::showFilePicker(WebContentsAdapterClient::FileChooserMod if (!ensureComponentLoaded(FilePicker)) return; - QQmlContext *context(creationContextForComponent(filePickerComponent)); + QQmlContext *context = qmlContext(m_view); QObject *filePicker = filePickerComponent->beginCreate(context); if (QQuickItem* item = qobject_cast(filePicker)) item->setParentItem(m_view); -- cgit v1.2.3 From ff5ba560999703f2d6572a59203ae52d78d221bb Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 9 Dec 2014 14:57:14 +0100 Subject: Remove possible quoting characters qmake may have quoted already because of certain characters like ~ in build path Change-Id: I8a085d23da3da8876f3acd807c9468fc43c7dacb Reviewed-by: Jocelyn Turcotte --- tools/qmake/mkspecs/features/gyp_generator.prf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index 5ef3110cc..eea11ef09 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -24,7 +24,7 @@ defineReplace(mocAction) { " 'inputs': ['$$INPUT_FILE',]," \ " 'outputs': ['$$OUTPUT_FILE',]," \ " 'action': [" - for(token, MOC_COMMAND): contents += " '$$token'," + for(token, MOC_COMMAND): contents += " '$$replace(token,\',)'," contents += " '$$INPUT_FILE'," \ " '-o'," \ " '$$OUTPUT_FILE'," \ @@ -39,12 +39,13 @@ defineReplace(rccAction) { OUTPUT_NAME = $$rccOutput($$INPUT_FILE) EXTERN_FUNC = $$rccExternFunc($$INPUT_FILE) OUTPUT_FILE = $$RCC_GEN_DIR/$${OUTPUT_NAME} + CLEAN_QMAKE_RCC = $$clean_path($$QMAKE_RCC) contents = " {" \ " 'action_name':'$$OUTPUT_NAME'," \ " 'inputs': ['$$INPUT_FILE',]," \ " 'outputs': ['$$OUTPUT_FILE',]," \ " 'action': [" \ - " '$$clean_path($$QMAKE_RCC)'," + " '$$replace(CLEAN_QMAKE_RCC,\',)'," for(resource_flag, $$QMAKE_RESOURCE_FLAGS): contents += " '$$resource_flag'," contents += " '-name'," \ " '$$EXTERN_FUNC'," \ -- cgit v1.2.3 From 9beac6fdb35f0d0ab64c6d45b1802645b8ae6faf Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 6 Jan 2015 15:56:58 +0100 Subject: Only deploy ffmpegsumo once in debug_and_release This moves all installs inside the the release-only-with-debug-fallback block to prevent the debug ffmpegsumo.dll to overwrite the release one on Windows (and get use for both debug and release builds). This will use the release version for both instead by default. This also moves the load(qt_module) call higher to make sure that build_all is added to CONFIG at that point. Change-Id: I2584a28e5eaaf5028798703fb387ac2b120d7ea9 Task-number: QTBUG-43348 Reviewed-by: Simon Hausmann --- src/core/core_module.pro | 104 ++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 14f249142..8e445bd3a 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -12,6 +12,18 @@ QMAKE_INFO_PLIST = Info_mac.plist error("Could not find the linking information that gyp should have generated.") } +# We distribute the module binary but headers are only available in-tree. +CONFIG += no_module_headers +load(qt_module) + +# Using -Wl,-Bsymbolic-functions seems to confuse the dynamic linker +# and doesn't let Chromium get access to libc symbols through dlsym. +CONFIG -= bsymbolic_functions + +contains(QT_CONFIG, egl): CONFIG += egl + +linux: contains(QT_CONFIG, separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" + REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack # Duplicated from resources/resources.gyp LOCALE_LIST = am ar bg bn ca cs da de el en-GB en-US es-419 es et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk vi zh-CN zh-TW @@ -31,58 +43,48 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat plugins.files = $$OUT_PWD/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION} -!debug_and_release|!build_all|CONFIG(release, debug|release):contains(QT_CONFIG, qt_framework) { - locales.version = Versions - locales.path = Resources/qtwebengine_locales - resources.version = Versions - resources.path = Resources - icu.version = Versions - icu.path = Resources - plugins.version = Versions - plugins.path = Libraries - # No files, this prepares the bundle Helpers symlink, process.pro will create the directories - qtwebengineprocessplaceholder.version = Versions - qtwebengineprocessplaceholder.path = Helpers - QMAKE_BUNDLE_DATA += icu locales resources plugins qtwebengineprocessplaceholder -} else { - locales.CONFIG += no_check_exist - locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales - resources.CONFIG += no_check_exist - resources.path = $$[QT_INSTALL_DATA] - icu.CONFIG += no_check_exist - icu.path = $$[QT_INSTALL_DATA] - plugins.CONFIG += no_check_exist - plugins.path = $$[QT_INSTALL_PLUGINS]/qtwebengine - INSTALLS += icu locales resources plugins -} - -# We distribute the module binary but headers are only available in-tree. -CONFIG += no_module_headers -load(qt_module) - -# Using -Wl,-Bsymbolic-functions seems to confuse the dynamic linker -# and doesn't let Chromium get access to libc symbols through dlsym. -CONFIG -= bsymbolic_functions - -contains(QT_CONFIG, egl): CONFIG += egl - -linux: contains(QT_CONFIG, separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" +!debug_and_release|!build_all|CONFIG(release, debug|release) { + contains(QT_CONFIG, qt_framework) { + locales.version = Versions + locales.path = Resources/qtwebengine_locales + resources.version = Versions + resources.path = Resources + icu.version = Versions + icu.path = Resources + plugins.version = Versions + plugins.path = Libraries + # No files, this prepares the bundle Helpers symlink, process.pro will create the directories + qtwebengineprocessplaceholder.version = Versions + qtwebengineprocessplaceholder.path = Helpers + QMAKE_BUNDLE_DATA += icu locales resources plugins qtwebengineprocessplaceholder + } else { + locales.CONFIG += no_check_exist + locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales + resources.CONFIG += no_check_exist + resources.path = $$[QT_INSTALL_DATA] + icu.CONFIG += no_check_exist + icu.path = $$[QT_INSTALL_DATA] + plugins.CONFIG += no_check_exist + plugins.path = $$[QT_INSTALL_PLUGINS]/qtwebengine + INSTALLS += icu locales resources plugins + } -!contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { - ICU_TARGET = $$shell_path($$[QT_INSTALL_DATA]/icudtl.dat) - ICU_FILE = $$shell_path($$OUT_PWD/$$getConfigDir()/icudtl.dat) - icu_rule.target = $$ICU_TARGET - unix: icu_rule.commands = if [ -e $$ICU_FILE ] ; then $$QMAKE_COPY $$ICU_FILE $$ICU_TARGET ; fi - win32: icu_rule.commands = if exist $$ICU_FILE ( $$QMAKE_COPY $$ICU_FILE $$ICU_TARGET ) + !contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { + ICU_TARGET = $$shell_path($$[QT_INSTALL_DATA]/icudtl.dat) + ICU_FILE = $$shell_path($$OUT_PWD/$$getConfigDir()/icudtl.dat) + icu_rule.target = $$ICU_TARGET + unix: icu_rule.commands = if [ -e $$ICU_FILE ] ; then $$QMAKE_COPY $$ICU_FILE $$ICU_TARGET ; fi + win32: icu_rule.commands = if exist $$ICU_FILE ( $$QMAKE_COPY $$ICU_FILE $$ICU_TARGET ) - PLUGIN_DIR = $$shell_path($$[QT_INSTALL_PLUGINS]/qtwebengine) - PLUGIN_TARGET = $$shell_path($$PLUGIN_DIR/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}) - PLUGIN_FILE = $$shell_path($$OUT_PWD/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}) - plugins_rule.target = $$PLUGIN_TARGET - unix: plugins_rule.commands = $$QMAKE_MKDIR $$PLUGIN_DIR && if [ -e $$PLUGIN_FILE ] ; then $$QMAKE_COPY $$PLUGIN_FILE $$PLUGIN_TARGET ; fi - win32: plugins_rule.commands = (if not exist $$PLUGIN_DIR ( $$QMAKE_MKDIR $$PLUGIN_DIR )) && \ - if exist $$PLUGIN_FILE ( $$QMAKE_COPY $$PLUGIN_FILE $$PLUGIN_TARGET ) + PLUGIN_DIR = $$shell_path($$[QT_INSTALL_PLUGINS]/qtwebengine) + PLUGIN_TARGET = $$shell_path($$PLUGIN_DIR/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}) + PLUGIN_FILE = $$shell_path($$OUT_PWD/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}) + plugins_rule.target = $$PLUGIN_TARGET + unix: plugins_rule.commands = $$QMAKE_MKDIR $$PLUGIN_DIR && if [ -e $$PLUGIN_FILE ] ; then $$QMAKE_COPY $$PLUGIN_FILE $$PLUGIN_TARGET ; fi + win32: plugins_rule.commands = (if not exist $$PLUGIN_DIR ( $$QMAKE_MKDIR $$PLUGIN_DIR )) && \ + if exist $$PLUGIN_FILE ( $$QMAKE_COPY $$PLUGIN_FILE $$PLUGIN_TARGET ) - QMAKE_EXTRA_TARGETS += icu_rule plugins_rule - PRE_TARGETDEPS += $$ICU_TARGET $$PLUGIN_TARGET + QMAKE_EXTRA_TARGETS += icu_rule plugins_rule + PRE_TARGETDEPS += $$ICU_TARGET $$PLUGIN_TARGET + } } -- cgit v1.2.3 From ee7af79a213ea008e8e8bde4a993a92a66b01384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 7 Jan 2015 17:04:05 +0100 Subject: Tell the ContentMainRunner to not reset signal handlers in the browser process. This prevents problems when QProcess::waitForFinished is used from the same application as QtWebEngine. Updates the src/3rdparty SHA1. Change-Id: I373456b1ef9f65e55b89acd877b15e7115516d6b Task-number: QTBUG-42747 Reviewed-by: Simon Hausmann --- src/3rdparty | 2 +- src/core/web_engine_context.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index be4ec3fa6..e7cb37a52 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit be4ec3fa64a4c6c2b641830a9811ab7847c7dd39 +Subproject commit e7cb37a52f362ea9fcc80ac4ba468fc9f8544fec diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index db3956e5a..446f0e92c 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -196,6 +196,7 @@ WebEngineContext::WebEngineContext() content::GpuProcessHost::RegisterGpuMainThreadFactory(content::CreateInProcessGpuThread); content::ContentMainParams contentMainParams(m_mainDelegate.get()); + contentMainParams.setup_signal_handlers = false; #if defined(OS_WIN) sandbox::SandboxInterfaceInfo sandbox_info = {0}; content::InitializeSandboxInfo(&sandbox_info); -- cgit v1.2.3 From 917e78fb8848b9e31c81d6d4b0286ee23c0a84f1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 9 Jan 2015 13:07:22 +0100 Subject: Revert "Mac: INCLUDEPATH fix" This reverts commit a7da7f8ab00e6fe246ff8a02082305ea7f833fd3. Adding the install prefix to the inlude search paths causes us to pick up header files from there if there are any, which causes all sorts of issues. Conflicts: lib/lib.pro shared/shared.pro Change-Id: I070ff6443bb5612b3b7e3878d22dc9dd69d62e70 Reviewed-by: Pierre Rossi --- src/core/core_gyp_generator.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro index 38aba3a76..3817c334b 100644 --- a/src/core/core_gyp_generator.pro +++ b/src/core/core_gyp_generator.pro @@ -29,8 +29,7 @@ else: DEFINES += QT_NO_EGL RESOURCES += devtools.qrc -# something fishy with qmake in 5.2 ? -INCLUDEPATH += $$[QT_INSTALL_HEADERS] $$PWD +INCLUDEPATH += $$PWD SOURCES = \ access_token_store_qt.cpp \ -- cgit v1.2.3 From e026171af834c1a5db47f81d92432dd7d601b8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 13 Jan 2015 14:58:49 +0100 Subject: Make TLS1 the default minimum SSL protocol in Qt WebEngine. This mitigates the risk of the POODLE vulnerability. Updates the 3rdparty submodule SHA1. Change-Id: I7557ecfd5f4f250a51e18432936b83502ba5d272 Task-number: QTBUG-43085 Reviewed-by: Andras Becsi --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index e7cb37a52..f9c03801d 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit e7cb37a52f362ea9fcc80ac4ba468fc9f8544fec +Subproject commit f9c03801de86b5e9da2b915a9e490c2f2254fecf -- cgit v1.2.3 From 0b1e2d59f7545b8ed175660389def694c7bf4506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 14 Jan 2015 17:42:12 +0100 Subject: Use paths relative to QtWebEngineProcess on OS X. Fixes crashes of the QtWebEngineProcess on OS X 10.7 that were caused by the bundle paths not being returned correctly. Change-Id: Ic839978a6f1bff361cb76a3468bf978a738b6e82 Task-number: QTBUG-43181 Reviewed-by: Jocelyn Turcotte --- src/core/web_engine_library_info.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp index beae9dd75..2d72dd5a2 100644 --- a/src/core/web_engine_library_info.cpp +++ b/src/core/web_engine_library_info.cpp @@ -101,7 +101,12 @@ static inline CFBundleRef frameworkBundle() static QString getPath(CFBundleRef frameworkBundle) { QString path; - if (frameworkBundle) { + // The following is a fix for QtWebEngineProcess crashes on OS X 10.7 and before. + // We use it for the other OS X versions as well to make sure it works and because + // the directory structure should be the same. + if (qApp->applicationName() == QLatin1String(QTWEBENGINEPROCESS_NAME)) { + path = QDir::cleanPath(qApp->applicationDirPath() % QLatin1String("/../../../..")); + } else if (frameworkBundle) { CFURLRef bundleUrl = CFBundleCopyBundleURL(frameworkBundle); CFStringRef bundlePath = CFURLCopyFileSystemPath(bundleUrl, kCFURLPOSIXPathStyle); path = QString::fromCFString(bundlePath); @@ -114,7 +119,12 @@ static QString getPath(CFBundleRef frameworkBundle) static QString getResourcesPath(CFBundleRef frameworkBundle) { QString path; - if (frameworkBundle) { + // The following is a fix for QtWebEngineProcess crashes on OS X 10.7 and before. + // We use it for the other OS X versions as well to make sure it works and because + // the directory structure should be the same. + if (qApp->applicationName() == QLatin1String(QTWEBENGINEPROCESS_NAME)) { + path = getPath(frameworkBundle) % QLatin1String("/Resources"); + } else if (frameworkBundle) { CFURLRef resourcesRelativeUrl = CFBundleCopyResourcesDirectoryURL(frameworkBundle); CFStringRef resourcesRelativePath = CFURLCopyFileSystemPath(resourcesRelativeUrl, kCFURLPOSIXPathStyle); path = getPath(frameworkBundle) % QLatin1Char('/') % QString::fromCFString(resourcesRelativePath); -- cgit v1.2.3 From 98349dbdd88970ac0274e8d9e5f12dc0e9737bdb Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Wed, 14 Jan 2015 14:54:32 +0100 Subject: Print only major.minor.micro version of python. This will avoid printing the compiler version python was built with. Showing the compiler version led to confusion multiple times. Change-Id: I4ced2128b92c83a41f616bcf756f2c313a9caed3 Reviewed-by: Andras Becsi --- tools/buildscripts/gyp_qtwebengine | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine index 6f2bbc936..970cce54e 100755 --- a/tools/buildscripts/gyp_qtwebengine +++ b/tools/buildscripts/gyp_qtwebengine @@ -5,7 +5,7 @@ import os import sys import subprocess -print 'using python: ' + sys.executable + ' version: ' + sys.version +print 'using python: ' + sys.executable + ' version: ' + str(sys.version_info.major) + '.' + str(sys.version_info.minor) + '.' + str(sys.version_info.micro) if sys.platform == "darwin": print 'xcode version: ' + subprocess.check_output(['xcodebuild', '-version']).replace('\n', ' ') -- cgit v1.2.3 From a6ac2fdd2366f00610cd5e26c88d65f97e93e15c Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Wed, 14 Jan 2015 15:25:49 +0100 Subject: Fixup sync.profile We shouldn't hardcode to a particular branch there. Change-Id: I9cab855363cfaaa3d8d31879b0c459697a4a6f4c Reviewed-by: Andras Becsi --- sync.profile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sync.profile b/sync.profile index 2f3aab8c5..1e9519fe3 100644 --- a/sync.profile +++ b/sync.profile @@ -16,9 +16,9 @@ # - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch) # %dependencies = ( - "qtbase" => "refs/heads/dev", - "qtdeclarative" => "refs/heads/dev", - "qtxmlpatterns" => "refs/heads/dev", + "qtbase" => "", + "qtdeclarative" => "", + "qtxmlpatterns" => "", # FIXME: take examples out into their own module to avoid a potential circular dependency later ? - "qtquickcontrols" => "refs/heads/dev", + "qtquickcontrols" => "", ); -- cgit v1.2.3 From 1364ba04b2df4e91d8f648fb02e0c19dcac1ab30 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Fri, 9 Jan 2015 11:05:04 +0100 Subject: Refactor our build skipping logic Move the logic to mkspecs to keep the .pro files robust. Add the basic infrastructure for config.tests, the first one of which will consistently ensure we have libcap on linux. Change-Id: Iee4207e747e589ba67d5353cb4c18f156e555c11 Reviewed-by: Andras Becsi --- src/src.pro | 42 ++++++++++++------------- tools/qmake/config.tests/libcap/libcap.cpp | 44 +++++++++++++++++++++++++++ tools/qmake/config.tests/libcap/libcap.pro | 3 ++ tools/qmake/mkspecs/features/configure.prf | 23 ++++++++++++++ tools/qmake/mkspecs/features/default_post.prf | 8 +++++ tools/qmake/mkspecs/features/default_pre.prf | 7 +++++ tools/qmake/mkspecs/features/functions.prf | 20 ++++++++---- 7 files changed, 118 insertions(+), 29 deletions(-) create mode 100644 tools/qmake/config.tests/libcap/libcap.cpp create mode 100644 tools/qmake/config.tests/libcap/libcap.pro create mode 100644 tools/qmake/mkspecs/features/configure.prf create mode 100644 tools/qmake/mkspecs/features/default_post.prf diff --git a/src/src.pro b/src/src.pro index 60f873c76..ed402c582 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,30 +1,26 @@ TEMPLATE = subdirs -isPlatformSupported() { - process.depends = core - webengine.depends = core - webenginewidgets.depends = core webengine - webengine_plugin.subdir = webengine/plugin - webengine_plugin.target = sub-webengine-plugin - webengine_plugin.depends = webengine - webengine_experimental_plugin.subdir = webengine/plugin/experimental - webengine_experimental_plugin.target = sub-webengine-experimental-plugin - webengine_experimental_plugin.depends = webengine +process.depends = core +webengine.depends = core +webenginewidgets.depends = core webengine +webengine_plugin.subdir = webengine/plugin +webengine_plugin.target = sub-webengine-plugin +webengine_plugin.depends = webengine +webengine_experimental_plugin.subdir = webengine/plugin/experimental +webengine_experimental_plugin.target = sub-webengine-experimental-plugin +webengine_experimental_plugin.depends = webengine - SUBDIRS += core \ - process \ - webengine \ - webengine_plugin \ - webengine_experimental_plugin +SUBDIRS += core \ + process \ + webengine \ + webengine_plugin \ + webengine_experimental_plugin - # FIXME: We probably want a bit more control over config options to tweak what to build/ship or not. - # Another example of where this could be necessary is to make it easy to build proprietery codecs support. - !contains(WEBENGINE_CONFIG, no_ui_delegates): SUBDIRS += webengine/ui +# FIXME: We probably want a bit more control over config options to tweak what to build/ship or not. +# Another example of where this could be necessary is to make it easy to build proprietery codecs support. +!contains(WEBENGINE_CONFIG, no_ui_delegates): SUBDIRS += webengine/ui - qtHaveModule(widgets) { - SUBDIRS += webenginewidgets - } -} else { - warning("QtWebEngine is not maintained for this platform/configuration and is therefore disabled.") +qtHaveModule(widgets) { + SUBDIRS += webenginewidgets } diff --git a/tools/qmake/config.tests/libcap/libcap.cpp b/tools/qmake/config.tests/libcap/libcap.cpp new file mode 100644 index 000000000..c0bba3eae --- /dev/null +++ b/tools/qmake/config.tests/libcap/libcap.cpp @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main(int, char **) +{ + cap_t cap = cap_get_proc(); + const char *text = cap_to_text(cap, 0); + return 0; +} diff --git a/tools/qmake/config.tests/libcap/libcap.pro b/tools/qmake/config.tests/libcap/libcap.pro new file mode 100644 index 000000000..2c688f809 --- /dev/null +++ b/tools/qmake/config.tests/libcap/libcap.pro @@ -0,0 +1,3 @@ +linux: SOURCES += libcap.cpp +LIBS += -lcap +CONFIG -= qt diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf new file mode 100644 index 000000000..d0cb50877 --- /dev/null +++ b/tools/qmake/mkspecs/features/configure.prf @@ -0,0 +1,23 @@ +# Load configure.prf from qtbase first +load(configure) +load(functions) + +defineTest(runConfigure) { + webengine_successfully_configured: return(true) + # Ignore the cached config tests results in case they were not successful + CONFIG += recheck + #Override the config.tests path + QMAKE_CONFIG_TESTS_DIR = $$QTWEBENGINE_ROOT/tools/qmake/config.tests + CONFIG_TESTS = $$files($$QMAKE_CONFIG_TESTS_DIR/*.pro, true) + log("Running configure tests$${EOL}") + for(test, CONFIG_TESTS) { + test = $$basename(test) + test ~= s/\\.pro$// + qtCompileTest($$test) + } + # libcap-dev package doesn't ship .pc files on Ubuntu. + linux:!config_libcap:skipBuild("libcap appears to be missing") + + isEmpty(skipBuildReason):cache(CONFIG, add, $$list(webengine_successfully_configured)) +} + diff --git a/tools/qmake/mkspecs/features/default_post.prf b/tools/qmake/mkspecs/features/default_post.prf new file mode 100644 index 000000000..d09ba05fd --- /dev/null +++ b/tools/qmake/mkspecs/features/default_post.prf @@ -0,0 +1,8 @@ +load(default_post) + +!isEmpty(skipBuildReason) { + SUBDIRS = + export(SUBDIRS) + log($${skipBuildReason}$${EOL}) + log(QtWebEngine will not be built.$${EOL}) +} diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf index aeb7c0b3b..02f4f24d4 100644 --- a/tools/qmake/mkspecs/features/default_pre.prf +++ b/tools/qmake/mkspecs/features/default_pre.prf @@ -9,8 +9,15 @@ QTWEBENGINEPROCESS_NAME = QtWebEngineProcess # Location of sync.profile MODULE_BASE_DIR = $$QTWEBENGINE_ROOT +EOL = $$escape_expand(\\n) load(functions) +# Check platform support and run config tests early enough to bail +equals(_PRO_FILE_, "$$QTWEBENGINE_ROOT/qtwebengine.pro"): isPlatformSupported() { + load(configure) + runConfigure() +} + # Call the original default_pre. load(default_pre) diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index acf15a811..4c2547d57 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -1,16 +1,19 @@ defineTest(isPlatformSupported) { - static: return(false) + static { + skipBuild("Static builds of QtWebEngine aren't supported.") + return(false) + } osx:lessThan(QMAKE_XCODE_VERSION, 5.1) { - warning("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") + skipBuild("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") return(false) } - linux-g++*:!isGCCVersionSupported():return(false) + linux-g++*:!isGCCVersionSupported(): return(false) !isPythonVersionSupported(): return(false) linux-g++*|win32-msvc2013|macx-clang: return(true) boot2qt: return(true) - warning("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation".) + skipBuild("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.") return(false) } @@ -18,7 +21,7 @@ defineTest(isPythonVersionSupported) { python_major_version = $$system('python -c "import sys; print sys.version_info.major"') python_minor_version = $$system('python -c "import sys; print sys.version_info.minor"') greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): return(true) - warning("Using Python version "$$python_major_version"."$$python_minor_version", but at least Python version 2.7 is required to build Qt WebEngine.") + skipBuild("Using Python version "$$python_major_version"."$$python_minor_version", but at least Python version 2.7 is required to build Qt WebEngine.") return(false) } @@ -26,7 +29,7 @@ defineTest(isGCCVersionSupported) { # The below will work for gcc 4.6 and up and also match gcc 5 greaterThan(QT_GCC_MINOR_VERSION, 5):return(true) greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true) - warning("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.6 is required to build Qt WebEngine.") + skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.6 is required to build Qt WebEngine.") return(false) } @@ -140,3 +143,8 @@ defineReplace(findOrBuildNinja) { } return($$out) } + +defineTest(skipBuild) { + skipBuildReason = "$$skipBuildReason $${EOL}$$1" + export(skipBuildReason) +} -- cgit v1.2.3 From ae657b918ff22da2553dc577c877b03f49cc2bdf Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Mon, 12 Jan 2015 18:56:52 +0100 Subject: Add additional dependency checks For dependencies that have caused trouble before, such as libdrm. Task-number: QTBUG-41516 Change-Id: I0cee98282e93460971471796a65a43be4750c6b0 Reviewed-by: Andras Becsi --- tools/qmake/mkspecs/features/configure.prf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf index d0cb50877..6e74b5547 100644 --- a/tools/qmake/mkspecs/features/configure.prf +++ b/tools/qmake/mkspecs/features/configure.prf @@ -4,6 +4,10 @@ load(functions) defineTest(runConfigure) { webengine_successfully_configured: return(true) + linux:contains(QT_CONFIG,no-pkg-config) { + skipBuild("pkg-config is required") + return(false) + } # Ignore the cached config tests results in case they were not successful CONFIG += recheck #Override the config.tests path @@ -17,7 +21,11 @@ defineTest(runConfigure) { } # libcap-dev package doesn't ship .pc files on Ubuntu. linux:!config_libcap:skipBuild("libcap appears to be missing") - + contains(QT_CONFIG, xcb) { + for(package, $$list("libdrm xcomposite xi xrandr")) { + !packagesExist($$package):skipBuild("Unmet dependency: $$package") + } + } isEmpty(skipBuildReason):cache(CONFIG, add, $$list(webengine_successfully_configured)) } -- cgit v1.2.3