forked from qt-creator/qt-creator
CppEditor: Add enclosing template on "Move Definition Outside"
The template id for the class name is missing, but it's better than
nothing.
For example:
template<class T>
class Foo
{
void func() {} // Move Definition Outside Class
};
// The following lines are added
template<class T>
void Foo::func() {} // Should be Foo<T>::func
Task-number: QTCREATORBUG-16649
Change-Id: Icb560e0b87f563cbda18f4742f44bb8ef4d8a900
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
d0d1f43e8f
commit
34baa3ec47
@@ -4144,11 +4144,11 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_template()
|
||||
"class Foo { void fu@nc(); };\n"
|
||||
"\n"
|
||||
"template<class T>\n"
|
||||
"void Foo<T>::func() {}\n";
|
||||
"void Foo::func() {}\n"; // Should be Foo<T>::func
|
||||
;
|
||||
|
||||
MoveFuncDefOutside factory;
|
||||
QuickFixOperationTest(singleDocument(original, expected), &factory, {}, 0, "QTCREATORBUG-16649");
|
||||
QuickFixOperationTest(singleDocument(original, expected), &factory);
|
||||
}
|
||||
|
||||
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
|
||||
|
||||
Reference in New Issue
Block a user