forked from qt-creator/qt-creator
CppEditor: Add missing template arguments
... in "Add Virtual Methods From Base Class" quickfix. Fixes: QTCREATORBUG-25589 Change-Id: I5ffef27acf151422ec4f56d48451e263664bfc2d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -783,6 +783,7 @@ public:
|
|||||||
printer.showFunctionSignatures = true;
|
printer.showFunctionSignatures = true;
|
||||||
printer.showReturnTypes = true;
|
printer.showReturnTypes = true;
|
||||||
printer.showArgumentNames = true;
|
printer.showArgumentNames = true;
|
||||||
|
printer.showTemplateParameters = true;
|
||||||
Utils::ChangeSet headerChangeSet;
|
Utils::ChangeSet headerChangeSet;
|
||||||
const CppRefactoringChanges refactoring(snapshot());
|
const CppRefactoringChanges refactoring(snapshot());
|
||||||
const QString filename = currentFile()->fileName();
|
const QString filename = currentFile()->fileName();
|
||||||
@@ -1906,7 +1907,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
|||||||
original =
|
original =
|
||||||
"class BaseA {\n"
|
"class BaseA {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
" virtual int a() = 0;\n"
|
" virtual int a(const std::vector<int> &v) = 0;\n"
|
||||||
"};\n\n"
|
"};\n\n"
|
||||||
"class Derived : public Bas@eA {\n"
|
"class Derived : public Bas@eA {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
@@ -1915,7 +1916,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
|||||||
expected =
|
expected =
|
||||||
"class BaseA {\n"
|
"class BaseA {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
" virtual int a() = 0;\n"
|
" virtual int a(const std::vector<int> &v) = 0;\n"
|
||||||
"};\n\n"
|
"};\n\n"
|
||||||
"class Derived : public BaseA {\n"
|
"class Derived : public BaseA {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
@@ -1923,7 +1924,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
|||||||
"\n"
|
"\n"
|
||||||
" // BaseA interface\n"
|
" // BaseA interface\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
" virtual int a();\n"
|
" virtual int a(const std::vector<int> &v);\n"
|
||||||
"};\n";
|
"};\n";
|
||||||
testFiles << Tests::QuickFixTestDocument::create("file.h", original, expected);
|
testFiles << Tests::QuickFixTestDocument::create("file.h", original, expected);
|
||||||
|
|
||||||
@@ -1932,7 +1933,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
|||||||
expected =
|
expected =
|
||||||
"#include \"file.h\"\n"
|
"#include \"file.h\"\n"
|
||||||
"\n\n"
|
"\n\n"
|
||||||
"int Derived::a()\n"
|
"int Derived::a(const std::vector<int> &v)\n"
|
||||||
"{\n}";
|
"{\n}";
|
||||||
testFiles << Tests::QuickFixTestDocument::create("file.cpp", original, expected);
|
testFiles << Tests::QuickFixTestDocument::create("file.cpp", original, expected);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user