From 323a2bff2c56e6dd6d2f4c2e8662f699edc69a4e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 7 Mar 2013 16:41:39 +0100 Subject: QApplication: Fix MSVC-warning about unused variable q. Change-Id: I44f34816cb18583fcbbab0a6c79b313a829d9236 Reviewed-by: Joerg Bornemann Reviewed-by: Oliver Wolff --- src/widgets/kernel/qapplication.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 1e493fe8c6..e9ec0a916d 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -603,10 +603,8 @@ void QApplicationPrivate::initialize() is_app_running = true; // no longer starting up - Q_Q(QApplication); - if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0) - q->setAttribute(Qt::AA_NativeWindows); + QCoreApplication::setAttribute(Qt::AA_NativeWindows); #ifdef Q_OS_WINCE #ifdef QT_AUTO_MAXIMIZE_THRESHOLD @@ -3777,8 +3775,6 @@ private: bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *event) { - Q_Q(QApplication); - // Check if the platform wants synthesized mouse events. if (!QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::SynthesizeMouseFromTouchEvents).toBool()) return false; @@ -3809,7 +3805,7 @@ bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *ev // Note it has to be a spontaneous event if we want the focus management // and input method support to behave properly. Quite some of the code // related to those aspect check for the spontaneous flag. - const bool res = q->sendSpontaneousEvent(widget, &mouseEvent); + const bool res = QCoreApplication::sendSpontaneousEvent(widget, &mouseEvent); event->setAccepted(mouseEvent.isAccepted()); if (mouseEvent.isAccepted()) -- cgit v1.2.3