From d29f0bc65c1817bb73153cd546d7ab76e0768be0 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 25 Aug 2017 16:24:44 +0700 Subject: Avoid calling QCompleter::popup() internally QCompleter::popup() is used to lazily create the popup itself. However, we oftentimes call this function only to check if the popup is visible. Change-Id: I55531e1e6810c02a44f5f65124cf641b1a89de69 Reviewed-by: Gabriel de Dietrich Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/util/qcompleter_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets/util/qcompleter_p.h') diff --git a/src/widgets/util/qcompleter_p.h b/src/widgets/util/qcompleter_p.h index 40b08cc20a..5b89f9d8b5 100644 --- a/src/widgets/util/qcompleter_p.h +++ b/src/widgets/util/qcompleter_p.h @@ -101,6 +101,9 @@ public: void _q_autoResizePopup(); void _q_fileSystemModelDirectoryLoaded(const QString &path); void setCurrentIndex(QModelIndex, bool = true); + + static QCompleterPrivate *get(QCompleter *o) { return o->d_func(); } + static const QCompleterPrivate *get(const QCompleter *o) { return o->d_func(); } }; class QIndexMapper -- cgit v1.2.3