Changeset View
Changeset View
Standalone View
Standalone View
plugins/clang/codecompletion/context.cpp
Show First 20 Lines • Show All 1029 Lines • ▼ Show 20 Line(s) | 1026 | if (isDeclaration && !typed.isEmpty()) { | |||
---|---|---|---|---|---|
1030 | } | 1030 | } | ||
1031 | } | 1031 | } | ||
1032 | 1032 | | |||
1033 | const QString string = ClangString(clang_getCompletionChunkText(completionString, j)).toString(); | 1033 | const QString string = ClangString(clang_getCompletionChunkText(completionString, j)).toString(); | ||
1034 | 1034 | | |||
1035 | switch (kind) { | 1035 | switch (kind) { | ||
1036 | case CXCompletionChunk_TypedText: | 1036 | case CXCompletionChunk_TypedText: | ||
1037 | typed = string; | 1037 | typed = string; | ||
1038 | replacement = string; | 1038 | replacement += string; | ||
1039 | break; | 1039 | break; | ||
1040 | case CXCompletionChunk_ResultType: | 1040 | case CXCompletionChunk_ResultType: | ||
1041 | resultType = string; | 1041 | resultType = string; | ||
1042 | continue; | 1042 | continue; | ||
1043 | case CXCompletionChunk_Placeholder: | 1043 | case CXCompletionChunk_Placeholder: | ||
1044 | if (signatureState == Inside) { | 1044 | if (signatureState == Inside) { | ||
1045 | arguments += string; | 1045 | arguments += string; | ||
1046 | } | 1046 | } | ||
Show All 10 Lines | 1056 | if (signatureState == Inside && !parenDepth) { | |||
1057 | arguments += QLatin1Char(')'); | 1057 | arguments += QLatin1Char(')'); | ||
1058 | signatureState = After; | 1058 | signatureState = After; | ||
1059 | } | 1059 | } | ||
1060 | break; | 1060 | break; | ||
1061 | case CXCompletionChunk_Text: | 1061 | case CXCompletionChunk_Text: | ||
1062 | if (isOverloadCandidate) { | 1062 | if (isOverloadCandidate) { | ||
1063 | typed += string; | 1063 | typed += string; | ||
1064 | } | 1064 | } | ||
1065 | else if (result.CursorKind == CXCursor_EnumConstantDecl) { | ||||
1066 | replacement += string; | ||||
1067 | } | ||||
1065 | break; | 1068 | break; | ||
1066 | case CXCompletionChunk_CurrentParameter: | 1069 | case CXCompletionChunk_CurrentParameter: | ||
1067 | argumentRange.start = arguments.size(); | 1070 | argumentRange.start = arguments.size(); | ||
1068 | argumentRange.end = string.size(); | 1071 | argumentRange.end = string.size(); | ||
1069 | break; | 1072 | break; | ||
1070 | default: | 1073 | default: | ||
1071 | break; | 1074 | break; | ||
1072 | } | 1075 | } | ||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |