aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-10-01 16:02:58 +0100
committerSergio Martins <smartins@kde.org>2019-10-01 16:02:58 +0100
commitc973a48c983f1d571d0489964f7226fcbe72f67c (patch)
treee587aaacdedaf2034569c061c4e8348f29349aa5 /src
parent0163ee956e82efcf830c174614bd761192f71b97 (diff)
qproperty-time-mismatch: Fix false-positives about QPrivateSignal
Diffstat (limited to 'src')
-rw-r--r--src/checks/manuallevel/qproperty-type-mismatch.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/checks/manuallevel/qproperty-type-mismatch.cpp b/src/checks/manuallevel/qproperty-type-mismatch.cpp
index 7445d489..5ca6f22c 100644
--- a/src/checks/manuallevel/qproperty-type-mismatch.cpp
+++ b/src/checks/manuallevel/qproperty-type-mismatch.cpp
@@ -178,8 +178,11 @@ void QPropertyTypeMismatch::checkMethodAgainstProperty (const Property& prop, co
case 1:
{
std::string param0TypeStr;
- if (!typesMatch(prop.type, method.getParamDecl(0)->getType(), param0TypeStr))
- emitWarning(&method, error_begin() + "signal '" + methodName + "' with parameter of type '"+ param0TypeStr +"'");
+ if (!typesMatch(prop.type, method.getParamDecl(0)->getType(), param0TypeStr)) {
+ const bool isPrivateSignal = param0TypeStr.find("QPrivateSignal") != std::string::npos;
+ if (!isPrivateSignal)
+ emitWarning(&method, error_begin() + "signal '" + methodName + "' with parameter of type '"+ param0TypeStr +"'");
+ }
break;
}
default: