CppEditor: Fix following signals/slots in old-style connects

... if the first argument is a call to a function returning a pointer to
QObject.

Fixes: QTCREATORBUG-13265
Change-Id: I12c2d07331a0c6dca56ad55c518240fd74be3dca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2020-08-06 15:53:07 +02:00
parent c6a56cce28
commit 7cd9699766
3 changed files with 27 additions and 1 deletions

View File

@@ -1085,7 +1085,12 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
qDebug() << "- after typedef resolving:" << oo(ty);
if (accessOp == T_ARROW) {
if (PointerType *ptrTy = ty->asPointerType()) {
PointerType *ptrTy = ty->asPointerType();
if (!ptrTy) {
if (Function * const func = ty->asFunctionType())
ptrTy = func->returnType()->asPointerType();
}
if (ptrTy) {
FullySpecifiedType type = ptrTy->elementType();
if (ClassOrNamespace *binding
= findClassForTemplateParameterInExpressionScope(r.binding(),