summaryrefslogtreecommitdiffstats
path: root/src/widgets/util/qcompleter.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-12 09:01:52 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-12 11:07:56 +0100
commit6b8c0a50585bb637c5cd33ca8ffde0cb9c4e3664 (patch)
tree12647726671357a571e2b371b0e33199efb08156 /src/widgets/util/qcompleter.cpp
parent66d94ea30be9c4c8cc81a52134022eb662bedd77 (diff)
parentca7f1d2197f78ec3332cfd86ab9921730b6d4f23 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'src/widgets/util/qcompleter.cpp')
-rw-r--r--src/widgets/util/qcompleter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index 55ceeca919..3eeb6683b1 100644
--- a/src/widgets/util/qcompleter.cpp
+++ b/src/widgets/util/qcompleter.cpp
@@ -432,7 +432,7 @@ void QCompletionEngine::filter(const QStringList& parts)
QModelIndex parent;
for (int i = 0; i < curParts.count() - 1; i++) {
- QString part = curParts[i];
+ QString part = curParts.at(i);
int emi = filter(part, parent, -1).exactMatchIndex;
if (emi == -1)
return;
@@ -442,10 +442,10 @@ void QCompletionEngine::filter(const QStringList& parts)
// Note that we set the curParent to a valid parent, even if we have no matches
// When filtering is disabled, we show all the items under this parent
curParent = parent;
- if (curParts.last().isEmpty())
+ if (curParts.constLast().isEmpty())
curMatch = QMatchData(QIndexMapper(0, model->rowCount(curParent) - 1), -1, false);
else
- curMatch = filter(curParts.last(), curParent, 1); // build at least one
+ curMatch = filter(curParts.constLast(), curParent, 1); // build at least one
curRow = curMatch.isValid() ? 0 : -1;
}