diff options
-rw-r--r-- | dependencies.yaml | 8 | ||||
-rw-r--r-- | examples/webenginewidgets/simplebrowser/tabwidget.h | 1 | ||||
-rw-r--r-- | src/core/ozone/gl_context_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/ozone/gl_share_context_qt.cpp | 8 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 8 | ||||
-rw-r--r-- | src/core/web_engine_library_info.cpp | 10 | ||||
-rw-r--r-- | src/pdf/api/qpdfdocument_p.h | 4 | ||||
-rw-r--r-- | src/pdf/qpdfdocument.cpp | 9 | ||||
-rw-r--r-- | src/process/process.pro | 4 | ||||
-rw-r--r-- | src/tools/qwebengine_convert_dict/main.cpp | 2 | ||||
-rw-r--r-- | src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 2 | ||||
-rw-r--r-- | src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 2 | ||||
-rw-r--r-- | tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp | 1 | ||||
-rw-r--r-- | tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp | 16 |
14 files changed, 41 insertions, 38 deletions
diff --git a/dependencies.yaml b/dependencies.yaml index 46b961d01..72291a922 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,6 +1,6 @@ dependencies: ../qtdeclarative: - ref: 6412bcd2219d2a5c1f8193d8f394ddb1279dee2b + ref: dac2c8aec4917742aed6e311cf542dc37da60809 required: true # ../qtlocation: # ref: a8793c6d9695498b3a53793f21859421262b4541 @@ -9,11 +9,11 @@ dependencies: # ref: 59749d56d666a6687fcedc2f7892080467db8574 # required: false ../qtquickcontrols2: - ref: ccade67a03e40e2a6bab3d028c3ce594e0aa4071 + ref: f8d64735bcffa864ebf8c6dab0d5003bab20457f required: false ../qttools: - ref: 01d2ebcc1996f17a7e23003970d5ad27fa3d58af + ref: 2ebc2d1d19edba7f2726ab137f752d38ac1b5f36 required: false ../qtwebchannel: - ref: 711abbcf7b1cf5d5cec497aca35dcbb18e4c1636 + ref: b96777198a310f64c9d213bdd311880c9ab0b6b2 required: false diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.h b/examples/webenginewidgets/simplebrowser/tabwidget.h index fba61d44f..06f3db829 100644 --- a/examples/webenginewidgets/simplebrowser/tabwidget.h +++ b/examples/webenginewidgets/simplebrowser/tabwidget.h @@ -52,6 +52,7 @@ #define TABWIDGET_H #include <QTabWidget> +#include <QWebEngineFindTextResult> #include <QWebEnginePage> QT_BEGIN_NAMESPACE diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp index e511e8eb5..f4d3f1618 100644 --- a/src/core/ozone/gl_context_qt.cpp +++ b/src/core/ozone/gl_context_qt.cpp @@ -177,7 +177,7 @@ void *GLContextHelper::getGlxPlatformInterface() { #if QT_CONFIG(opengl) && defined(USE_GLX) if (QOpenGLContext *context = qt_gl_global_share_context()) - return context->platformInterface<QPlatformInterface::QGLXContext>(); + return context->nativeInterface<QNativeInterface::QGLXContext>(); #endif return nullptr; } @@ -186,7 +186,7 @@ void *GLContextHelper::getEglPlatformInterface() { #if QT_CONFIG(opengl) && QT_CONFIG(egl) if (QOpenGLContext *context = qt_gl_global_share_context()) - return context->platformInterface<QPlatformInterface::QEGLContext>(); + return context->nativeInterface<QNativeInterface::QEGLContext>(); #endif return nullptr; } diff --git a/src/core/ozone/gl_share_context_qt.cpp b/src/core/ozone/gl_share_context_qt.cpp index 669652057..c2cfecb8b 100644 --- a/src/core/ozone/gl_share_context_qt.cpp +++ b/src/core/ozone/gl_share_context_qt.cpp @@ -57,21 +57,21 @@ QtShareGLContext::QtShareGLContext(QOpenGLContext *qtContext) #if QT_CONFIG(opengl) QOpenGLContext *context = QOpenGLContext::globalShareContext(); #if defined(Q_OS_MACOS) - auto *ctx = context->platformInterface<QPlatformInterface::QCocoaGLContext>(); + auto *ctx = context->nativeInterface<QNativeInterface::QCocoaGLContext>(); if (ctx) m_handle = cglContext(ctx->nativeContext()); #endif #if defined(Q_OS_WIN) - auto *ctx = context->platformInterface<QPlatformInterface::QWGLContext>(); + auto *ctx = context->nativeInterface<QNativeInterface::QWGLContext>(); #endif #if defined(Q_OS_LINUX) - auto *ctx = context->platformInterface<QPlatformInterface::QGLXContext>(); + auto *ctx = context->nativeInterface<QNativeInterface::QGLXContext>(); #endif if (ctx && !m_handle) m_handle = (void *)ctx->nativeContext(); #if QT_CONFIG(egl) if (!m_handle) { - auto *ctx = context->platformInterface<QPlatformInterface::QEGLContext>(); + auto *ctx = context->nativeInterface<QNativeInterface::QEGLContext>(); if (ctx) m_handle = (void *)ctx->nativeContext(); } diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 32701f230..5c125bb8f 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -162,6 +162,9 @@ static bool usingANGLE() static bool usingDefaultSGBackend() { + if (QQuickWindow::graphicsApi() != QSGRendererInterface::OpenGL) + return false; + const QStringList args = QGuiApplication::arguments(); //folow logic from contextFactory in src/quick/scenegraph/qsgcontextplugin.cpp @@ -187,7 +190,7 @@ bool usingSoftwareDynamicGL() if (QCoreApplication::testAttribute(Qt::AA_UseSoftwareOpenGL)) return true; #if defined(Q_OS_WIN) - HMODULE handle = QPlatformInterface::QWGLContext::openGLModuleHandle(); + HMODULE handle = QNativeInterface::QWGLContext::openGLModuleHandle(); wchar_t path[MAX_PATH]; DWORD size = GetModuleFileName(handle, path, MAX_PATH); QFileInfo openGLModule(QString::fromWCharArray(path, size)); @@ -652,6 +655,9 @@ WebEngineContext::WebEngineContext() // Enable sandboxing on OS X and Linux (Desktop / Embedded) by default. bool disable_sandbox = qEnvironmentVariableIsSet(kDisableSandboxEnv); +#if defined(Q_OS_WIN) + disable_sandbox = true; // FIXME: Windows sandbox no longer works on CI, but works fine locally. +#endif if (!disable_sandbox) { #if defined(Q_OS_LINUX) parsedCommandLine->AppendSwitch(service_manager::switches::kDisableSetuidSandbox); diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp index fa9e34268..aa3dd7bdc 100644 --- a/src/core/web_engine_library_info.cpp +++ b/src/core/web_engine_library_info.cpp @@ -166,7 +166,7 @@ QString subProcessPath() candidatePaths << getPath(frameworkBundle()) % QStringLiteral("/Helpers/" QTWEBENGINEPROCESS_NAME ".app/Contents/MacOS/" QTWEBENGINEPROCESS_NAME); #else - candidatePaths << QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) + candidatePaths << QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) % QLatin1Char('/') % processBinary; #endif candidatePaths << QCoreApplication::applicationDirPath() @@ -203,7 +203,7 @@ QString localesPath() #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_locales"); #else - QLibraryInfo::location(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales"); + QLibraryInfo::path(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales"); #endif if (!initialized) { @@ -252,7 +252,7 @@ QString dictionariesPath() candidatePaths << frameworkDictionariesPath; #endif - QString libraryDictionariesPath = QLibraryInfo::location(QLibraryInfo::DataPath) + QString libraryDictionariesPath = QLibraryInfo::path(QLibraryInfo::DataPath) % QDir::separator() % QLatin1String("qtwebengine_dictionaries"); candidatePaths << libraryDictionariesPath; } @@ -276,13 +276,13 @@ QString resourcesDataPath() #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) getResourcesPath(frameworkBundle()); #else - QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + QLibraryInfo::path(QLibraryInfo::DataPath) % QLatin1String("/resources"); #endif if (!initialized) { initialized = true; if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath)); - potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath); + potentialResourcesPath = QLibraryInfo::path(QLibraryInfo::DataPath); } if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath)); diff --git a/src/pdf/api/qpdfdocument_p.h b/src/pdf/api/qpdfdocument_p.h index 9a737766b..b6ee2dfd0 100644 --- a/src/pdf/api/qpdfdocument_p.h +++ b/src/pdf/api/qpdfdocument_p.h @@ -58,9 +58,11 @@ #include <QtCore/qpointer.h> #include <QtNetwork/qnetworkreply.h> +#include <mutex> + QT_BEGIN_NAMESPACE -class QPdfMutexLocker : public QMutexLocker +class QPdfMutexLocker : public std::unique_lock<QRecursiveMutex> { public: QPdfMutexLocker(); diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp index 7e0d5e0cc..8fd55dd57 100644 --- a/src/pdf/qpdfdocument.cpp +++ b/src/pdf/qpdfdocument.cpp @@ -51,20 +51,13 @@ QT_BEGIN_NAMESPACE -// The library is not thread-safe at all, it has a lot of global variables. -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) -class QRecursiveMutex : public QMutex -{ - QRecursiveMutex() : QMutex(Recursive) {} -}; -#endif Q_GLOBAL_STATIC(QRecursiveMutex, pdfMutex) static int libraryRefCount; static const double CharacterHitTolerance = 16.0; Q_LOGGING_CATEGORY(qLcDoc, "qt.pdf.document") QPdfMutexLocker::QPdfMutexLocker() - : QMutexLocker(pdfMutex()) + : std::unique_lock<QRecursiveMutex>(*pdfMutex()) { } diff --git a/src/process/process.pro b/src/process/process.pro index b6ee6d788..f9068cd7d 100644 --- a/src/process/process.pro +++ b/src/process/process.pro @@ -53,7 +53,7 @@ qtConfig(build_all): CONFIG += build_all qtConfig(framework) { # Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework. - DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/$$QT_MAJOR_VERSION/Helpers + DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/A/Helpers # Deploy the entitlements file so macdeployqt can use it. entitlements.files = QtWebEngineProcess.entitlements @@ -67,7 +67,7 @@ qtConfig(framework) { msvc: QMAKE_LFLAGS *= /LARGEADDRESSAWARE qtConfig(framework) { - target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/$$QT_MAJOR_VERSION/Helpers + target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/A/Helpers } else { target.path = $$[QT_INSTALL_LIBEXECS] } diff --git a/src/tools/qwebengine_convert_dict/main.cpp b/src/tools/qwebengine_convert_dict/main.cpp index 14d175c00..0d639c77b 100644 --- a/src/tools/qwebengine_convert_dict/main.cpp +++ b/src/tools/qwebengine_convert_dict/main.cpp @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) } bool icuDataDirFound = false; - QString icuDataDir = QLibraryInfo::location(QLibraryInfo::DataPath) + QString icuDataDir = QLibraryInfo::path(QLibraryInfo::DataPath) % QLatin1String("/resources"); // Try to look up the path to the ICU data directory via an environment variable diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index 54a4bc99e..9842b3665 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -351,7 +351,7 @@ QSGNode *RenderWidgetHostViewQtDelegateQuick::updatePaintNode(QSGNode *oldNode, if (comp->hasAlphaChannel()) texOpts.setFlag(QQuickWindow::TextureHasAlphaChannel); int texId = comp->textureId(); - node->setTexture(QPlatformInterface::QSGOpenGLTexture::fromNative(texId, win, texSize, texOpts)); + node->setTexture(QNativeInterface::QSGOpenGLTexture::fromNative(texId, win, texSize, texOpts)); node->setTextureCoordinatesTransform(QSGImageNode::MirrorVertically); } else { Q_UNREACHABLE(); 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 b647e164b..db8a236e2 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -131,7 +131,7 @@ protected: if (comp->hasAlphaChannel()) texOpts.setFlag(QQuickWindow::TextureHasAlphaChannel); int texId = comp->textureId(); - node->setTexture(QPlatformInterface::QSGOpenGLTexture::fromNative(texId, win, texSize, texOpts)); + node->setTexture(QNativeInterface::QSGOpenGLTexture::fromNative(texId, win, texSize, texOpts)); node->setTextureCoordinatesTransform(QSGImageNode::MirrorVertically); } else { Q_UNREACHABLE(); diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp index 189eead04..cc3c409a4 100644 --- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp +++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp @@ -876,6 +876,7 @@ public: QQuickItem(parent), m_eventCounter(0), m_child(child) { setFlag(ItemHasContents); setAcceptedMouseButtons(Qt::AllButtons); + setAcceptTouchEvents(true); setAcceptHoverEvents(true); } diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index f905234e3..81e3600b1 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -1543,9 +1543,9 @@ void tst_QWebEngineView::touchTap() QVERIFY(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString().isEmpty()); auto singleTap = [](QWidget* target, const QPoint& tapCoords) -> void { - QTest::touchEvent(target, s_touchDevice).press(1, tapCoords, target); - QTest::touchEvent(target, s_touchDevice).stationary(1); - QTest::touchEvent(target, s_touchDevice).release(1, tapCoords, target); + QTest::touchEvent(target->window(), s_touchDevice).press(0, tapCoords, target); + QTest::touchEvent(target->window(), s_touchDevice).stationary(0); + QTest::touchEvent(target->window(), s_touchDevice).release(0, tapCoords, target); }; // Single tap on text doesn't trigger a selection @@ -1604,10 +1604,10 @@ void tst_QWebEngineView::touchTapAndHold() QVERIFY(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString().isEmpty()); auto tapAndHold = [](QWidget* target, const QPoint& tapCoords) -> void { - QTest::touchEvent(target, s_touchDevice).press(1, tapCoords, target); - QTest::touchEvent(target, s_touchDevice).stationary(1); + QTest::touchEvent(target, s_touchDevice).press(0, tapCoords, target); + QTest::touchEvent(target, s_touchDevice).stationary(0); QTest::qWait(1000); - QTest::touchEvent(target, s_touchDevice).release(1, tapCoords, target); + QTest::touchEvent(target, s_touchDevice).release(0, tapCoords, target); }; // Tap-and-hold on text selects the word under it @@ -1848,7 +1848,7 @@ void tst_QWebEngineView::inputFieldOverridesShortcuts() }; // The input form is not focused. The action is triggered on pressing Shift+Delete. - action->setShortcut(Qt::SHIFT + Qt::Key_Delete); + action->setShortcut(Qt::SHIFT | Qt::Key_Delete); QTest::keyClick(view.windowHandle(), Qt::Key_Delete, Qt::ShiftModifier); QTRY_VERIFY(actionTriggered); QCOMPARE(inputFieldValue(), QString("x")); @@ -1884,7 +1884,7 @@ void tst_QWebEngineView::inputFieldOverridesShortcuts() // A Ctrl-1 action is no default Qt key binding and should be triggerable. evaluateJavaScriptSync(view.page(), "document.getElementById('input1').focus();"); QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString(), QStringLiteral("input1")); - action->setShortcut(Qt::CTRL + Qt::Key_1); + action->setShortcut(Qt::CTRL | Qt::Key_1); QTest::keyClick(view.windowHandle(), Qt::Key_1, Qt::ControlModifier); QTRY_VERIFY(actionTriggered); QCOMPARE(inputFieldValue(), QString("yxx")); |