diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-11-10 13:43:19 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-11-10 13:44:34 (GMT) |
commit | b6be1c595fa67ec034f04c8a93e57e593ceb97aa (patch) | |
tree | 7c28b73b3cd77bb90efe74c5631383f275e33043 /src/gui/kernel/qaction.cpp | |
parent | 75f264cc6c47493f26ee81c783d1f9b64310c1d6 (diff) | |
download | Qt-b6be1c595fa67ec034f04c8a93e57e593ceb97aa.zip Qt-b6be1c595fa67ec034f04c8a93e57e593ceb97aa.tar.gz Qt-b6be1c595fa67ec034f04c8a93e57e593ceb97aa.tar.bz2 |
Make sure the context menus also clear the status tip when needed
Task-number: QTBUG-2700
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/kernel/qaction.cpp')
-rw-r--r-- | src/gui/kernel/qaction.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index 6f3cbaf..3eaf2e1 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -100,6 +100,21 @@ QActionPrivate::~QActionPrivate() { } +bool QActionPrivate::showStatusText(QWidget *widget, const QString &str) +{ +#ifdef QT_NO_STATUSTIP + Q_UNUSED(widget); + Q_UNUSED(str); +#else + if(QObject *object = widget ? widget : parent) { + QStatusTipEvent tip(str); + QApplication::sendEvent(object, &tip); + return true; + } +#endif + return false; +} + void QActionPrivate::sendDataChanged() { Q_Q(QAction); @@ -1206,16 +1221,7 @@ QAction::setData(const QVariant &data) bool QAction::showStatusText(QWidget *widget) { -#ifdef QT_NO_STATUSTIP - Q_UNUSED(widget); -#else - if(QObject *object = widget ? widget : parent()) { - QStatusTipEvent tip(statusTip()); - QApplication::sendEvent(object, &tip); - return true; - } -#endif - return false; + return d_func()->showStatusText(widget, statusTip()); } /*! |