diff options
author | Sergio Martins <smartins@kde.org> | 2017-11-08 13:38:41 +0000 |
---|---|---|
committer | Sergio Martins <iamsergio@gmail.com> | 2017-11-08 13:38:41 +0000 |
commit | 554914dba7ad6db634ce7b0e2bb117c6f8167958 (patch) | |
tree | 36e90c3b06b3003fc0ca9fd19f4361f37a0f1f63 /src | |
parent | e77b0e16f88c7b7b08aa1d6972d439620f1c7462 (diff) |
old-style-connect: Only execute Qt specific code in Qt developer mode
Diffstat (limited to 'src')
-rw-r--r-- | src/checks/level2/oldstyleconnect.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/checks/level2/oldstyleconnect.cpp b/src/checks/level2/oldstyleconnect.cpp index 1a4fabef..02440913 100644 --- a/src/checks/level2/oldstyleconnect.cpp +++ b/src/checks/level2/oldstyleconnect.cpp @@ -182,7 +182,8 @@ void OldStyleConnect::VisitStmt(Stmt *s) if (!call) return; - if (m_lastMethodDecl && m_lastMethodDecl->getParent() && m_lastMethodDecl->getParent()->getNameAsString() == "QObject") // Don't warn of stuff inside qobject.h + if (m_lastMethodDecl && m_context->isQtDeveloper() && m_lastMethodDecl->getParent() && + m_lastMethodDecl->getParent()->getNameAsString() == "QObject") // Don't warn of stuff inside qobject.h return; FunctionDecl *function = call->getDirectCallee(); @@ -319,7 +320,7 @@ vector<FixItHint> OldStyleConnect::fixits(int classification, CallExpr *call) if (isPrivateSlot(methodName)) { msg = "Converting Q_PRIVATE_SLOTS not implemented yet\n"; } else { - if (classIsOk(lastRecordDecl->getNameAsString())) { + if (m_context->isQtDeveloper() && classIsOk(lastRecordDecl->getNameAsString())) { // This is OK return {}; } else { |