diff options
Diffstat (limited to 'src/widgets/util/qcompleter.cpp')
-rw-r--r-- | src/widgets/util/qcompleter.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index e41f7e7573..7b69eff30c 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -145,7 +145,9 @@ #include "QtWidgets/qscrollbar.h" #include "QtCore/qdir.h" +#if QT_CONFIG(stringlistmodel) #include "QtCore/qstringlistmodel.h" +#endif #if QT_CONFIG(dirmodel) #include "QtWidgets/qdirmodel.h" #endif @@ -159,6 +161,7 @@ #include "QtWidgets/qapplication.h" #include "QtGui/qevent.h" #include "QtWidgets/qdesktopwidget.h" +#include <private/qapplication_p.h> #include <private/qdesktopwidget_p.h> #if QT_CONFIG(lineedit) #include "QtWidgets/qlineedit.h" @@ -1414,7 +1417,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e) // widget lost focus, hide the popup if (d->widget && (!d->widget->hasFocus() #ifdef QT_KEYPAD_NAVIGATION - || (QApplication::keypadNavigationEnabled() && !d->widget->hasEditFocus()) + || (QApplicationPrivate::keypadNavigationEnabled() && !d->widget->hasEditFocus()) #endif )) d->popup->hide(); @@ -1432,7 +1435,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e) switch (key) { #ifdef QT_KEYPAD_NAVIGATION case Qt::Key_Select: - if (!QApplication::keypadNavigationEnabled()) + if (!QApplicationPrivate::keypadNavigationEnabled()) break; #endif case Qt::Key_Return: @@ -1462,7 +1465,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e) #ifdef QT_KEYPAD_NAVIGATION case QEvent::KeyRelease: { QKeyEvent *ke = static_cast<QKeyEvent *>(e); - if (QApplication::keypadNavigationEnabled() && ke->key() == Qt::Key_Back) { + if (QApplicationPrivate::keypadNavigationEnabled() && ke->key() == Qt::Key_Back) { // Send the event to the 'widget'. This is what we did for KeyPress, so we need // to do the same for KeyRelease, in case the widget's KeyPress event set // up something (such as a timer) that is relying on also receiving the @@ -1479,7 +1482,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e) case QEvent::MouseButtonPress: { #ifdef QT_KEYPAD_NAVIGATION - if (QApplication::keypadNavigationEnabled()) { + if (QApplicationPrivate::keypadNavigationEnabled()) { // if we've clicked in the widget (or its descendant), let it handle the click QWidget *source = qobject_cast<QWidget *>(o); if (source) { @@ -1504,7 +1507,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e) case QEvent::InputMethod: case QEvent::ShortcutOverride: - QApplication::sendEvent(d->widget, e); + QCoreApplication::sendEvent(d->widget, e); break; default: |