summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-08 06:33:25 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-08 09:41:36 +0200
commit044703cbba019101f4a3e817f5a845ad4d53a704 (patch)
treee0e2f89a38d44a8939e79f156a5c1dec527081e2 /src
parentf31694e9da6c5803bf8ef05a9bea8dd15bf3e6c4 (diff)
Port the asyncExose setting to use the native interface of Qt 6
Task-number: QTBUG-83252 Change-Id: I0e30afd79c4d689e975798bbd1baf5e02ccc3dfe Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/container/qaxbase.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index e09d737..c183629 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -68,7 +68,8 @@
#include <qsettings.h>
#include <qdebug.h>
#include <QGuiApplication>
-#include <qpa/qplatformnativeinterface.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
#ifndef QT_NO_THREAD
# include <qmutex.h>
@@ -1114,6 +1115,8 @@ long QAxBase::indexOfVerb(const QString &verb) const
*/
bool QAxBase::initialize(IUnknown **ptr)
{
+ using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
+
if (*ptr || control().isEmpty())
return false;
@@ -1121,11 +1124,8 @@ bool QAxBase::initialize(IUnknown **ptr)
// Otherwise painter can get corrupted if Invoke or some other COM method that cause Windows
// messages to be processed is called during an existing paint operation when WM_PAINT is
// also in the queue.
- static bool asyncExposeSet = false;
- if (!asyncExposeSet && QGuiApplication::platformNativeInterface()) {
- QGuiApplication::platformNativeInterface()->setProperty("asyncExpose", QVariant(true));
- asyncExposeSet = true;
- }
+ if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration()))
+ nativeWindowsApp->setAsyncExpose(true);
*ptr = nullptr;