From 8b94ceaff8e67827302a1190ad828cb90cf3b977 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 26 Feb 2016 10:15:43 -0800 Subject: QMacStyle and QCocoaTheme: Fix selected item color for non-native menubar Change-Id: I3b55e9ce896383338cf6ed768d912ca1835b7742 Task-number: QTBUG-28960 Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoasystemsettings.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm index 93f8b2ba6f..48f2f72b7e 100644 --- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm @@ -143,6 +143,7 @@ static QMacPaletteMap mac_widget_colors[] = { QMacPaletteMap(QPlatformTheme::LabelPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive), QMacPaletteMap(QPlatformTheme::GroupBoxPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive), QMacPaletteMap(QPlatformTheme::MenuPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled), + QMacPaletteMap(QPlatformTheme::MenuBarPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled), //### TODO: The zeros below gives white-on-black text. QMacPaletteMap(QPlatformTheme::TextEditPalette, 0, 0), QMacPaletteMap(QPlatformTheme::TextLineEditPalette, 0, 0), @@ -167,7 +168,8 @@ QHash qt_mac_createRolePalettes() pal.setColor(QPalette::Disabled, QPalette::WindowText, qc); pal.setColor(QPalette::Disabled, QPalette::HighlightedText, qc); } - if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette) { + if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette + || mac_widget_colors[i].paletteRole == QPlatformTheme::MenuBarPalette) { qc = qt_mac_colorForTheme(kThemeBrushMenuBackground); pal.setBrush(QPalette::Background, qc); qc = qt_mac_colorForThemeTextColor(kThemeTextColorMenuItemActive); -- cgit v1.2.3 From c2530c7d2005ec734cc310d9122b0bf135120444 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 29 Feb 2016 19:47:57 +0800 Subject: Windows QPA: QWindowsWindow - always treat WM_ERASEBKGND as handled under certain conditions, a WM_ERASEBKGND message is sent, to a window without update region. in this case we declare the message as 'handled' to avoid flickering. Task-number: QTBUG-48235 Change-Id: I2ed27e020db4b54ec93a445cb219de00f38a62fd Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index c0892feabe..e640d38241 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1559,11 +1559,11 @@ void QWindowsWindow::releaseDC() bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message, WPARAM, LPARAM) { + if (message == WM_ERASEBKGND) // Backing store - ignored. + return true; // Ignore invalid update bounding rectangles if (!GetUpdateRect(m_data.hwnd, 0, FALSE)) return false; - if (message == WM_ERASEBKGND) // Backing store - ignored. - return true; PAINTSTRUCT ps; // Observed painting problems with Aero style disabled (QTBUG-7865). -- cgit v1.2.3 From 495e8c205424253186bef47421de63534d23dd59 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Sun, 14 Feb 2016 19:57:23 +0800 Subject: corewlan: avoid unnecessary currentInterface.serviceActive checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit currentInterface.serviceActive is relatively expensive and causes significant spikes in cpu load. Luckily, we can easily memorize the result. Change-Id: Ic7983b63bba5507bc1e34b0644e73365dc44f200 Task-number: QTBUG-45798 Task-number: QTCREATORBUG-15741 Reviewed-by: Tor Arne Vestbø Reviewed-by: Gabriel de Dietrich Reviewed-by: Morten Johan Sørvig --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index 6d16b59d35..d89078465b 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -158,6 +158,7 @@ void QScanThread::run() mutex.lock(); CWInterface *currentInterface = [CWInterface interfaceWithName: QCFString::toNSString(interfaceName)]; mutex.unlock(); + const bool currentInterfaceServiceActive = currentInterface.serviceActive; if (currentInterface.powerOn) { NSError *err = nil; @@ -172,7 +173,7 @@ void QScanThread::run() QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined; bool known = isKnownSsid(networkSsid); - if (currentInterface.serviceActive) { + if (currentInterfaceServiceActive) { if( networkSsid == QCFString::toQString( [currentInterface ssid])) { state = QNetworkConfiguration::Active; } @@ -215,7 +216,7 @@ void QScanThread::run() interfaceName = ij.value(); } - if (currentInterface.serviceActive) { + if (currentInterfaceServiceActive) { if( networkSsid == QCFString::toQString([currentInterface ssid])) { state = QNetworkConfiguration::Active; } -- cgit v1.2.3 From 82b8158022064851ef9151d441241aa4019605c2 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 10 Feb 2016 08:24:50 +0100 Subject: Windows: Extract the suffix from the simple file filter case Since the filter can either be something like "*.txt" or "Text Files (*.txt)" then it should have the suffix default to "txt" in both cases. Change-Id: I36a72f5bf0fb12c84db103f91c4fca94d0d933ae Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 2d75e1720a..ca5b90b429 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1466,18 +1466,21 @@ public: }; // Return the first suffix from the name filter "Foo files (*.foo;*.bar)" -> "foo". +// Also handles the simple name filter case "*.txt" -> "txt" static inline QString suffixFromFilter(const QString &filter) { - int suffixPos = filter.indexOf(QLatin1String("(*.")); + int suffixPos = filter.indexOf(QLatin1String("*.")); if (suffixPos < 0) return QString(); - suffixPos += 3; + suffixPos += 2; int endPos = filter.indexOf(QLatin1Char(' '), suffixPos + 1); if (endPos < 0) endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); if (endPos < 0) endPos = filter.indexOf(QLatin1Char(')'), suffixPos + 1); - return endPos >= 0 ? filter.mid(suffixPos, endPos - suffixPos) : QString(); + if (endPos < 0) + endPos = filter.size(); + return filter.mid(suffixPos, endPos - suffixPos); } void QWindowsNativeSaveFileDialog::setNameFilters(const QStringList &f) -- cgit v1.2.3 From 840831b6116a289ce45377aa5366974e6ec7c0e8 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 4 Mar 2016 11:11:17 +0100 Subject: Cocoa integration - do not invalidate backing store on move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If window is only moving, there is no reason to reset a backing store, otherwise with current expose/flush events machinery it's possible to have glitches while moving a window programmatically. Change-Id: Ia4408bd23388e529ae93617a92ae84304b707ca1 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qnsview.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 05dcbd33ad..cb119e7e0d 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -356,6 +356,8 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; if (m_platformWindow->m_nsWindow && geometry == m_platformWindow->geometry()) return; + const bool isResize = geometry.size() != m_platformWindow->geometry().size(); + // It can happen that self.window is nil (if we are changing // styleMask from/to borderless and content view is being re-parented) // - this results in an invalid coordinates. @@ -385,7 +387,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; // calles, which Qt and Qt applications do not excpect. if (!m_platformWindow->m_inSetGeometry) QWindowSystemInterface::flushWindowSystemEvents(); - else + else if (isResize) m_backingStore = 0; } } -- cgit v1.2.3 From 409151ea2b2a607e96ce7a6462d54b3092d9c617 Mon Sep 17 00:00:00 2001 From: Michael Bruning Date: Fri, 4 Mar 2016 11:36:45 +0100 Subject: [Windows] Blacklist AMD FirePro V5900 cards for angle. They seem to cause crashes on Windows 7 and 8. Change-Id: I6e91a195077313610a79358d6787ed211357b56a Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/openglblacklists/default.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/openglblacklists/default.json b/src/plugins/platforms/windows/openglblacklists/default.json index 767eac161c..f7a8844611 100644 --- a/src/plugins/platforms/windows/openglblacklists/default.json +++ b/src/plugins/platforms/windows/openglblacklists/default.json @@ -78,6 +78,18 @@ "features": [ "disable_rotation" ] + }, + { + "id": 7, + "description": "AMD FirePro V5900 driver causes crashes in Direct3D on Windows.", + "vendor_id": "0x1002", + "device_id": ["0x6707"], + "os": { + "type": "win" + }, + "features": [ + "disable_angle" + ] } ] } -- cgit v1.2.3 From caa82c3518b4a5c09b1de990874190d5d765656f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Thu, 3 Mar 2016 01:43:41 +0100 Subject: xcb: resourceType names must have only small letters Change-Id: I563ae26c9e7e6111399fd0b9af7bfb3ff750b34a Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index dfb0a125e2..f6bd878bde 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -76,7 +76,7 @@ static int resourceType(const QByteArray &key) QByteArrayLiteral("startupid"), QByteArrayLiteral("traywindow"), QByteArrayLiteral("gettimestamp"), QByteArrayLiteral("x11screen"), QByteArrayLiteral("rootwindow"), - QByteArrayLiteral("subpixeltype"), QByteArrayLiteral("antialiasingEnabled"), + QByteArrayLiteral("subpixeltype"), QByteArrayLiteral("antialiasingenabled"), QByteArrayLiteral("nofonthinting"), QByteArrayLiteral("atspibus") }; -- cgit v1.2.3 From 273ddd5b234a5f89f65a41b926378f73701926b9 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 3 Mar 2016 15:26:59 +0100 Subject: DirectWrite: Output correct error code on failure GetLastError() does not return the correct error code for the DirectWrite functions, they are returned by the function itself. Task-number: QTBUG-18711 Change-Id: I3931f58bb29a5f2dc4a5aa911ff16a873267d185 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 05e5af418a..40ea92155a 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1765,14 +1765,14 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, IDWriteFont *directWriteFont = 0; HRESULT hr = data->directWriteGdiInterop->CreateFontFromLOGFONT(&lf, &directWriteFont); if (FAILED(hr)) { - const QString errorString = qt_error_string(int(GetLastError())); + const QString errorString = qt_error_string(int(hr)); qWarning().noquote().nospace() << "DirectWrite: CreateFontFromLOGFONT() failed (" << errorString << ") for " << request << ' ' << lf << " dpi=" << dpi; } else { IDWriteFontFace *directWriteFontFace = NULL; hr = directWriteFont->CreateFontFace(&directWriteFontFace); if (FAILED(hr)) { - const QString errorString = qt_error_string(int(GetLastError())); + const QString errorString = qt_error_string(int(hr)); qWarning().noquote() << "DirectWrite: CreateFontFace() failed (" << errorString << ") for " << request << ' ' << lf << " dpi=" << dpi; } else { -- cgit v1.2.3 From 21c7421d4e86b6048f9c2c7a9a81ec4ff1ed278c Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 4 Mar 2016 11:44:05 +0100 Subject: Fix application fonts with DirectWrite font engine There is no way to add fonts to the system font collection with DirectWrite. Instead you have to write custom collections. But that would mean keeping two instances of the same font data in memory since we are already registering them for the GDI engine, and we have no way of knowing which engine will be used. When we at some point replace the GDI engine completely, we could implement this in the proper way, but for now, instead of looking up the equivalent to the LOGFONT in DirectWrite's system font collection, we look it up using GDI and then convert the HFONT to DirectWrite. [ChangeLog][Windows][Text] Fixed disabling hinting for application fonts, e.g. when automatic scaling by device pixel ratio is in effect. Task-number: QTBUG-18711 Change-Id: I5c1365ab956dfa23d4d687877d7440473ee03bb0 Reviewed-by: Konstantin Ritt Reviewed-by: Friedemann Kleint --- .../platforms/windows/qwindowsfontdatabase.cpp | 27 ++++++---- .../windows/qwindowsfontenginedirectwrite.cpp | 62 +--------------------- .../windows/qwindowsfontenginedirectwrite.h | 2 +- 3 files changed, 19 insertions(+), 72 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 40ea92155a..4be215ec8a 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1762,28 +1762,35 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, lf.lfFaceName[nameSubstituteLength] = 0; } - IDWriteFont *directWriteFont = 0; - HRESULT hr = data->directWriteGdiInterop->CreateFontFromLOGFONT(&lf, &directWriteFont); - if (FAILED(hr)) { - const QString errorString = qt_error_string(int(hr)); - qWarning().noquote().nospace() << "DirectWrite: CreateFontFromLOGFONT() failed (" - << errorString << ") for " << request << ' ' << lf << " dpi=" << dpi; + HFONT hfont = CreateFontIndirect(&lf); + if (!hfont) { + qErrnoWarning("%s: CreateFontIndirect failed", __FUNCTION__); } else { + HGDIOBJ oldFont = SelectObject(data->hdc, hfont); + IDWriteFontFace *directWriteFontFace = NULL; - hr = directWriteFont->CreateFontFace(&directWriteFontFace); + HRESULT hr = data->directWriteGdiInterop->CreateFontFaceFromHdc(data->hdc, &directWriteFontFace); if (FAILED(hr)) { const QString errorString = qt_error_string(int(hr)); - qWarning().noquote() << "DirectWrite: CreateFontFace() failed (" + qWarning().noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed (" << errorString << ") for " << request << ' ' << lf << " dpi=" << dpi; } else { QWindowsFontEngineDirectWrite *fedw = new QWindowsFontEngineDirectWrite(directWriteFontFace, request.pixelSize, data); - fedw->initFontInfo(request, dpi, directWriteFont); + + wchar_t n[64]; + GetTextFace(data->hdc, 64, n); + + QFontDef fontDef = request; + fontDef.family = QString::fromWCharArray(n); + + fedw->initFontInfo(fontDef, dpi); fe = fedw; } - directWriteFont->Release(); + SelectObject(data->hdc, oldFont); + DeleteObject(hfont); } } #endif // QT_NO_DIRECTWRITE diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp index a7de0e1783..16c16fefbe 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp @@ -648,71 +648,11 @@ QFontEngine *QWindowsFontEngineDirectWrite::cloneWithSize(qreal pixelSize) const return fontEngine; } -// Dynamically resolve GetUserDefaultLocaleName, which is available from Windows -// Vista onwards. ### fixme 5.7: Consider reverting to direct linking. -typedef int (WINAPI *GetUserDefaultLocaleNamePtr)(LPWSTR, int); - -static inline GetUserDefaultLocaleNamePtr resolveGetUserDefaultLocaleName() -{ - QSystemLibrary library(QStringLiteral("kernel32")); - return (GetUserDefaultLocaleNamePtr)library.resolve("GetUserDefaultLocaleName"); -} - void QWindowsFontEngineDirectWrite::initFontInfo(const QFontDef &request, - int dpi, IDWriteFont *font) + int dpi) { fontDef = request; - IDWriteFontFamily *fontFamily = NULL; - HRESULT hr = font->GetFontFamily(&fontFamily); - - IDWriteLocalizedStrings *familyNames = NULL; - if (SUCCEEDED(hr)) - hr = fontFamily->GetFamilyNames(&familyNames); - - UINT32 index = 0; - - if (SUCCEEDED(hr)) { - BOOL exists = false; - - wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; - static const GetUserDefaultLocaleNamePtr getUserDefaultLocaleName = resolveGetUserDefaultLocaleName(); - const int defaultLocaleSuccess = getUserDefaultLocaleName - ? getUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH) : 0; - if (defaultLocaleSuccess) - hr = familyNames->FindLocaleName(localeName, &index, &exists); - - if (SUCCEEDED(hr) && !exists) - hr = familyNames->FindLocaleName(L"en-us", &index, &exists); - - if (!exists) - index = 0; - } - - // Get the family name. - if (SUCCEEDED(hr)) { - UINT32 length = 0; - - hr = familyNames->GetStringLength(index, &length); - - if (SUCCEEDED(hr)) { - QVarLengthArray name(length+1); - - hr = familyNames->GetString(index, name.data(), name.size()); - - if (SUCCEEDED(hr)) - fontDef.family = QString::fromWCharArray(name.constData()); - } - } - - if (familyNames != NULL) - familyNames->Release(); - if (fontFamily) - fontFamily->Release(); - - if (FAILED(hr)) - qErrnoWarning(hr, "initFontInfo: Failed to get family name"); - if (fontDef.pointSize < 0) fontDef.pointSize = fontDef.pixelSize * 72. / dpi; else if (fontDef.pixelSize == -1) diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h index 07e040ed33..91de871311 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h @@ -59,7 +59,7 @@ public: const QSharedPointer &d); ~QWindowsFontEngineDirectWrite(); - void initFontInfo(const QFontDef &request, int dpi, IDWriteFont *font); + void initFontInfo(const QFontDef &request, int dpi); QFixed lineThickness() const Q_DECL_OVERRIDE; QFixed underlinePosition() const Q_DECL_OVERRIDE; -- cgit v1.2.3 From 362b977e7c99d47c9c598cef946273089881fd81 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 10 Sep 2015 14:44:52 +0300 Subject: Expose the number of X screen through the QXcbScreenFunctions X screen corresponds to Qt virtual desktop, and RandR output corresponds to QScreen. There can be more than one X screen, so we need a way to get the number of X screen for QScreen, in particular for the right implementation of some methods in QX11Info. Change-Id: Ib5e38703bf11ae08bb283f26a7b7b15f1a5e8671 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 5 +++++ src/plugins/platforms/xcb/qxcbscreen.cpp | 8 ++++++++ src/plugins/platforms/xcb/qxcbscreen.h | 1 + 3 files changed, 14 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index f6bd878bde..96239a0f20 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -48,6 +48,7 @@ #include #include +#include #ifndef QT_NO_DBUS #include "QtPlatformSupport/private/qdbusmenuconnection_p.h" @@ -367,6 +368,10 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio if (function == QXcbWindowFunctions::visualIdIdentifier()) { return QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic)); } + + if (function == QXcbScreenFunctions::virtualDesktopNumberIdentifier()) + return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(QXcbScreen::virtualDesktopNumberStatic)); + return Q_NULLPTR; } diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index 28b1753712..1a90f824fc 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -438,6 +438,14 @@ void QXcbScreen::setOutput(xcb_randr_output_t outputId, // TODO: Send an event to the QScreen instance that the screen changed its name } +int QXcbScreen::virtualDesktopNumberStatic(const QScreen *screen) +{ + if (screen && screen->handle()) + return static_cast(screen->handle())->screenNumber(); + + return 0; +} + /*! \brief handle the XCB screen change event and update properties diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index f4de2b9dfd..7376ddf35c 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -133,6 +133,7 @@ public: bool isPrimary() const { return m_primary; } int screenNumber() const { return m_virtualDesktop->number(); } + static int virtualDesktopNumberStatic(const QScreen *screen); xcb_screen_t *screen() const { return m_virtualDesktop->screen(); } xcb_window_t root() const { return screen()->root; } -- cgit v1.2.3 From d5fde514106f5479f9c929c8a165aced4a1b2c84 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 1 Mar 2016 13:17:13 +0100 Subject: QWheelEvent: make NoScrollPhase opt-in The fix for QTBUG-50199 involves adding an undocumented enum value which can be returned from QWheelEvent::phase(). This will be quite unexpected for applications that use it, which work fine with 5.6.0 and then start receiving this new phase value in 5.6.1. So it should not happen by default. Set the env variable QT_ENABLE_MOUSE_WHEEL_TRACKING to enable this functionality. In 5.7 it will be default behavior. But in 5.6 the default behavior is as it was before: if you use a conventional mouse wheel, the phase stays at ScrollUpdate continuously. [ChangeLog][QtCore] QWheelEvent::phase() returns 0 rather than Qt::ScrollUpdate when the wheel event comes from an actual non-emulated mouse wheel and the environment variable QT_ENABLE_MOUSE_WHEEL_TRACKING is set. In Qt 5.6, this is required to enable the fix for QTBUG-50199. Change-Id: Ieb2152ff767df24c42730d201235d1225aaec832 Reviewed-by: Gabriel de Dietrich Reviewed-by: Shawn Rutledge Reviewed-by: Alex Blasche --- src/plugins/platforms/cocoa/qnsview.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index cb119e7e0d..90a7004938 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1409,6 +1409,8 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) m_scrolling = false; } else if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) { ph = Qt::NoScrollPhase; + if (!QGuiApplicationPrivate::scrollNoPhaseAllowed) + ph = Qt::ScrollUpdate; } QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source); -- cgit v1.2.3 From 00f1c4ac3a0bbaac6996a0192abc3240972a34b5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 22 Feb 2016 20:21:44 -0800 Subject: Silence the warning: Unhandled client message: "_GTK_LOAD_ICONTHEMES" Qt Creator keeps printing that warning. Change-Id: I0c94a5c2846b48c8aea7ffff1435775f04234656 Reviewed-by: Shawn Rutledge Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbconnection.cpp | 4 +++- src/plugins/platforms/xcb/qxcbconnection.h | 1 + src/plugins/platforms/xcb/qxcbwindow.cpp | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index b9f6df1104..05c02249cc 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1954,7 +1954,9 @@ static const char * xcb_atomnames = { "_COMPIZ_DECOR_PENDING\0" "_COMPIZ_DECOR_REQUEST\0" "_COMPIZ_DECOR_DELETE_PIXMAP\0" - "_COMPIZ_TOOLKIT_ACTION\0" // \0\0 terminates loop. + "_COMPIZ_TOOLKIT_ACTION\0" + "_GTK_LOAD_ICONTHEMES\0" + // \0\0 terminates loop. }; QXcbAtom::Atom QXcbConnection::qatom(xcb_atom_t xatom) const diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index b799e46a36..47ef173cf4 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -288,6 +288,7 @@ namespace QXcbAtom { _COMPIZ_DECOR_REQUEST, _COMPIZ_DECOR_DELETE_PIXMAP, _COMPIZ_TOOLKIT_ACTION, + _GTK_LOAD_ICONTHEMES, NPredefinedAtoms, diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 7eae2d92ab..bfbc38e4c2 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -2033,8 +2033,9 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even } else if (event->type == atom(QXcbAtom::_COMPIZ_DECOR_PENDING) || event->type == atom(QXcbAtom::_COMPIZ_DECOR_REQUEST) || event->type == atom(QXcbAtom::_COMPIZ_DECOR_DELETE_PIXMAP) - || event->type == atom(QXcbAtom::_COMPIZ_TOOLKIT_ACTION)) { - //silence the _COMPIZ messages for now + || event->type == atom(QXcbAtom::_COMPIZ_TOOLKIT_ACTION) + || event->type == atom(QXcbAtom::_GTK_LOAD_ICONTHEMES)) { + //silence the _COMPIZ and _GTK messages for now } else { qWarning() << "QXcbWindow: Unhandled client message:" << connection()->atomName(event->type); } -- cgit v1.2.3 From a28364bc1c7144b9c5c383cc5d18d62a68076a38 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Feb 2016 16:03:42 +0100 Subject: consistently put {qt,qml}_{module,plugin} at the end of project files this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann --- src/plugins/bearer/android/src/src.pro | 8 ++++---- src/plugins/bearer/blackberry/blackberry.pro | 8 ++++---- src/plugins/bearer/connman/connman.pro | 7 +++---- src/plugins/bearer/corewlan/corewlan.pro | 8 ++++---- src/plugins/bearer/generic/generic.pro | 8 ++++---- src/plugins/bearer/nativewifi/nativewifi.pro | 8 ++++---- src/plugins/bearer/networkmanager/networkmanager.pro | 8 ++++---- src/plugins/bearer/nla/nla.pro | 8 ++++---- src/plugins/generic/evdevkeyboard/evdevkeyboard.pro | 9 ++++----- src/plugins/generic/evdevmouse/evdevmouse.pro | 9 ++++----- src/plugins/generic/evdevtablet/evdevtablet.pro | 10 +++++----- src/plugins/generic/evdevtouch/evdevtouch.pro | 9 ++++----- src/plugins/generic/libinput/libinput.pro | 10 +++++----- src/plugins/generic/tslib/tslib.pro | 10 +++++----- src/plugins/generic/tuiotouch/tuiotouch.pro | 10 +++++----- src/plugins/imageformats/gif/gif.pro | 8 ++++---- src/plugins/imageformats/ico/ico.pro | 8 ++++---- src/plugins/imageformats/jpeg/jpeg.pro | 8 ++++---- src/plugins/platforminputcontexts/compose/compose.pro | 10 +++++----- src/plugins/platforminputcontexts/ibus/ibus.pro | 10 +++++----- src/plugins/platforms/android/android.pro | 7 +++---- src/plugins/platforms/cocoa/cocoa.pro | 10 +++++----- src/plugins/platforms/direct2d/direct2d.pro | 10 +++++----- src/plugins/platforms/directfb/directfb.pro | 10 +++++----- .../eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro | 8 ++++---- .../platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro | 8 ++++---- .../eglfs_kms_egldevice/eglfs_kms_egldevice.pro | 8 ++++---- .../eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro | 8 ++++---- .../platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro | 8 ++++---- .../eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro | 8 ++++---- .../platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro | 8 ++++---- src/plugins/platforms/eglfs/eglfs-plugin.pro | 10 +++++----- src/plugins/platforms/eglfs/eglfs_device_lib.pro | 4 ++-- src/plugins/platforms/haiku/haiku.pro | 7 ++++--- src/plugins/platforms/ios/ios.pro | 10 +++++----- src/plugins/platforms/linuxfb/linuxfb.pro | 10 +++++----- src/plugins/platforms/minimal/minimal.pro | 10 +++++----- src/plugins/platforms/minimalegl/minimalegl.pro | 10 +++++----- src/plugins/platforms/mirclient/mirclient.pro | 10 +++++----- src/plugins/platforms/offscreen/offscreen.pro | 10 +++++----- src/plugins/platforms/openwfd/openwf.pro | 9 ++++----- src/plugins/platforms/windows/windows.pro | 10 +++++----- src/plugins/platforms/winrt/winrt.pro | 11 ++++++----- src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro | 9 ++++----- src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro | 9 ++++----- src/plugins/platforms/xcb/xcb-plugin.pro | 9 ++++----- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 3 +-- src/plugins/platformthemes/gtk2/gtk2.pro | 10 +++++----- src/plugins/printsupport/cocoa/cocoa.pro | 7 ++++--- src/plugins/printsupport/cups/cups.pro | 7 ++++--- src/plugins/printsupport/windows/windows.pro | 7 ++++--- src/plugins/styles/bb10style/bb10style.pro | 7 +++---- 52 files changed, 220 insertions(+), 226 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/android/src/src.pro b/src/plugins/bearer/android/src/src.pro index 1050601896..77c95a0b38 100644 --- a/src/plugins/bearer/android/src/src.pro +++ b/src/plugins/bearer/android/src/src.pro @@ -2,10 +2,6 @@ include(wrappers/wrappers.pri) TARGET = qandroidbearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QAndroidBearerEnginePlugin -load(qt_plugin) - QT = core-private network-private HEADERS += qandroidbearerengine.h \ @@ -15,3 +11,7 @@ HEADERS += qandroidbearerengine.h \ SOURCES += main.cpp \ qandroidbearerengine.cpp \ ../../qnetworksession_impl.cpp + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QAndroidBearerEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/blackberry/blackberry.pro b/src/plugins/bearer/blackberry/blackberry.pro index c75de3aaad..031b598482 100644 --- a/src/plugins/bearer/blackberry/blackberry.pro +++ b/src/plugins/bearer/blackberry/blackberry.pro @@ -1,9 +1,5 @@ TARGET = qbbbearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QBBEnginePlugin -load(qt_plugin) - QT = core-private network-private # Uncomment this to enable debugging output for the plugin @@ -18,3 +14,7 @@ SOURCES += qbbengine.cpp \ main.cpp OTHER_FILES += blackberry.json + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QBBEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro index efa13a6ebd..9f3fff304b 100644 --- a/src/plugins/bearer/connman/connman.pro +++ b/src/plugins/bearer/connman/connman.pro @@ -1,9 +1,5 @@ TARGET = qconnmanbearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QConnmanEnginePlugin -load(qt_plugin) - QT = core network-private dbus CONFIG += link_pkgconfig @@ -21,3 +17,6 @@ SOURCES += main.cpp \ OTHER_FILES += connman.json +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QConnmanEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro index 674af0cbbe..ab0257aecd 100644 --- a/src/plugins/bearer/corewlan/corewlan.pro +++ b/src/plugins/bearer/corewlan/corewlan.pro @@ -1,9 +1,5 @@ TARGET = qcorewlanbearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QCoreWlanEnginePlugin -load(qt_plugin) - QT = core-private network-private LIBS += -framework Foundation -framework SystemConfiguration @@ -21,3 +17,7 @@ SOURCES += main.cpp \ OBJECTIVE_SOURCES += qcorewlanengine.mm OTHER_FILES += corewlan.json + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QCoreWlanEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/generic/generic.pro b/src/plugins/bearer/generic/generic.pro index d0e17380e3..f71a901341 100644 --- a/src/plugins/bearer/generic/generic.pro +++ b/src/plugins/bearer/generic/generic.pro @@ -1,9 +1,5 @@ TARGET = qgenericbearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QGenericEnginePlugin -load(qt_plugin) - QT = core-private network-private HEADERS += qgenericengine.h \ @@ -15,3 +11,7 @@ SOURCES += qgenericengine.cpp \ main.cpp OTHER_FILES += generic.json + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QGenericEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/nativewifi/nativewifi.pro b/src/plugins/bearer/nativewifi/nativewifi.pro index e372c8ca05..da7f2da353 100644 --- a/src/plugins/bearer/nativewifi/nativewifi.pro +++ b/src/plugins/bearer/nativewifi/nativewifi.pro @@ -1,9 +1,5 @@ TARGET = qnativewifibearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QNativeWifiEnginePlugin -load(qt_plugin) - QT = core-private network-private HEADERS += qnativewifiengine.h \ @@ -16,3 +12,7 @@ SOURCES += main.cpp \ ../qnetworksession_impl.cpp OTHER_FILES += nativewifi.json + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QNativeWifiEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro index b3a270615c..e71c93f66f 100644 --- a/src/plugins/bearer/networkmanager/networkmanager.pro +++ b/src/plugins/bearer/networkmanager/networkmanager.pro @@ -1,9 +1,5 @@ TARGET = qnmbearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QNetworkManagerEnginePlugin -load(qt_plugin) - QT = core network-private dbus HEADERS += qnetworkmanagerservice.h \ @@ -19,3 +15,7 @@ SOURCES += main.cpp \ ../qnetworksession_impl.cpp OTHER_FILES += networkmanager.json + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QNetworkManagerEnginePlugin +load(qt_plugin) diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro index bac7608477..32ff5446e5 100644 --- a/src/plugins/bearer/nla/nla.pro +++ b/src/plugins/bearer/nla/nla.pro @@ -1,9 +1,5 @@ TARGET = qnlabearer -PLUGIN_TYPE = bearer -PLUGIN_CLASS_NAME = QNlaEnginePlugin -load(qt_plugin) - QT = core core-private network network-private !wince* { @@ -22,3 +18,7 @@ SOURCES += main.cpp \ ../qnetworksession_impl.cpp OTHER_FILES += nla.json + +PLUGIN_TYPE = bearer +PLUGIN_CLASS_NAME = QNlaEnginePlugin +load(qt_plugin) diff --git a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro index 101ea30bcc..d23ad3bad0 100644 --- a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro +++ b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro @@ -1,10 +1,5 @@ TARGET = qevdevkeyboardplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QEvdevKeyboardPlugin -load(qt_plugin) - QT += core-private platformsupport-private gui-private SOURCES = main.cpp @@ -12,3 +7,7 @@ SOURCES = main.cpp OTHER_FILES += \ evdevkeyboard.json +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QEvdevKeyboardPlugin +load(qt_plugin) diff --git a/src/plugins/generic/evdevmouse/evdevmouse.pro b/src/plugins/generic/evdevmouse/evdevmouse.pro index 57a67ead8d..1a0bc08853 100644 --- a/src/plugins/generic/evdevmouse/evdevmouse.pro +++ b/src/plugins/generic/evdevmouse/evdevmouse.pro @@ -1,10 +1,5 @@ TARGET = qevdevmouseplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QEvdevMousePlugin -load(qt_plugin) - QT += core-private platformsupport-private gui-private SOURCES = main.cpp @@ -12,3 +7,7 @@ SOURCES = main.cpp OTHER_FILES += \ evdevmouse.json +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QEvdevMousePlugin +load(qt_plugin) diff --git a/src/plugins/generic/evdevtablet/evdevtablet.pro b/src/plugins/generic/evdevtablet/evdevtablet.pro index 8ffc0db84d..aaf0ef4c67 100644 --- a/src/plugins/generic/evdevtablet/evdevtablet.pro +++ b/src/plugins/generic/evdevtablet/evdevtablet.pro @@ -1,13 +1,13 @@ TARGET = qevdevtabletplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QEvdevTabletPlugin -load(qt_plugin) - SOURCES = main.cpp QT += core-private platformsupport-private gui-private OTHER_FILES += \ evdevtablet.json + +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QEvdevTabletPlugin +load(qt_plugin) diff --git a/src/plugins/generic/evdevtouch/evdevtouch.pro b/src/plugins/generic/evdevtouch/evdevtouch.pro index 1f4d1b7e93..4d61db4eb0 100644 --- a/src/plugins/generic/evdevtouch/evdevtouch.pro +++ b/src/plugins/generic/evdevtouch/evdevtouch.pro @@ -1,10 +1,5 @@ TARGET = qevdevtouchplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QEvdevTouchScreenPlugin -load(qt_plugin) - SOURCES = main.cpp QT += core-private platformsupport-private gui-private @@ -12,3 +7,7 @@ QT += core-private platformsupport-private gui-private OTHER_FILES += \ evdevtouch.json +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QEvdevTouchScreenPlugin +load(qt_plugin) diff --git a/src/plugins/generic/libinput/libinput.pro b/src/plugins/generic/libinput/libinput.pro index 17dbb23ef0..335605d354 100644 --- a/src/plugins/generic/libinput/libinput.pro +++ b/src/plugins/generic/libinput/libinput.pro @@ -1,12 +1,12 @@ TARGET = qlibinputplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QLibInputPlugin -load(qt_plugin) - QT += core-private platformsupport-private gui-private SOURCES = main.cpp OTHER_FILES = libinput.json + +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QLibInputPlugin +load(qt_plugin) diff --git a/src/plugins/generic/tslib/tslib.pro b/src/plugins/generic/tslib/tslib.pro index be6fc4fbea..200d231cc8 100644 --- a/src/plugins/generic/tslib/tslib.pro +++ b/src/plugins/generic/tslib/tslib.pro @@ -1,10 +1,5 @@ TARGET = qtslibplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QTsLibPlugin -load(qt_plugin) - SOURCES = main.cpp QT += gui-private platformsupport-private @@ -12,3 +7,8 @@ QT += gui-private platformsupport-private LIBS += -lts OTHER_FILES += tslib.json + +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QTsLibPlugin +load(qt_plugin) diff --git a/src/plugins/generic/tuiotouch/tuiotouch.pro b/src/plugins/generic/tuiotouch/tuiotouch.pro index 5e53403f5b..ae2ccde058 100644 --- a/src/plugins/generic/tuiotouch/tuiotouch.pro +++ b/src/plugins/generic/tuiotouch/tuiotouch.pro @@ -1,10 +1,5 @@ TARGET = qtuiotouchplugin -PLUGIN_TYPE = generic -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QTuioTouchPlugin -load(qt_plugin) - QT += \ core-private \ gui-private \ @@ -24,3 +19,8 @@ HEADERS += \ OTHER_FILES += \ tuiotouch.json + +PLUGIN_TYPE = generic +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QTuioTouchPlugin +load(qt_plugin) diff --git a/src/plugins/imageformats/gif/gif.pro b/src/plugins/imageformats/gif/gif.pro index 2a5048bb1c..a361bc2532 100644 --- a/src/plugins/imageformats/gif/gif.pro +++ b/src/plugins/imageformats/gif/gif.pro @@ -1,11 +1,11 @@ TARGET = qgif -PLUGIN_TYPE = imageformats -PLUGIN_CLASS_NAME = QGifPlugin -load(qt_plugin) - include(../../../gui/image/qgifhandler.pri) INCLUDEPATH += ../../../gui/image SOURCES += $$PWD/main.cpp HEADERS += $$PWD/main.h OTHER_FILES += gif.json + +PLUGIN_TYPE = imageformats +PLUGIN_CLASS_NAME = QGifPlugin +load(qt_plugin) diff --git a/src/plugins/imageformats/ico/ico.pro b/src/plugins/imageformats/ico/ico.pro index 4250fcb4bc..60afdaed70 100644 --- a/src/plugins/imageformats/ico/ico.pro +++ b/src/plugins/imageformats/ico/ico.pro @@ -1,12 +1,12 @@ TARGET = qico -PLUGIN_TYPE = imageformats -PLUGIN_CLASS_NAME = QICOPlugin -load(qt_plugin) - QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-ico)" HEADERS += qicohandler.h main.h SOURCES += main.cpp \ qicohandler.cpp OTHER_FILES += ico.json + +PLUGIN_TYPE = imageformats +PLUGIN_CLASS_NAME = QICOPlugin +load(qt_plugin) diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index e33fde1cdb..526556179c 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -1,9 +1,5 @@ TARGET = qjpeg -PLUGIN_TYPE = imageformats -PLUGIN_CLASS_NAME = QJpegPlugin -load(qt_plugin) - QT += core-private QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)" @@ -13,3 +9,7 @@ INCLUDEPATH += ../../../gui/image SOURCES += main.cpp HEADERS += main.h OTHER_FILES += jpeg.json + +PLUGIN_TYPE = imageformats +PLUGIN_CLASS_NAME = QJpegPlugin +load(qt_plugin) diff --git a/src/plugins/platforminputcontexts/compose/compose.pro b/src/plugins/platforminputcontexts/compose/compose.pro index a4b5280e64..86bdd4729b 100644 --- a/src/plugins/platforminputcontexts/compose/compose.pro +++ b/src/plugins/platforminputcontexts/compose/compose.pro @@ -1,10 +1,5 @@ TARGET = composeplatforminputcontextplugin -PLUGIN_TYPE = platforminputcontexts -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin -load(qt_plugin) - QT += core-private gui-private DEFINES += X11_PREFIX='\\"$$QMAKE_X11_PREFIX\\"' @@ -27,3 +22,8 @@ contains(QT_CONFIG, xkbcommon-qt): { } OTHER_FILES += $$PWD/compose.json + +PLUGIN_TYPE = platforminputcontexts +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin +load(qt_plugin) diff --git a/src/plugins/platforminputcontexts/ibus/ibus.pro b/src/plugins/platforminputcontexts/ibus/ibus.pro index 401be6d42f..9f6c848e6a 100644 --- a/src/plugins/platforminputcontexts/ibus/ibus.pro +++ b/src/plugins/platforminputcontexts/ibus/ibus.pro @@ -1,10 +1,5 @@ TARGET = ibusplatforminputcontextplugin -PLUGIN_TYPE = platforminputcontexts -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin -load(qt_plugin) - QT += dbus gui-private SOURCES += $$PWD/qibusplatforminputcontext.cpp \ $$PWD/qibusproxy.cpp \ @@ -18,3 +13,8 @@ HEADERS += $$PWD/qibusplatforminputcontext.h \ $$PWD/qibustypes.h OTHER_FILES += $$PWD/ibus.json + +PLUGIN_TYPE = platforminputcontexts +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/android/android.pro b/src/plugins/platforms/android/android.pro index 3ba817bf5b..045e55ec65 100644 --- a/src/plugins/platforms/android/android.pro +++ b/src/plugins/platforms/android/android.pro @@ -1,13 +1,9 @@ TARGET = qtforandroid -PLUGIN_TYPE = platforms - # STATICPLUGIN needed because there's a Q_IMPORT_PLUGIN in androidjnimain.cpp # Yes, the plugin imports itself statically DEFINES += QT_STATICPLUGIN -load(qt_plugin) - LIBS += -ljnigraphics -landroid QT += core-private gui-private platformsupport-private @@ -79,6 +75,9 @@ HEADERS += $$PWD/qandroidplatformintegration.h \ android-style-assets: SOURCES += $$PWD/extract.cpp else: SOURCES += $$PWD/extract-dummy.cpp +PLUGIN_TYPE = platforms +load(qt_plugin) + #Non-standard install directory, QTBUG-29859 DESTDIR = $$DESTDIR/android target.path = $${target.path}/android diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index ba0e6b001a..05d0bb4094 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -1,10 +1,5 @@ TARGET = qcocoa -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - OBJECTIVE_SOURCES += main.mm \ qcocoaintegration.mm \ qcocoatheme.mm \ @@ -112,3 +107,8 @@ OTHER_FILES += cocoa.json # Window debug support #DEFINES += QT_COCOA_ENABLE_WINDOW_DEBUG + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro index 8f2ccc3aa6..005a4da6db 100644 --- a/src/plugins/platforms/direct2d/direct2d.pro +++ b/src/plugins/platforms/direct2d/direct2d.pro @@ -1,10 +1,5 @@ TARGET = qdirect2d -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QWindowsDirect2DIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT *= core-private QT *= gui-private QT *= platformsupport-private @@ -40,3 +35,8 @@ HEADERS += \ qwindowsdirect2dwindow.h OTHER_FILES += direct2d.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QWindowsDirect2DIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/directfb/directfb.pro b/src/plugins/platforms/directfb/directfb.pro index 89d8d42cea..5c81e0283a 100644 --- a/src/plugins/platforms/directfb/directfb.pro +++ b/src/plugins/platforms/directfb/directfb.pro @@ -1,10 +1,5 @@ TARGET = qdirectfb -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QDirectFbIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private LIBS += $$QMAKE_LIBS_DIRECTFB @@ -51,3 +46,8 @@ contains(QT_CONFIG, directfb_egl) { CONFIG += qpa/genericunixfontdatabase OTHER_FILES += directfb.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QDirectFbIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro index 2026b6a6c6..e2ebf9f7ee 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-brcm-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSBrcmIntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. @@ -21,3 +17,7 @@ SOURCES += $$PWD/qeglfsbrcmmain.cpp \ HEADERS += $$PWD/qeglfsbrcmintegration.h OTHER_FILES += $$PWD/eglfs_brcm.json + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSBrcmIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro index e53793ce54..12ae0a13b1 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-kms-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSKmsIntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. @@ -29,3 +25,7 @@ HEADERS += $$PWD/qeglfskmsintegration.h \ $$PWD/qeglfskmscursor.h OTHER_FILES += $$PWD/eglfs_kms.json + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSKmsIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro index 393ddd14a5..1932f861b9 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-kms-egldevice-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSKmsEglDeviceIntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. @@ -21,3 +17,7 @@ HEADERS += $$PWD/qeglfskmsegldeviceintegration.h OTHER_FILES += $$PWD/eglfs_kms_egldevice.json LIBS += -ldrm + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSKmsEglDeviceIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro index 33f219db96..7fc4568ae3 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-mali-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSMaliIntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private # Avoid X11 header collision @@ -19,3 +15,7 @@ SOURCES += $$PWD/qeglfsmalimain.cpp \ HEADERS += $$PWD/qeglfsmaliintegration.h OTHER_FILES += $$PWD/eglfs_mali.json + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSMaliIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro index fc0533127c..6fac2f529a 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-viv-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. @@ -18,3 +14,7 @@ SOURCES += $$PWD/qeglfsvivmain.cpp \ HEADERS += $$PWD/qeglfsvivintegration.h OTHER_FILES += $$PWD/eglfs_viv.json + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro index 26b6a2e9ea..44f75c40e0 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-viv-wl-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. @@ -21,3 +17,7 @@ OTHER_FILES += $$PWD/eglfs_viv_wl.json CONFIG += link_pkgconfig PKGCONFIG_PRIVATE += wayland-server + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro index 86fefac8aa..83f0c74910 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro @@ -1,9 +1,5 @@ TARGET = qeglfs-x11-integration -PLUGIN_TYPE = egldeviceintegrations -PLUGIN_CLASS_NAME = QEglFSX11IntegrationPlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private eglfs_device_lib-private # Avoid X11 header collision @@ -21,3 +17,7 @@ SOURCES += $$PWD/qeglfsx11main.cpp \ HEADERS += $$PWD/qeglfsx11integration.h OTHER_FILES += $$PWD/eglfs_x11.json + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSX11IntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/eglfs-plugin.pro b/src/plugins/platforms/eglfs/eglfs-plugin.pro index 0f493fdc01..a628cdccd9 100644 --- a/src/plugins/platforms/eglfs/eglfs-plugin.pro +++ b/src/plugins/platforms/eglfs/eglfs-plugin.pro @@ -1,12 +1,12 @@ TARGET = qeglfs -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += platformsupport-private eglfs_device_lib-private SOURCES += $$PWD/qeglfsmain.cpp OTHER_FILES += $$PWD/eglfs.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/eglfs/eglfs_device_lib.pro b/src/plugins/platforms/eglfs/eglfs_device_lib.pro index 4fe2ce4897..f784020fb6 100644 --- a/src/plugins/platforms/eglfs/eglfs_device_lib.pro +++ b/src/plugins/platforms/eglfs/eglfs_device_lib.pro @@ -6,8 +6,6 @@ TARGET = QtEglDeviceIntegration CONFIG += no_module_headers internal_module -load(qt_module) - QT += core-private gui-private platformsupport-private LIBS += $$QMAKE_LIBS_DYNLOAD @@ -52,3 +50,5 @@ INCLUDEPATH += $$PWD CONFIG += egl qpa/genericunixfontdatabase !contains(DEFINES, QT_NO_CURSOR): RESOURCES += $$PWD/cursor.qrc + +load(qt_module) diff --git a/src/plugins/platforms/haiku/haiku.pro b/src/plugins/platforms/haiku/haiku.pro index 87f31997a3..ea5bb632db 100644 --- a/src/plugins/platforms/haiku/haiku.pro +++ b/src/plugins/platforms/haiku/haiku.pro @@ -1,7 +1,4 @@ TARGET = qhaiku -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QHaikuIntegrationPlugin -load(qt_plugin) QT += platformsupport-private core-private gui-private @@ -40,3 +37,7 @@ LIBS += -lbe OTHER_FILES += haiku.json include (../../../platformsupport/fontdatabases/fontdatabases.pri) + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QHaikuIntegrationPlugin +load(qt_plugin) diff --git a/src/plugins/platforms/ios/ios.pro b/src/plugins/platforms/ios/ios.pro index bf7849b740..545db8c093 100644 --- a/src/plugins/platforms/ios/ios.pro +++ b/src/plugins/platforms/ios/ios.pro @@ -1,10 +1,5 @@ TARGET = qios -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QIOSIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private LIBS += -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary @@ -59,3 +54,8 @@ HEADERS = \ OTHER_FILES = \ quiview_textinput.mm \ quiview_accessibility.mm + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QIOSIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/linuxfb/linuxfb.pro b/src/plugins/platforms/linuxfb/linuxfb.pro index 389d45c29c..b5de192346 100644 --- a/src/plugins/platforms/linuxfb/linuxfb.pro +++ b/src/plugins/platforms/linuxfb/linuxfb.pro @@ -1,10 +1,5 @@ TARGET = qlinuxfb -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QLinuxFbIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private SOURCES = main.cpp qlinuxfbintegration.cpp qlinuxfbscreen.cpp @@ -13,3 +8,8 @@ HEADERS = qlinuxfbintegration.h qlinuxfbscreen.h CONFIG += qpa/genericunixfontdatabase OTHER_FILES += linuxfb.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QLinuxFbIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index 3ed4d2cdde..d6914026ae 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -1,10 +1,5 @@ TARGET = qminimal -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private SOURCES = main.cpp \ @@ -14,3 +9,8 @@ HEADERS = qminimalintegration.h \ qminimalbackingstore.h OTHER_FILES += minimal.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/minimalegl/minimalegl.pro b/src/plugins/platforms/minimalegl/minimalegl.pro index e78dcb8bc5..ac67249591 100644 --- a/src/plugins/platforms/minimalegl/minimalegl.pro +++ b/src/plugins/platforms/minimalegl/minimalegl.pro @@ -1,10 +1,5 @@ TARGET = qminimalegl -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QMinimalEglIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private #DEFINES += QEGL_EXTRA_DEBUG @@ -29,3 +24,8 @@ CONFIG += egl qpa/genericunixfontdatabase OTHER_FILES += \ minimalegl.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QMinimalEglIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/mirclient/mirclient.pro b/src/plugins/platforms/mirclient/mirclient.pro index 0851e8d719..4ea5593478 100644 --- a/src/plugins/platforms/mirclient/mirclient.pro +++ b/src/plugins/platforms/mirclient/mirclient.pro @@ -1,11 +1,6 @@ TARGET = mirclient TEMPLATE = lib -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = MirServerIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private dbus CONFIG += qpa/genericunixfontdatabase @@ -47,3 +42,8 @@ HEADERS = \ qmirclientscreen.h \ qmirclienttheme.h \ qmirclientwindow.h + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = MirServerIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro index 94eeac6acc..999550a7e1 100644 --- a/src/plugins/platforms/offscreen/offscreen.pro +++ b/src/plugins/platforms/offscreen/offscreen.pro @@ -1,10 +1,5 @@ TARGET = qoffscreen -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QOffscreenIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private SOURCES = main.cpp \ @@ -25,3 +20,8 @@ contains(QT_CONFIG, xlib):contains(QT_CONFIG, opengl):!contains(QT_CONFIG, openg } else { SOURCES += qoffscreenintegration_dummy.cpp } + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QOffscreenIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/openwfd/openwf.pro b/src/plugins/platforms/openwfd/openwf.pro index 38bac057bd..152e4f57d7 100644 --- a/src/plugins/platforms/openwfd/openwf.pro +++ b/src/plugins/platforms/openwfd/openwf.pro @@ -1,10 +1,5 @@ TARGET = qopenwf -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QOpenWFDIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private CONFIG += qpa/genericunixfontdatabase @@ -38,3 +33,7 @@ SOURCES += \ LIBS += -lWFD -lgbm -lGLESv2 -lEGL +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QOpenWFDIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index cc0373c077..2e0f723693 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -1,10 +1,5 @@ TARGET = qwindows -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QWindowsIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT *= core-private QT *= gui-private QT *= platformsupport-private @@ -25,3 +20,8 @@ HEADERS += \ qwindowsgdinativeinterface.h OTHER_FILES += windows.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QWindowsIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/winrt/winrt.pro b/src/plugins/platforms/winrt/winrt.pro index 991ec1789b..261295ef0b 100644 --- a/src/plugins/platforms/winrt/winrt.pro +++ b/src/plugins/platforms/winrt/winrt.pro @@ -1,10 +1,6 @@ TARGET = qwinrt -CONFIG -= precompile_header -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QWinRTIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) +CONFIG -= precompile_header QT += core-private gui-private platformsupport-private @@ -50,3 +46,8 @@ HEADERS = \ qwinrtwindow.h OTHER_FILES += winrt.json + +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QWinRTIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro index 28a572a2c9..6d52332bad 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro @@ -1,10 +1,5 @@ TARGET = qxcb-egl-integration -PLUGIN_CLASS_NAME = QXcbEglIntegrationPlugin -PLUGIN_TYPE = xcbglintegrations - -load(qt_plugin) - include(../gl_integrations_plugin_base.pri) CONFIG += egl @@ -22,3 +17,7 @@ SOURCES += \ qxcbeglwindow.cpp \ qxcbeglmain.cpp \ qxcbeglnativeinterfacehandler.cpp + +PLUGIN_CLASS_NAME = QXcbEglIntegrationPlugin +PLUGIN_TYPE = xcbglintegrations +load(qt_plugin) diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro index 1c577e5dc9..67fd68765a 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro @@ -1,10 +1,5 @@ TARGET = qxcb-glx-integration -PLUGIN_CLASS_NAME = QXcbGlxIntegrationPlugin -PLUGIN_TYPE = xcbglintegrations - -load(qt_plugin) - include(../gl_integrations_plugin_base.pri) #should be removed from the sources @@ -31,3 +26,7 @@ SOURCES += \ qxcbglxwindow.cpp \ qglxintegration.cpp \ qxcbglxnativeinterfacehandler.cpp + +PLUGIN_CLASS_NAME = QXcbGlxIntegrationPlugin +PLUGIN_TYPE = xcbglintegrations +load(qt_plugin) diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro index 09ab1ad77a..75684a769b 100644 --- a/src/plugins/platforms/xcb/xcb-plugin.pro +++ b/src/plugins/platforms/xcb/xcb-plugin.pro @@ -1,13 +1,12 @@ TARGET = qxcb -PLUGIN_TYPE = platforms -PLUGIN_CLASS_NAME = QXcbIntegrationPlugin -!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - -load(qt_plugin) - QT += core-private gui-private platformsupport-private xcb_qpa_lib-private SOURCES = \ qxcbmain.cpp OTHER_FILES += xcb.json README +PLUGIN_TYPE = platforms +PLUGIN_CLASS_NAME = QXcbIntegrationPlugin +!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index 302d87e007..f4a4e5a78a 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -1,8 +1,6 @@ TARGET = QtXcbQpa CONFIG += no_module_headers internal_module -load(qt_module) - QT += core-private gui-private platformsupport-private SOURCES = \ @@ -105,3 +103,4 @@ contains(QT_CONFIG, xkbcommon-qt) { QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON } +load(qt_module) diff --git a/src/plugins/platformthemes/gtk2/gtk2.pro b/src/plugins/platformthemes/gtk2/gtk2.pro index 73c156f82b..1c434e1d4d 100644 --- a/src/plugins/platformthemes/gtk2/gtk2.pro +++ b/src/plugins/platformthemes/gtk2/gtk2.pro @@ -1,10 +1,5 @@ TARGET = qgtk2 -PLUGIN_TYPE = platformthemes -PLUGIN_EXTENDS = - -PLUGIN_CLASS_NAME = QGtk2ThemePlugin -load(qt_plugin) - QT += core-private gui-private platformsupport-private CONFIG += X11 @@ -19,3 +14,8 @@ SOURCES += \ main.cpp \ qgtk2dialoghelpers.cpp \ qgtk2theme.cpp \ + +PLUGIN_TYPE = platformthemes +PLUGIN_EXTENDS = - +PLUGIN_CLASS_NAME = QGtk2ThemePlugin +load(qt_plugin) diff --git a/src/plugins/printsupport/cocoa/cocoa.pro b/src/plugins/printsupport/cocoa/cocoa.pro index a3b9e2dfcf..feed33a231 100644 --- a/src/plugins/printsupport/cocoa/cocoa.pro +++ b/src/plugins/printsupport/cocoa/cocoa.pro @@ -1,8 +1,5 @@ TARGET = cocoaprintersupport MODULE = cocoaprintersupport -PLUGIN_TYPE = printsupport -PLUGIN_CLASS_NAME = QCocoaPrinterSupportPlugin -load(qt_plugin) QT += gui-private printsupport-private LIBS += -framework Cocoa @@ -10,3 +7,7 @@ LIBS += -framework Cocoa SOURCES += main.cpp OTHER_FILES += cocoa.json + +PLUGIN_TYPE = printsupport +PLUGIN_CLASS_NAME = QCocoaPrinterSupportPlugin +load(qt_plugin) diff --git a/src/plugins/printsupport/cups/cups.pro b/src/plugins/printsupport/cups/cups.pro index cdbb08b10a..757408e7f7 100644 --- a/src/plugins/printsupport/cups/cups.pro +++ b/src/plugins/printsupport/cups/cups.pro @@ -1,8 +1,5 @@ TARGET = cupsprintersupport MODULE = cupsprintersupport -PLUGIN_TYPE = printsupport -PLUGIN_CLASS_NAME = QCupsPrinterSupportPlugin -load(qt_plugin) QT += core-private gui-private printsupport printsupport-private @@ -20,3 +17,7 @@ HEADERS += qcupsprintersupport_p.h \ qcupsprintengine_p.h OTHER_FILES += cups.json + +PLUGIN_TYPE = printsupport +PLUGIN_CLASS_NAME = QCupsPrinterSupportPlugin +load(qt_plugin) diff --git a/src/plugins/printsupport/windows/windows.pro b/src/plugins/printsupport/windows/windows.pro index 3366262ef0..06694fb7fe 100644 --- a/src/plugins/printsupport/windows/windows.pro +++ b/src/plugins/printsupport/windows/windows.pro @@ -1,8 +1,5 @@ TARGET = windowsprintersupport MODULE = windowsprintersupport -PLUGIN_TYPE = printsupport -PLUGIN_CLASS_NAME = QWindowsPrinterSupportPlugin -load(qt_plugin) QT *= core-private QT *= gui-private @@ -22,3 +19,7 @@ HEADERS += \ OTHER_FILES += windows.json LIBS += -lwinspool -lcomdlg32 -lgdi32 -luser32 + +PLUGIN_TYPE = printsupport +PLUGIN_CLASS_NAME = QWindowsPrinterSupportPlugin +load(qt_plugin) diff --git a/src/plugins/styles/bb10style/bb10style.pro b/src/plugins/styles/bb10style/bb10style.pro index ad35df6de7..543f67f169 100644 --- a/src/plugins/styles/bb10style/bb10style.pro +++ b/src/plugins/styles/bb10style/bb10style.pro @@ -1,9 +1,5 @@ TARGET = bb10styleplugin -PLUGIN_TYPE = styles -PLUGIN_CLASS_NAME = BlackBerry10StylePlugin -load(qt_plugin) - INCLUDEPATH += $$PWD QT += widgets @@ -26,3 +22,6 @@ RESOURCES += \ OTHER_FILES += qbb10styleplugin.json +PLUGIN_TYPE = styles +PLUGIN_CLASS_NAME = BlackBerry10StylePlugin +load(qt_plugin) -- cgit v1.2.3 From fab4ac60c95ff3dc72339554c289a58f931f6649 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Feb 2016 16:04:28 +0100 Subject: remove redundant TEMPLATE assignment qt_plugin.prf does that already. Change-Id: Ia0329c3b508c86c2b71782a4e9744cfda528559a Reviewed-by: Simon Hausmann --- src/plugins/platforms/mirclient/mirclient.pro | 1 - 1 file changed, 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/mirclient/mirclient.pro b/src/plugins/platforms/mirclient/mirclient.pro index 4ea5593478..8c1ac02703 100644 --- a/src/plugins/platforms/mirclient/mirclient.pro +++ b/src/plugins/platforms/mirclient/mirclient.pro @@ -1,5 +1,4 @@ TARGET = mirclient -TEMPLATE = lib QT += core-private gui-private platformsupport-private dbus -- cgit v1.2.3 From cadfae0f9da2c458186b453138cf493b6efbb856 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Feb 2016 16:05:09 +0100 Subject: fix mir platform plugin name all platform plugins are supposed to start with a q. Change-Id: I4871cc553995aa68a09f8f045bdd378f5022cd87 Reviewed-by: Simon Hausmann Reviewed-by: aavit --- src/plugins/platforms/mirclient/mirclient.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/mirclient/mirclient.pro b/src/plugins/platforms/mirclient/mirclient.pro index 8c1ac02703..d5d35f1632 100644 --- a/src/plugins/platforms/mirclient/mirclient.pro +++ b/src/plugins/platforms/mirclient/mirclient.pro @@ -1,4 +1,4 @@ -TARGET = mirclient +TARGET = qmirclient QT += core-private gui-private platformsupport-private dbus -- cgit v1.2.3 From 7c200b6dabdc10131d4f839052f8bba1a9d42ea1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Feb 2016 16:05:32 +0100 Subject: standardize statement order in project file a bit Change-Id: I9fa42d9afa726f52390a2b01637e6f4e9b2fb537 Reviewed-by: Simon Hausmann --- src/plugins/bearer/android/src/src.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/android/src/src.pro b/src/plugins/bearer/android/src/src.pro index 77c95a0b38..eb0738386c 100644 --- a/src/plugins/bearer/android/src/src.pro +++ b/src/plugins/bearer/android/src/src.pro @@ -1,5 +1,3 @@ -include(wrappers/wrappers.pri) - TARGET = qandroidbearer QT = core-private network-private @@ -12,6 +10,8 @@ SOURCES += main.cpp \ qandroidbearerengine.cpp \ ../../qnetworksession_impl.cpp +include(wrappers/wrappers.pri) + PLUGIN_TYPE = bearer PLUGIN_CLASS_NAME = QAndroidBearerEnginePlugin load(qt_plugin) -- cgit v1.2.3 From f2bd0d119200d5b66069725563f7f12952e66da8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 3 Mar 2016 15:17:01 +0100 Subject: Clean up WINVER, _WIN32_WINNT macros for MinGW. Define WINVER, _WIN32_WINNT as 0x501 (Windows XP) in qt_windows.h. Remove definitions of the same/lower versions and unneeded definitions in other places. Remove definition for Borland compiler. Task-number: QTBUG-51673 Change-Id: I2a344a7f7cf78b2afbf45dcdf8bf2a19b93f0a07 Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- src/plugins/platforms/windows/qwindowsfontengine.cpp | 5 ----- src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp | 9 --------- 2 files changed, 14 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index cda8386ca0..a97062273f 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -31,11 +31,6 @@ ** ****************************************************************************/ -#if _WIN32_WINNT < 0x0500 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 -#endif - #include "qwindowsintegration.h" #include "qwindowsfontengine.h" #include "qwindowsnativeimage.h" diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp index 16c16fefbe..5b2e220fd6 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp @@ -33,15 +33,6 @@ #ifndef QT_NO_DIRECTWRITE -#if WINVER < 0x0600 -# undef WINVER -# define WINVER 0x0600 -#endif -#if _WIN32_WINNT < 0x0600 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 -#endif - #include "qwindowsfontenginedirectwrite.h" #include "qwindowsfontdatabase.h" #include "qwindowscontext.h" -- cgit v1.2.3 From d7db6c6c1944894737babf3958d0cff1e6222a22 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 8 Mar 2016 15:50:20 +0100 Subject: xcb: mark mouse events from tablet devices as synthesized Task-number: QTBUG-51617 Change-Id: Ic1d258c56165947ff821b1bf4d044bcf29b41a3b Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbconnection.h | 2 +- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 +- src/plugins/platforms/xcb/qxcbwindow.cpp | 39 +++++++++++++++--------- src/plugins/platforms/xcb/qxcbwindow.h | 11 ++++--- 4 files changed, 32 insertions(+), 22 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 47ef173cf4..86af5dc9c5 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -350,7 +350,7 @@ public: virtual void handleFocusOutEvent(const xcb_focus_out_event_t *) {} virtual void handlePropertyNotifyEvent(const xcb_property_notify_event_t *) {} #ifdef XCB_USE_XINPUT22 - virtual void handleXIMouseEvent(xcb_ge_event_t *) {} + virtual void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource = Qt::MouseEventNotSynthesized) {} virtual void handleXIEnterLeave(xcb_ge_event_t *) {} #endif virtual QXcbWindow *toWindow() { return 0; } diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 81cdaa56c5..9911afb11e 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -1130,7 +1130,7 @@ bool QXcbConnection::xi2HandleTabletEvent(void *event, TabletData *tabletData, Q // Synthesize mouse events since otherwise there are no mouse events from // the pen on the XI 2.2+ path. if (xi2MouseEvents() && eventListener) - eventListener->handleXIMouseEvent(reinterpret_cast(event)); + eventListener->handleXIMouseEvent(reinterpret_cast(event), Qt::MouseEventSynthesizedByQt); #else Q_UNUSED(eventListener); #endif diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index bfbc38e4c2..cd1774fed7 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -34,6 +34,7 @@ #include "qxcbwindow.h" #include +#include #include #include #include @@ -2158,7 +2159,7 @@ void QXcbWindow::handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event) } void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, int root_y, - int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp) + int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, Qt::MouseEventSource source) { const bool isWheel = detail >= 4 && detail <= 7; if (!isWheel && window() != QGuiApplication::focusWindow()) { @@ -2194,11 +2195,11 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in return; } - handleMouseEvent(timestamp, local, global, modifiers); + handleMouseEvent(timestamp, local, global, modifiers, source); } void QXcbWindow::handleButtonReleaseEvent(int event_x, int event_y, int root_x, int root_y, - int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp) + int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, Qt::MouseEventSource source) { QPoint local(event_x, event_y); QPoint global(root_x, root_y); @@ -2208,7 +2209,7 @@ void QXcbWindow::handleButtonReleaseEvent(int event_x, int event_y, int root_x, return; } - handleMouseEvent(timestamp, local, global, modifiers); + handleMouseEvent(timestamp, local, global, modifiers, source); } static bool ignoreLeaveEvent(quint8 mode, quint8 detail) @@ -2291,11 +2292,11 @@ void QXcbWindow::handleLeaveNotifyEvent(int root_x, int root_y, } void QXcbWindow::handleMotionNotifyEvent(int event_x, int event_y, int root_x, int root_y, - Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp) + Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, Qt::MouseEventSource source) { QPoint local(event_x, event_y); QPoint global(root_x, root_y); - handleMouseEvent(timestamp, local, global, modifiers); + handleMouseEvent(timestamp, local, global, modifiers, source); } // Handlers for plain xcb events. Used only when XI 2.2 or newer is not available. @@ -2326,7 +2327,7 @@ static inline int fixed1616ToInt(FP1616 val) } // With XI 2.2+ press/release/motion comes here instead of the above handlers. -void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event) +void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event, Qt::MouseEventSource source) { QXcbConnection *conn = connection(); xXIDeviceEvent *ev = reinterpret_cast(event); @@ -2346,20 +2347,27 @@ void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event) conn->setButton(conn->translateMouseButton(i), XIMaskIsSet(buttonMask, i)); } + const char *sourceName = nullptr; + if (lcQpaXInput().isDebugEnabled()) { + const QMetaObject *metaObject = qt_getEnumMetaObject(source); + const QMetaEnum me = metaObject->enumerator(metaObject->indexOfEnumerator(qt_getEnumName(source))); + sourceName = me.valueToKey(source); + } + switch (ev->evtype) { case XI_ButtonPress: - qCDebug(lcQpaXInput, "XI2 mouse press, button %d, time %d", button, ev->time); + qCDebug(lcQpaXInput, "XI2 mouse press, button %d, time %d, source %s", button, ev->time, sourceName); conn->setButton(button, true); - handleButtonPressEvent(event_x, event_y, root_x, root_y, ev->detail, modifiers, ev->time); + handleButtonPressEvent(event_x, event_y, root_x, root_y, ev->detail, modifiers, ev->time, source); break; case XI_ButtonRelease: - qCDebug(lcQpaXInput, "XI2 mouse release, button %d, time %d", button, ev->time); + qCDebug(lcQpaXInput, "XI2 mouse release, button %d, time %d, source %s", button, ev->time, sourceName); conn->setButton(button, false); - handleButtonReleaseEvent(event_x, event_y, root_x, root_y, ev->detail, modifiers, ev->time); + handleButtonReleaseEvent(event_x, event_y, root_x, root_y, ev->detail, modifiers, ev->time, source); break; case XI_Motion: - qCDebug(lcQpaXInput, "XI2 mouse motion %d,%d, time %d", event_x, event_y, ev->time); - handleMotionNotifyEvent(event_x, event_y, root_x, root_y, modifiers, ev->time); + qCDebug(lcQpaXInput, "XI2 mouse motion %d,%d, time %d, source %s", event_x, event_y, ev->time, sourceName); + handleMotionNotifyEvent(event_x, event_y, root_x, root_y, modifiers, ev->time, source); break; default: qWarning() << "Unrecognized XI2 mouse event" << ev->evtype; @@ -2402,10 +2410,11 @@ void QXcbWindow::handleXIEnterLeave(xcb_ge_event_t *event) QXcbWindow *QXcbWindow::toWindow() { return this; } -void QXcbWindow::handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers) +void QXcbWindow::handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, + Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source) { connection()->setTime(time); - QWindowSystemInterface::handleMouseEvent(window(), time, local, global, connection()->buttons(), modifiers); + QWindowSystemInterface::handleMouseEvent(window(), time, local, global, connection()->buttons(), modifiers, source); } void QXcbWindow::handleEnterNotifyEvent(const xcb_enter_notify_event_t *event) diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 69790f29ae..4673f3dd33 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -133,13 +133,14 @@ public: void handleFocusOutEvent(const xcb_focus_out_event_t *event) Q_DECL_OVERRIDE; void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) Q_DECL_OVERRIDE; #ifdef XCB_USE_XINPUT22 - void handleXIMouseEvent(xcb_ge_event_t *) Q_DECL_OVERRIDE; + void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) Q_DECL_OVERRIDE; void handleXIEnterLeave(xcb_ge_event_t *) Q_DECL_OVERRIDE; #endif QXcbWindow *toWindow() Q_DECL_OVERRIDE; - void handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers); + void handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, + Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source); void updateNetWmUserTime(xcb_timestamp_t timestamp); @@ -207,13 +208,13 @@ protected: bool compressExposeEvent(QRegion &exposeRegion); void handleButtonPressEvent(int event_x, int event_y, int root_x, int root_y, - int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp); + int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); void handleButtonReleaseEvent(int event_x, int event_y, int root_x, int root_y, - int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp); + int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); void handleMotionNotifyEvent(int event_x, int event_y, int root_x, int root_y, - Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp); + Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); void handleEnterNotifyEvent(int event_x, int event_y, int root_x, int root_y, quint8 mode, quint8 detail, xcb_timestamp_t timestamp); -- cgit v1.2.3