aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-09-29 23:19:48 +0100
committerSergio Martins <smartins@kde.org>2019-09-29 23:19:48 +0100
commitfa01953777c8f62862d4f57d465771f3776dad06 (patch)
tree50c2afd5437018b8184c7e8347e9c860eb5e1111 /src
parent788c7e1722eea9ca39032271bcc638115f76bcf9 (diff)
qproperty-type-mismatch: Be more robust against typedefs
Diffstat (limited to 'src')
-rw-r--r--src/checks/manuallevel/qproperty-type-mismatch.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/checks/manuallevel/qproperty-type-mismatch.cpp b/src/checks/manuallevel/qproperty-type-mismatch.cpp
index 06fd2099..ca246ea0 100644
--- a/src/checks/manuallevel/qproperty-type-mismatch.cpp
+++ b/src/checks/manuallevel/qproperty-type-mismatch.cpp
@@ -205,6 +205,13 @@ bool QPropertyTypeMismatch::typesMatch(const string &type1, QualType type2Qt, st
if (type1 == cleaned)
return true;
+ // Maybe it's a typedef
+ auto it = m_typedefMap.find(type1);
+ if (it != m_typedefMap.cend()) {
+ return it->second == type2Qt;
+
+ }
+
return false;
}