aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpopup_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-01 13:07:31 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-02 12:48:59 +0000
commitbfaa08a335f21e6fdf533969779f806883fe27b0 (patch)
tree2f6ff3425b6ae74670a46922c51a7cb779508693 /src/quicktemplates2/qquickpopup_p.h
parenteb7bf1825ede649ae35ebec91ef430686ae2c70a (diff)
Fix QQuickToolTip's delay and visibility
The imperative open() and close() methods used to be the only ways to open and close popups, but the visible-property was later made writable to allow declarative visibility bindings. Since then, it is no longer sufficient for QQuickToolTip to overshadow open() and close() in QML, because setting the visible-property would bypass these overshadowed method. There was a bit of duplicate code between setVisible(), open(), and close(). This change moves the logic to one place by changing open() and close() to call setVisible(). Furthermore, setVisible() has been made virtual to make it possible for QQuickToolTip to apply its delay properly. QQuickToolTip needs to control the delay and timeout timers before the effective visibility is applied on the popup. Task-number: QTBUG-55572 Change-Id: I5a109157f9ec5d0db145e710426665a9a8d7e870 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpopup_p.h')
-rw-r--r--src/quicktemplates2/qquickpopup_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h
index 9ef5c64b..a024c68f 100644
--- a/src/quicktemplates2/qquickpopup_p.h
+++ b/src/quicktemplates2/qquickpopup_p.h
@@ -233,7 +233,7 @@ public:
void resetDim();
bool isVisible() const;
- void setVisible(bool visible);
+ virtual void setVisible(bool visible);
qreal opacity() const;
void setOpacity(qreal opacity);