diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-04-20 10:58:50 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-04-20 10:58:50 +0200 |
commit | 7fe519be4fd1c599a611ee83f76ef561fd73b1d3 (patch) | |
tree | 0e76f962f4b5428ff556b57a00029ccf9327adee /src | |
parent | ad6e1079a1edfff48bf18c25718f65a1d9f8008f (diff) | |
parent | 9861ce1ba35bbc29f20b65853e17b426c804c87c (diff) |
Merge 5.11 into 5.11.0
Change-Id: Ide3f60771813db37aac87fc7b7a8aae66d4fe1e0
Diffstat (limited to 'src')
m--------- | src/3rdparty | 0 | ||||
-rw-r--r-- | src/core/web_engine_library_info.cpp | 29 | ||||
-rw-r--r-- | src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 5 |
3 files changed, 19 insertions, 15 deletions
diff --git a/src/3rdparty b/src/3rdparty -Subproject e173cb17d97aa3c2065189275c85db79eb7d174 +Subproject de120c712b755a45687b4f3a7fd01bb7d334669 diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp index 35b139602..515f763d2 100644 --- a/src/core/web_engine_library_info.cpp +++ b/src/core/web_engine_library_info.cpp @@ -163,9 +163,9 @@ QString subProcessPath() #else candidatePaths << QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) % QLatin1Char('/') % processBinary; +#endif candidatePaths << QCoreApplication::applicationDirPath() % QLatin1Char('/') % processBinary; -#endif } Q_FOREACH (const QString &candidate, candidatePaths) { @@ -185,11 +185,13 @@ QString subProcessPath() QString localesPath() { + static bool initialized = false; + static QString potentialLocalesPath = #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) - return getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_locales"); + getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_locales"); #else - static bool initialized = false; - static QString potentialLocalesPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales"); + QLibraryInfo::location(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales"); +#endif if (!initialized) { initialized = true; @@ -204,7 +206,6 @@ QString localesPath() } return potentialLocalesPath; -#endif } #if BUILDFLAG(ENABLE_SPELLCHECK) @@ -257,11 +258,13 @@ QString dictionariesPath() QString icuDataPath() { + static bool initialized = false; + static QString potentialResourcesPath = #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) - return getResourcesPath(frameworkBundle()); + getResourcesPath(frameworkBundle()); #else - static bool initialized = false; - static QString potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); +#endif if (!initialized) { initialized = true; if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { @@ -279,16 +282,17 @@ QString icuDataPath() } return potentialResourcesPath; -#endif } QString resourcesDataPath() { + static bool initialized = false; + static QString potentialResourcesPath = #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) - return getResourcesPath(frameworkBundle()); + getResourcesPath(frameworkBundle()); #else - static bool initialized = false; - static QString potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); +#endif if (!initialized) { initialized = true; if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { @@ -306,7 +310,6 @@ QString resourcesDataPath() } return potentialResourcesPath; -#endif } } // namespace diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index 9e2f6ed99..16ea216f2 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -269,6 +269,7 @@ void RenderWidgetHostViewQtDelegateWidget::unlockMouse() void RenderWidgetHostViewQtDelegateWidget::show() { + m_rootItem->setVisible(true); // Check if we're attached to a QWebEngineView, we don't // want to show anything else than popups as top-level. if (parent() || m_isPopup) { @@ -278,12 +279,12 @@ void RenderWidgetHostViewQtDelegateWidget::show() void RenderWidgetHostViewQtDelegateWidget::hide() { - QQuickWidget::hide(); + m_rootItem->setVisible(false); } bool RenderWidgetHostViewQtDelegateWidget::isVisible() const { - return QQuickWidget::isVisible(); + return QQuickWidget::isVisible() && m_rootItem->isVisible(); } QWindow* RenderWidgetHostViewQtDelegateWidget::window() const |