diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-08-06 15:53:07 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-08-10 12:30:28 +0000 |
commit | 7cd9699766b9ec6fd9e109cb92d83342ee3e0f54 (patch) | |
tree | 8d1e49cc09f3424298dbc98a461cf20d9d512ffe /src/libs/cplusplus/ResolveExpression.cpp | |
parent | c6a56cce28807d84e1ba01925061ec301e79440c (diff) | |
download | qt-creator-7cd9699766b9ec6fd9e109cb92d83342ee3e0f54.tar.gz |
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>
Diffstat (limited to 'src/libs/cplusplus/ResolveExpression.cpp')
-rw-r--r-- | src/libs/cplusplus/ResolveExpression.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp index 81b2066634..99db8cef9d 100644 --- a/src/libs/cplusplus/ResolveExpression.cpp +++ b/src/libs/cplusplus/ResolveExpression.cpp @@ -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(), |