forked from qt-creator/qt-creator
CplusPlus: Fix minimal name construction
... when creating the constructor implementation for a derived class.
We would erroneously strip off the class name.
Amends aae3ce15aa.
Change-Id: I62c800d490626e8cb9416829633f9ef7b0c666cd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4404,6 +4404,32 @@ void @func(const N1::S &s);
|
||||
void func(const N1::S &s)
|
||||
{
|
||||
|
||||
}
|
||||
)";
|
||||
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
|
||||
QuickFixOperationTest(testDocuments, &factory);
|
||||
|
||||
// No using declarations here, but the code model has one. No idea why.
|
||||
testDocuments.clear();
|
||||
original = R"(
|
||||
class B {};
|
||||
class D : public B {
|
||||
@D();
|
||||
};
|
||||
)";
|
||||
expected = original;
|
||||
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
|
||||
|
||||
// Source File
|
||||
original = R"(
|
||||
#include "file.h"
|
||||
)";
|
||||
expected = R"(
|
||||
#include "file.h"
|
||||
|
||||
D::D()
|
||||
{
|
||||
|
||||
}
|
||||
)";
|
||||
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
|
||||
|
||||
Reference in New Issue
Block a user