Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/codecompletion/codecompletioncontext.cpp
Show All 23 Lines | |||||
24 | #include <language/duchain/ducontext.h> | 24 | #include <language/duchain/ducontext.h> | ||
25 | 25 | | |||
26 | using namespace KDevelop; | 26 | using namespace KDevelop; | ||
27 | 27 | | |||
28 | typedef PushValue<int> IntPusher; | 28 | typedef PushValue<int> IntPusher; | ||
29 | 29 | | |||
30 | ///Extracts the last line from the given string | 30 | ///Extracts the last line from the given string | ||
31 | QString CodeCompletionContext::extractLastLine(const QString& str) { | 31 | QString CodeCompletionContext::extractLastLine(const QString& str) { | ||
32 | int prevLineEnd = str.lastIndexOf('\n'); | 32 | int prevLineEnd = str.lastIndexOf(QLatin1Char('\n')); | ||
33 | if(prevLineEnd != -1) | 33 | if(prevLineEnd != -1) | ||
34 | return str.mid(prevLineEnd+1); | 34 | return str.mid(prevLineEnd+1); | ||
35 | else | 35 | else | ||
36 | return str; | 36 | return str; | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | int completionRecursionDepth = 0; | 39 | int completionRecursionDepth = 0; | ||
40 | 40 | | |||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |