diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-07 16:17:29 +0200 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-07 16:18:32 +0200 |
commit | 2346ae167568bb9e5d247da0b946067b7f9aad48 (patch) | |
tree | f3a975711bcd223f4d6803caa5b53c080bb68819 /src/widgets/widgets | |
parent | 5dd2713c8ba98e06ae5c4f3da44b2ed73121d247 (diff) | |
parent | 730bc064a070e886e10950ccfd59780e8976f5fd (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 11 | ||||
-rw-r--r-- | src/widgets/widgets/qmenubar.cpp | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index a8b6b1a10c..adf70fde66 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -333,8 +333,7 @@ void QLineEdit::setText(const QString& text) \brief the line edit's placeholder text Setting this property makes the line edit display a grayed-out - placeholder text as long as the text() is empty and the widget doesn't - have focus. + placeholder text as long as the text() is empty. By default, this property contains an empty string. diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 4df89a5ede..c305748c7d 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2864,8 +2864,15 @@ void QMenu::mouseMoveEvent(QMouseEvent *e) d->mouseDown = this; } if (d->sloppyRegion.contains(e->pos())) { - d->sloppyAction = action; - QMenuPrivate::sloppyDelayTimer = startTimer(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6); + // If the timer is already running then don't start a new one unless the action is the same + if (d->sloppyAction != action && QMenuPrivate::sloppyDelayTimer != 0) { + killTimer(QMenuPrivate::sloppyDelayTimer); + QMenuPrivate::sloppyDelayTimer = 0; + } + if (QMenuPrivate::sloppyDelayTimer == 0) { + d->sloppyAction = action; + QMenuPrivate::sloppyDelayTimer = startTimer(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this) * 6); + } } else if (action != d->currentAction) { d->setCurrentAction(action, style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)); } diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index f22c48b26f..a7cad28df3 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -1054,6 +1054,7 @@ void QMenuBar::mousePressEvent(QMouseEvent *e) if(QMenu *menu = d->activeMenu) { d->activeMenu = 0; menu->hide(); + d->closePopupMode = 1; } } else { d->setCurrentAction(action, true); |