forked from qt-creator/qt-creator
C++: Do not compare flags when matching types
Trust the matcher to do the job. Task-number: QTCREATORBUG-13564 Change-Id: I4ff14608a1ce12d3f4424242e50ba71233ac9bfd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
50efe4a5b3
commit
8bb176d2ec
@@ -4145,6 +4145,36 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_macroUses()
|
||||
ProjectPart::HeaderPaths(), 0, "QTCREATORBUG-12314");
|
||||
}
|
||||
|
||||
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_override()
|
||||
{
|
||||
QByteArray original =
|
||||
"struct Base {\n"
|
||||
" virtual int foo() = 0;\n"
|
||||
"};\n"
|
||||
"struct Derived : Base {\n"
|
||||
" int foo() override;\n"
|
||||
"};\n"
|
||||
"\n"
|
||||
"int Derived::fo@o()\n"
|
||||
"{\n"
|
||||
" return 5;\n"
|
||||
"}\n";
|
||||
|
||||
QByteArray expected =
|
||||
"struct Base {\n"
|
||||
" virtual int foo() = 0;\n"
|
||||
"};\n"
|
||||
"struct Derived : Base {\n"
|
||||
" int foo() override\n"
|
||||
" {\n"
|
||||
" return 5;\n"
|
||||
" }\n"
|
||||
"};\n\n\n";
|
||||
|
||||
MoveFuncDefToDecl factory;
|
||||
QuickFixOperationTest(singleDocument(original, expected), &factory);
|
||||
}
|
||||
|
||||
void CppEditorPlugin::test_quickfix_AssignToLocalVariable_templates()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user