forked from qt-creator/qt-creator
CppEditor: Extend "Add Include" quickfix
... so it works for all kinds of symbols, not just Qt classes. Fixes: QTCREATORBUG-21 Change-Id: I2d329c09b64cd8f7eef8cce7d9f022aca8586c0d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -3771,6 +3771,20 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
|
||||
<< TestIncludePaths::globalQtCoreIncludePath()
|
||||
<< testDocuments << firstRefactoringOperation << "";
|
||||
testDocuments.clear();
|
||||
|
||||
original =
|
||||
"std::s@tring s;\n"
|
||||
;
|
||||
expected =
|
||||
"#include <string>\n"
|
||||
"\n"
|
||||
"std::string s;\n"
|
||||
;
|
||||
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
|
||||
QTest::newRow("inserting_std::string")
|
||||
<< TestIncludePaths::globalIncludePath()
|
||||
<< testDocuments << firstRefactoringOperation << "";
|
||||
testDocuments.clear();
|
||||
}
|
||||
|
||||
void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier()
|
||||
|
||||
Reference in New Issue
Block a user