QMenuBar: Clean up Q_WS_WIN
authorDebao Zhang <dbzhang800@gmail.com>
Thu, 23 Feb 2012 02:29:51 +0000 (18:29 -0800)
committerQt by Nokia <qt-info@nokia.com>
Thu, 23 Feb 2012 08:21:22 +0000 (09:21 +0100)
 - Replace Q_WS_WIN with Q_OS_WIN
 - Remove useless #ifdef Q_OS_WINCE which located in another #ifdef
   Q_OS_WINCE

Change-Id: I6279b6d74902ab3ca6bdb7292c2936a76e3e6952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/widgets/widgets/qmenubar.cpp
tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

index d797a4e..16e486e 100644 (file)
@@ -1075,7 +1075,7 @@ void QMenuBar::mousePressEvent(QMouseEvent *e)
             d->activeMenu = 0;
             menu->hide();
         }
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
         if((d->closePopupMode = style()->styleHint(QStyle::SH_MenuBar_DismissOnSecondClick)))
             update(d->actionRect(action));
 #endif
@@ -1845,15 +1845,12 @@ void QMenuBar::setDefaultAction(QAction *act)
     Q_D(QMenuBar);
     if (d->defaultAction == act)
         return;
-#ifdef Q_OS_WINCE
     if (qt_wince_is_mobile())
         if (d->defaultAction) {
             disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction()));
             disconnect(d->defaultAction, SIGNAL(destroyed()), this, SLOT(_q_updateDefaultAction()));
         }
-#endif
     d->defaultAction = act;
-#ifdef Q_OS_WINCE
     if (qt_wince_is_mobile())
         if (d->defaultAction) {
             connect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction()));
@@ -1862,7 +1859,6 @@ void QMenuBar::setDefaultAction(QAction *act)
     if (d->wce_menubar) {
         d->wce_menubar->rebuild();
     }
-#endif
 }
 
 /*!
index 9989e5e..6a1f418 100644 (file)
 #include <qaction.h>
 #include <qstyleoption.h>
 
-#ifdef Q_WS_WIN
-#include <windows.h>
-#endif
-
 #include <qobject.h>
 
 QT_FORWARD_DECLARE_CLASS(QMainWindow)