diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index baa0f784d7326e423a056bce32b36cf11552c44b..a035c6425f6e6129402b7f326166e779ca617175 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -168,6 +168,8 @@ bool isProbablyGlobalCompletion(const QStringList &list) + (T_FIRST_OBJC_AT_KEYWORD - T_FIRST_KEYWORD); return list.size() >= numberOfPrimitivesAndBasicKeywords + && list.contains(QLatin1String("override")) + && list.contains(QLatin1String("final")) && list.contains(QLatin1String("if")) && list.contains(QLatin1String("bool")); } diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index b6fd792f73dbe4f205f0e7cde52467c38cecf8a9..daa0af12a47acf4807ee8c9275c9f7dd2cf9ffb0 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -1937,6 +1937,12 @@ void InternalCppCompletionAssistProcessor::addKeywords() // primitive type completion items. for (int i = T_FIRST_PRIMITIVE; i <= T_LAST_PRIMITIVE; ++i) addCompletionItem(QLatin1String(Token::name(i)), m_icons.keywordIcon(), KeywordsOrder); + + // "Identifiers with special meaning" + if (m_interface->languageFeatures().cxx11Enabled) { + addCompletionItem(QLatin1String("override"), m_icons.keywordIcon(), KeywordsOrder); + addCompletionItem(QLatin1String("final"), m_icons.keywordIcon(), KeywordsOrder); + } } void InternalCppCompletionAssistProcessor::addMacros(const QString &fileName,