QMenuBar: Clean up Q_WS_WIN
- 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>
This commit is contained in:
parent
c065ac562a
commit
1501f1ddd4
@ -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
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -50,10 +50,6 @@
|
||||
#include <qaction.h>
|
||||
#include <qstyleoption.h>
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QMainWindow)
|
||||
|
Loading…
Reference in New Issue
Block a user