aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2017-10-11 11:46:36 +0100
committerSergio Martins <iamsergio@gmail.com>2017-10-11 11:46:36 +0100
commit9e802c0b7c245e86c58f5af72902027c2a87b3a9 (patch)
tree0e63625e0d7b8a50f081d4a1720993d9597f43f9 /src
parentcd239045a1579e23d0cd0a8070ab0eb80fbdb153 (diff)
parent175b6d12c9fe22de1ee854a1c8113ee03954a320 (diff)
Merge branch '1.2' into master
Diffstat (limited to 'src')
-rw-r--r--src/QtUtils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/QtUtils.cpp b/src/QtUtils.cpp
index cc889c86..b26d4af1 100644
--- a/src/QtUtils.cpp
+++ b/src/QtUtils.cpp
@@ -150,6 +150,12 @@ bool QtUtils::isConvertibleTo(const Type *source, const Type *target)
if (source->isFloatingType() && target->isFloatingType())
return true;
+ // "QString" can convert to "const QString &" and vice versa
+ if (source->isReferenceType() && source->getPointeeType().isConstQualified() && source->getPointeeType().getTypePtrOrNull() == target)
+ return true;
+ if (target->isReferenceType() && target->getPointeeType().isConstQualified() && target->getPointeeType().getTypePtrOrNull() == source)
+ return true;
+
return false;
}