Changeset View
Changeset View
Standalone View
Standalone View
plugins/clang/codecompletion/model.cpp
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 188 | { | |||
---|---|---|---|---|---|
190 | 190 | | |||
191 | if (inserted.isEmpty() || isSpaceOnly(inserted)) { | 191 | if (inserted.isEmpty() || isSpaceOnly(inserted)) { | ||
192 | return false; | 192 | return false; | ||
193 | } | 193 | } | ||
194 | const auto lastChar = inserted.at(inserted.size() - 1); | 194 | const auto lastChar = inserted.at(inserted.size() - 1); | ||
195 | if (noCompletionAfter.contains(lastChar)) { | 195 | if (noCompletionAfter.contains(lastChar)) { | ||
196 | return false; | 196 | return false; | ||
197 | } | 197 | } | ||
198 | const auto wordAtPosition = view->document()->wordAt(position); | ||||
mwolff: const auto | |||||
199 | if (!wordAtPosition.isEmpty() && wordAtPosition.at(0).isDigit()) { | ||||
200 | return false; | ||||
201 | } | ||||
198 | // also show include path completion after dashes | 202 | // also show include path completion after dashes | ||
199 | if (userInsertion && lastChar == QLatin1Char('-') && includePathCompletionRequired(view->document()->line(position.line()))) { | 203 | if (userInsertion && lastChar == QLatin1Char('-') && includePathCompletionRequired(view->document()->line(position.line()))) { | ||
200 | return true; | 204 | return true; | ||
201 | } | 205 | } | ||
202 | if (userInsertion && inserted.endsWith(QStringLiteral("::"))) { | 206 | if (userInsertion && inserted.endsWith(QStringLiteral("::"))) { | ||
203 | return true; | 207 | return true; | ||
204 | } | 208 | } | ||
205 | 209 | | |||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
const auto