[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [clazy/1.1] src/checks/level1: missing-qobject-macro: properly fix false-positives
From: Sergio Martins <null () kde ! org>
Date: 2017-03-31 23:37:13
Message-ID: E1cu66U-0001Vl-00 () code ! kde ! org
[Download RAW message or body]
Git commit 0f09f5126fd827a6593c8b9d10ad5173b240230a by Sergio Martins.
Committed on 31/03/2017 at 23:35.
Pushed by smartins into branch '1.1'.
missing-qobject-macro: properly fix false-positives
Was because of using pre-compiled headers.
Although it's also true that QCoreApplication doesn't have
Q_OBJECT during bootstrap it also isn't a QObject, so the
warning wouldn't apply anyway.
CCMAIL: allen.winter@kdab.com
M +1 -1 src/checks/level1/README-missing-qobject-macro.md
M +1 -1 src/checks/level1/missing-qobject-macro.cpp
https://commits.kde.org/clazy/0f09f5126fd827a6593c8b9d10ad5173b240230a
diff --git a/src/checks/level1/README-missing-qobject-macro.md \
b/src/checks/level1/README-missing-qobject-macro.md index 6d2f574..9047d8b 100644
--- a/src/checks/level1/README-missing-qobject-macro.md
+++ b/src/checks/level1/README-missing-qobject-macro.md
@@ -13,4 +13,4 @@ Finds `QObject` derived classes that don't have a Q_OBJECT macro.
- Templated QObjects
- Compilation time
-Requires clang >= 3.7
+Requires clang >= 3.7 and can't be used with pre-compiled headers support.
diff --git a/src/checks/level1/missing-qobject-macro.cpp \
b/src/checks/level1/missing-qobject-macro.cpp index 7e20a95..fe50b7d 100644
--- a/src/checks/level1/missing-qobject-macro.cpp
+++ b/src/checks/level1/missing-qobject-macro.cpp
@@ -59,7 +59,7 @@ void MissingQ_OBJECT::VisitDecl(clang::Decl *decl)
if (record->getDescribedClassTemplate() != nullptr) // moc doesn't accept \
Q_OBJECT in templates return;
- if (QtUtils::isBootstrapping(m_ci)) // avoid warnings when building bootstrap \
lib + if (m_checkManager->usingPreCompiledHeaders(m_ci))
return;
const SourceLocation startLoc = decl->getLocStart();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic