summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@nokia.com>2012-09-03 14:34:15 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-07 12:10:05 +0200
commitd6d8ccd2d873e757c41891207855448a65e8adb8 (patch)
treee3d1e64aab3a0bf5b163a27ccc94bc3eb5ec519f
parente28a957035878abc5e7cccc9d16ffe0fcad842a2 (diff)
Fixed behaviour of mouse clicks for menu bars on Windows
As the behaviour described in the style hint seems to be default and working, it can be removed. Change-Id: Ia8d47cf187597ae48b9e42c3f98ef3d4c390db34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
-rw-r--r--src/widgets/styles/qcommonstyle.cpp4
-rw-r--r--src/widgets/styles/qstyle.cpp5
-rw-r--r--src/widgets/styles/qstyle.h1
-rw-r--r--src/widgets/widgets/qmenubar.cpp4
4 files changed, 0 insertions, 14 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index e6080c22c4..da6298a4b5 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -4726,10 +4726,6 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
ret = Qt::StrongFocus;
break;
- case SH_MenuBar_DismissOnSecondClick:
- ret = 1;
- break;
-
case SH_MessageBox_UseBorderForButtonSpacing:
ret = 0;
break;
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 8d8ba9c45b..62a02c4aa5 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1791,11 +1791,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SH_CustomBase Base value for custom style hints.
Custom values must be greater than this value.
- \value SH_MenuBar_DismissOnSecondClick A boolean indicating if a menu in
- the menu bar should be dismissed when it is clicked on a second time. (Example:
- Clicking and releasing on the File Menu in a menu bar and then
- immediately clicking on the File Menu again.)
-
\value SH_MessageBox_UseBorderForButtonSpacing A boolean indicating what the to
use the border of the buttons (computed as half the button height) for the spacing
of the button in a message box.
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index 3194845954..a391cd9a8d 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -651,7 +651,6 @@ public:
SH_DrawMenuBarSeparator,
SH_TitleBar_ModifyNotification,
SH_Button_FocusPolicy,
- SH_MenuBar_DismissOnSecondClick,
SH_MessageBox_UseBorderForButtonSpacing,
SH_TitleBar_AutoRaise,
SH_ToolButton_PopupDelay,
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index a67f8bf46a..d8eee301d2 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -1079,10 +1079,6 @@ void QMenuBar::mousePressEvent(QMouseEvent *e)
d->activeMenu = 0;
menu->hide();
}
-#ifdef Q_OS_WIN
- if((d->closePopupMode = style()->styleHint(QStyle::SH_MenuBar_DismissOnSecondClick)))
- update(d->actionRect(action));
-#endif
} else {
d->setCurrentAction(action, true);
}