From df32c9a1127cfec15aab834cc2df363fa49ca5bd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 2 Jun 2017 15:12:02 +0200 Subject: Windows QPA: Port to new feature system Replace all checks for DEFINES in windows.pri by proper configure system checks as they no longer seem to work. Task-number: QTBUG-61192 Change-Id: I625c9de0812fd376d06eacb065d3a32a499b6b00 Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowscontext.cpp | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index eb62bd2e1f..5eb58dc5a1 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -52,7 +52,7 @@ #ifndef QT_NO_ACCESSIBILITY # include "accessible/qwindowsaccessibility.h" #endif -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) # include # include "qwindowssessionmanager.h" #endif @@ -121,7 +121,7 @@ static inline bool useRTL_Extensions() return false; } -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) static inline QWindowsSessionManager *platformSessionManager() { QGuiApplicationPrivate *guiPrivate = static_cast(QObjectPrivate::get(qApp)); QSessionManagerPrivate *managerPrivate = static_cast(QObjectPrivate::get(guiPrivate->session_manager)); @@ -238,7 +238,7 @@ struct QWindowsContextPrivate { QWindowsMimeConverter m_mimeConverter; QWindowsScreenManager m_screenManager; QSharedPointer m_creationContext; -#if !defined(QT_NO_TABLETEVENT) +#if QT_CONFIG(tabletevent) QScopedPointer m_tabletSupport; #endif const HRESULT m_oleInitializeResult; @@ -279,7 +279,7 @@ QWindowsContext::QWindowsContext() : const QByteArray bv = qgetenv("QT_QPA_VERBOSE"); if (!bv.isEmpty()) QLoggingCategory::setFilterRules(QString::fromLocal8Bit(bv)); -#if !defined(QT_NO_TABLETEVENT) +#if QT_CONFIG(tabletevent) d->m_tabletSupport.reset(QWindowsTabletSupport::create()); qCDebug(lcQpaTablet) << "Tablet support: " << (d->m_tabletSupport.isNull() ? QStringLiteral("None") : d->m_tabletSupport->description()); #endif @@ -287,7 +287,7 @@ QWindowsContext::QWindowsContext() : QWindowsContext::~QWindowsContext() { -#if !defined(QT_NO_TABLETEVENT) +#if QT_CONFIG(tabletevent) d->m_tabletSupport.reset(); // Destroy internal window before unregistering classes. #endif unregisterWindowClasses(); @@ -335,7 +335,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions) void QWindowsContext::setTabletAbsoluteRange(int a) { -#if !defined(QT_NO_TABLETEVENT) +#if QT_CONFIG(tabletevent) if (!d->m_tabletSupport.isNull()) d->m_tabletSupport->setAbsoluteRange(a); #else @@ -700,7 +700,7 @@ QWindowsScreenManager &QWindowsContext::screenManager() QWindowsTabletSupport *QWindowsContext::tabletSupport() const { -#if !defined(QT_NO_TABLETEVENT) +#if QT_CONFIG(tabletevent) return d->m_tabletSupport.data(); #else return 0; @@ -897,7 +897,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, switch (et) { case QtWindows::GestureEvent: -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, result); #else return d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, result); @@ -990,7 +990,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, case QtWindows::InputMethodKeyEvent: case QtWindows::InputMethodKeyDownEvent: case QtWindows::AppCommandEvent: -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) return platformSessionManager()->isInteractionBlocked() ? true : d->m_keyMapper.translateKeyEvent(platformWindow->window(), hwnd, msg, result); #else return d->m_keyMapper.translateKeyEvent(platformWindow->window(), hwnd, msg, result); @@ -1014,14 +1014,14 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, return platformWindow->handleWmPaint(hwnd, message, wParam, lParam); case QtWindows::NonClientMouseEvent: if (platformWindow->frameStrutEventsEnabled()) -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result); #else return d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result); #endif break; case QtWindows::ScrollEvent: -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateScrollEvent(platformWindow->window(), hwnd, msg, result); #else return d->m_mouseHandler.translateScrollEvent(platformWindow->window(), hwnd, msg, result); @@ -1035,14 +1035,14 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, window = window->parent(); if (!window) return false; -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateMouseEvent(window, hwnd, et, msg, result); #else return d->m_mouseHandler.translateMouseEvent(window, hwnd, et, msg, result); #endif } case QtWindows::TouchEvent: -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result); #else return d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result); @@ -1116,7 +1116,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, platformWindow->clearFlag(QWindowsWindow::WithinDpiChanged); return true; } -#if !defined(QT_NO_SESSIONMANAGER) +#if QT_CONFIG(sessionmanager) case QtWindows::QueryEndSessionApplicationEvent: { QWindowsSessionManager *sessionManager = platformSessionManager(); if (sessionManager->isActive()) { // bogus message from windows -- cgit v1.2.3