forked from qt-creator/qt-creator
CppEditor: Do not add redundant access specifier
... when inserting a member function declaration for a definition. Fixes: QTCREATORBUG-5591 Change-Id: Ie85b435a1595832d0085abdcc0a4187d939820e0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4707,6 +4707,9 @@ void insertToSectionDeclFromDef(const QByteArray §ion, int sectionIndex)
|
||||
|
||||
QByteArray original;
|
||||
QByteArray expected;
|
||||
QByteArray sectionString = section + ":\n";
|
||||
if (sectionIndex == 4)
|
||||
sectionString.clear();
|
||||
|
||||
// Header File
|
||||
original =
|
||||
@@ -4716,7 +4719,7 @@ void insertToSectionDeclFromDef(const QByteArray §ion, int sectionIndex)
|
||||
expected =
|
||||
"class Foo\n"
|
||||
"{\n"
|
||||
+ section + ":\n" +
|
||||
+ sectionString +
|
||||
" Foo();\n"
|
||||
"@};\n";
|
||||
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
|
||||
|
||||
Reference in New Issue
Block a user