summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgetlinecontrol.cpp
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-09-02 20:52:48 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-09-04 11:28:02 +0000
commit093064fdeb6e777d2dc88dbb4f4adb8fddac3aa5 (patch)
treed158515e101fc084d91c56f0bc6c63d72bf89cb5 /src/widgets/widgets/qwidgetlinecontrol.cpp
parent66d9a2b9971366c906aea1e9e0ed4e600384a4aa (diff)
Convert features.completer to QT_[REQUIRE_]CONFIG
Change-Id: If45a46c08b37d245229a39f3d6ffbb34154934f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol.cpp')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 9281cc8ced..3abe82ce59 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -1428,7 +1428,7 @@ void QWidgetLineControl::emitCursorPositionChanged()
}
}
-#ifndef QT_NO_COMPLETER
+#if QT_CONFIG(completer)
// iterating forward(dir=1)/backward(dir=-1) from the
// current row based. dir=0 indicates a new completion prefix was set.
bool QWidgetLineControl::advanceToEnabledItem(int dir)
@@ -1627,7 +1627,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
{
bool inlineCompletionAccepted = false;
-#ifndef QT_NO_COMPLETER
+#if QT_CONFIG(completer)
if (m_completer) {
QCompleter::CompletionMode completionMode = m_completer->completionMode();
if ((completionMode == QCompleter::PopupCompletion
@@ -1672,7 +1672,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
}
}
}
-#endif // QT_NO_COMPLETER
+#endif // QT_CONFIG(completer)
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
if (hasAcceptableInput() || fixup()) {
@@ -1774,7 +1774,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
end(1);
}
else if (event == QKeySequence::MoveToNextChar) {
-#if defined(QT_NO_COMPLETER)
+#if !QT_CONFIG(completer)
const bool inlineCompletion = false;
#else
const bool inlineCompletion = m_completer && m_completer->completionMode() == QCompleter::InlineCompletion;
@@ -1791,7 +1791,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
cursorForward(1, visual ? 1 : (layoutDirection() == Qt::LeftToRight ? 1 : -1));
}
else if (event == QKeySequence::MoveToPreviousChar) {
-#if defined(QT_NO_COMPLETER)
+#if !QT_CONFIG(completer)
const bool inlineCompletion = false;
#else
const bool inlineCompletion = m_completer && m_completer->completionMode() == QCompleter::InlineCompletion;
@@ -1886,7 +1886,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
del();
}
break;
-#ifndef QT_NO_COMPLETER
+#if QT_CONFIG(completer)
case Qt::Key_Up:
case Qt::Key_Down:
complete(event->key());
@@ -1901,7 +1901,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
case Qt::Key_Backspace:
if (!isReadOnly()) {
backspace();
-#ifndef QT_NO_COMPLETER
+#if QT_CONFIG(completer)
complete(Qt::Key_Backspace);
#endif
}
@@ -1941,7 +1941,7 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
&& !isReadOnly()
&& isAcceptableInput(event)) {
insert(event->text());
-#ifndef QT_NO_COMPLETER
+#if QT_CONFIG(completer)
complete(event->key());
#endif
event->accept();