From: Friedemann Kleint Date: Tue, 3 Apr 2012 07:37:13 +0000 (+0200) Subject: Fix warnings about unused variables. X-Git-Tag: 071012110112~1846 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd4f165eb78979a3573b9fa1a4a572600f9c47c7;p=profile%2Fivi%2Fqtbase.git Fix warnings about unused variables. Fix MSVC warnings about unused q, d where only static functions are used. Change-Id: I239d6fc3c851b0a62434cb09fc0e1967f2e6d031 Reviewed-by: Thiago Macieira --- diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 0f5c218..1a399dc 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -604,12 +604,10 @@ static void init_plugins(const QList &pluginList) void QGuiApplicationPrivate::createPlatformIntegration() { - Q_Q(QGuiApplication); - // Use the Qt menus by default. Platform plugins that // want to enable a native menu implementation can clear // this flag. - q->setAttribute(Qt::AA_DontUseNativeMenuBar, true); + QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true); // Load the platform integration QString platformPluginPath = QLatin1String(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH")); diff --git a/src/gui/kernel/qplatforminputcontext_qpa.cpp b/src/gui/kernel/qplatforminputcontext_qpa.cpp index 0461089..8612b4b 100644 --- a/src/gui/kernel/qplatforminputcontext_qpa.cpp +++ b/src/gui/kernel/qplatforminputcontext_qpa.cpp @@ -244,15 +244,14 @@ void QPlatformInputContext::setFocusObject(QObject *object) */ bool QPlatformInputContext::inputMethodAccepted() const { - Q_D(const QPlatformInputContext); - return d->s_inputMethodAccepted; + return QPlatformInputContextPrivate::s_inputMethodAccepted; } bool QPlatformInputContextPrivate::s_inputMethodAccepted = false; void QPlatformInputContextPrivate::setInputMethodAccepted(bool accepted) { - s_inputMethodAccepted = accepted; + QPlatformInputContextPrivate::s_inputMethodAccepted = accepted; } diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 40263bf..a8b1fa6 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1977,12 +1977,11 @@ void QApplication::syncX() void QApplicationPrivate::notifyLayoutDirectionChange() { - Q_Q(QApplication); - QWidgetList list = q->topLevelWidgets(); + QWidgetList list = QApplication::topLevelWidgets(); for (int i = 0; i < list.size(); ++i) { QWidget *w = list.at(i); QEvent ev(QEvent::ApplicationLayoutDirectionChange); - q->sendEvent(w, &ev); + QCoreApplication::sendEvent(w, &ev); } } diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index 97fc794..bcea267 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -162,12 +162,11 @@ QWidget *qt_tlw_for_window(QWindow *wnd) void QApplicationPrivate::notifyActiveWindowChange(QWindow *previous) { Q_UNUSED(previous); - Q_Q(QApplication); QWindow *wnd = QGuiApplicationPrivate::focus_window; if (inPopupMode()) // some delayed focus event to ignore return; QWidget *tlw = qt_tlw_for_window(wnd); - q->setActiveWindow(tlw); + QApplication::setActiveWindow(tlw); } static void ungrabKeyboardForPopup(QWidget *popup) @@ -201,7 +200,6 @@ static void grabForPopup(QWidget *popup) void QApplicationPrivate::closePopup(QWidget *popup) { - Q_Q(QApplication); if (!popupWidgets) return; popupWidgets->removeAll(popup); @@ -241,7 +239,7 @@ void QApplicationPrivate::closePopup(QWidget *popup) fw->setFocus(Qt::PopupFocusReason); } else { QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason); - q->sendEvent(fw, &e); + QCoreApplication::sendEvent(fw, &e); } } }