diff options
author | Sergio Martins <smartins@kde.org> | 2019-09-29 23:19:48 +0100 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2019-09-29 23:19:48 +0100 |
commit | fa01953777c8f62862d4f57d465771f3776dad06 (patch) | |
tree | 50c2afd5437018b8184c7e8347e9c860eb5e1111 /src | |
parent | 788c7e1722eea9ca39032271bcc638115f76bcf9 (diff) |
qproperty-type-mismatch: Be more robust against typedefs
Diffstat (limited to 'src')
-rw-r--r-- | src/checks/manuallevel/qproperty-type-mismatch.cpp | 7 |
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; } |