forked from qt-creator/qt-creator
CppEditor: Do not treat friend declaration as member function
... when trying to create definitions from declarations. Instead, we completely ignore friends in this context, arguing that the respective function normally should have a proper declaration somewhere else. Fixes: QTCREATORBUG-7164 Change-Id: I3ddb89cefecbc494f9c7e63600b65fd6288b7169 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -2847,7 +2847,7 @@ void InsertDefFromDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
|
||||
if (Symbol *symbol = simpleDecl->symbols->value) {
|
||||
if (Declaration *decl = symbol->asDeclaration()) {
|
||||
if (Function *func = decl->type()->asFunctionType()) {
|
||||
if (func->isSignal() || func->isPureVirtual())
|
||||
if (func->isSignal() || func->isPureVirtual() || func->isFriend())
|
||||
return;
|
||||
|
||||
// Check if there is already a definition
|
||||
|
||||
Reference in New Issue
Block a user