diff options
Diffstat (limited to 'src/plugins/platforms/openwfd')
-rw-r--r-- | src/plugins/platforms/openwfd/qopenwfddevice.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/openwfd/qopenwfdintegration.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/openwfd/qopenwfdintegration.h | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/platforms/openwfd/qopenwfddevice.cpp b/src/plugins/platforms/openwfd/qopenwfddevice.cpp index fb63468725..d3ff6d45d8 100644 --- a/src/plugins/platforms/openwfd/qopenwfddevice.cpp +++ b/src/plugins/platforms/openwfd/qopenwfddevice.cpp @@ -83,8 +83,8 @@ QOpenWFDDevice::QOpenWFDDevice(QOpenWFDIntegration *integration, WFDint device_e } } - int copyFd = wfdDeviceEventGetFD(mDevice,mEvent); - mEventSocketNotifier = new QSocketNotifier(copyFd,QSocketNotifier::Read,this); + int fd = wfdDeviceEventGetFD(mDevice,mEvent); + mEventSocketNotifier = new QSocketNotifier(fd,QSocketNotifier::Read,this); connect(mEventSocketNotifier,SIGNAL(activated(int)),SLOT(readEvents())); mCommitedDevice = true; diff --git a/src/plugins/platforms/openwfd/qopenwfdintegration.cpp b/src/plugins/platforms/openwfd/qopenwfdintegration.cpp index 2494e7f030..63d7b6a31f 100644 --- a/src/plugins/platforms/openwfd/qopenwfdintegration.cpp +++ b/src/plugins/platforms/openwfd/qopenwfdintegration.cpp @@ -63,8 +63,9 @@ QOpenWFDIntegration::QOpenWFDIntegration() : QPlatformIntegration() , mPrinterSupport(new QGenericUnixPrinterSupport) + , mEventDispatcher(createUnixEventDispatcher()) { - QGuiApplicationPrivate::instance()->setEventDispatcher(createEventDispatcher()); + QGuiApplicationPrivate::instance()->setEventDispatcher(mEventDispatcher); int numberOfDevices = wfdEnumerateDevices(0,0,0); WFDint devices[numberOfDevices]; @@ -118,10 +119,9 @@ QPlatformBackingStore *QOpenWFDIntegration::createPlatformBackingStore(QWindow * return new QOpenWFDBackingStore(window); } -QAbstractEventDispatcher *QOpenWFDIntegration::createEventDispatcher() const +QAbstractEventDispatcher *QOpenWFDIntegration::guiThreadEventDispatcher() const { - QAbstractEventDispatcher *eventDispatcher = createUnixEventDispatcher(); - return eventDispatcher; + return mEventDispatcher; } QPlatformFontDatabase *QOpenWFDIntegration::fontDatabase() const diff --git a/src/plugins/platforms/openwfd/qopenwfdintegration.h b/src/plugins/platforms/openwfd/qopenwfdintegration.h index 9b7b5329dc..18d87fd90e 100644 --- a/src/plugins/platforms/openwfd/qopenwfdintegration.h +++ b/src/plugins/platforms/openwfd/qopenwfdintegration.h @@ -62,7 +62,7 @@ public: QPlatformGLContext *createPlatformGLContext(QGuiGLContext *context) const; //This should not be a factory interface, but rather a accessor - QAbstractEventDispatcher *createEventDispatcher() const; + QAbstractEventDispatcher *guiThreadEventDispatcher() const; QPlatformFontDatabase *fontDatabase() const; @@ -78,6 +78,7 @@ private: QPlatformFontDatabase *mFontDatabase; QPlatformNativeInterface *mNativeInterface; QPlatformPrinterSupport *mPrinterSupport; + QAbstractEventDispatcher *mEventDispatcher; }; QT_END_NAMESPACE |