diff options
author | Andy Shaw <andy.shaw@digia.com> | 2013-09-17 20:07:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-15 13:01:59 +0200 |
commit | 89c01c3242079f12421da234f2a21abfee4b71e1 (patch) | |
tree | acd5be145277b75689ed9cda2aa757900000b6b4 /src/widgets/widgets | |
parent | 4684f2179be7182d32d50067e1ca0fa87619792e (diff) |
Only emit messageChanged() if the message has actually changed
This fixes QStatusBar so it is back to the original behavior of only
emitting the signal when the message has changed. The intention of the
code that caused this to break in the first place is kept intact.
Change-Id: I2f57c2abec01246ed924626ad954ac9ff9889855
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qstatusbar.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp index 86fd10699c..7b1d66cf0d 100644 --- a/src/widgets/widgets/qstatusbar.cpp +++ b/src/widgets/widgets/qstatusbar.cpp @@ -551,8 +551,6 @@ void QStatusBar::showMessage(const QString &message, int timeout) { Q_D(QStatusBar); - d->tempItem = message; - if (timeout > 0) { if (!d->timer) { d->timer = new QTimer(this); @@ -563,6 +561,9 @@ void QStatusBar::showMessage(const QString &message, int timeout) delete d->timer; d->timer = 0; } + if (d->tempItem == message) + return; + d->tempItem = message; hideOrShow(); } |