diff options
| author | Emmanuel Pescosta <[email protected]> | 2012-09-20 17:57:10 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2012-09-20 17:57:10 +0200 |
| commit | c8243401470156d9ee76e2015a23741570d3dba1 (patch) | |
| tree | 17a3da2f8e46219e7801af37b20a6416b0fe4799 | |
| parent | 904d7b0701f742328c531d262b345b0b2cba5f5a (diff) | |
Fix Bug 297355 - Dolphin leaves file preview tooltips open even when is not visible
BUG: 297355
FIXED-IN: 4.9.2
REVIEW: 106499
| -rw-r--r-- | src/views/dolphinview.cpp | 14 | ||||
| -rw-r--r-- | src/views/dolphinview.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index b5dba04ad..f0dc3caba 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -753,6 +753,20 @@ void DolphinView::hideEvent(QHideEvent* event) QWidget::hideEvent(event); } +bool DolphinView::event(QEvent* event) +{ + /* See Bug 297355 + * Dolphin leaves file preview tooltips open even when is not visible. + * + * Hide tool-tip when Dolphin loses focus. + */ + if (event->type() == QEvent::WindowDeactivate) { + hideToolTip(); + } + + return QWidget::event(event); +} + void DolphinView::activate() { setActive(true); diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 3f71fdc54..7d8e8b76a 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -532,6 +532,7 @@ protected: /** @reimp */ virtual void hideEvent(QHideEvent* event); + virtual bool event(QEvent* event); private slots: /** |
