forked from qt-creator/qt-creator
CplusPlus: Fix minimal name construction
... when using declarations are involved.
Second attempt.
I have a suspicion that this is not the "correct" approach, however:
a) It appears to fix the problem.
b) It does not break any tests.
c) It's rather high in the call tree, so there's a low likelihood
of breaking something else.
d) Considering the hacky-looking pre-existing code dealing with
using declarations (e.g. LookupContext::lookupByUsing()),
it seems quite possible that there is no "correct" way with
the current infrastructure.
Fixes: QTCREATORBUG-14524
Change-Id: I28c6e53137c21ce158bbd03b92b3db39146116d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4322,7 +4322,6 @@ void Foo::otherFunc()
|
||||
QuickFixOperationTest(testDocuments, &factory);
|
||||
}
|
||||
|
||||
// FIXME: QTCREATORBUG-14524.
|
||||
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_usingDecl()
|
||||
{
|
||||
QList<QuickFixTestDocument::Ptr> testDocuments;
|
||||
@@ -4347,7 +4346,7 @@ void @func(const S &s);
|
||||
expected = R"(
|
||||
#include "file.h"
|
||||
|
||||
void func(const N::S &s)
|
||||
void func(const S &s)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -4376,7 +4375,7 @@ void @func(const N1::S &s);
|
||||
expected = R"(
|
||||
#include "file.h"
|
||||
|
||||
void func(const N1::N2::S &s)
|
||||
void func(const N1::S &s)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user