[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: Don't warn while building Qt bootstrap
From: Sergio Martins <null () kde ! org>
Date: 2017-03-31 10:15:56
Message-ID: E1cttb2-0007Ad-1A () code ! kde ! org
[Download RAW message or body]
Git commit 7a508664668f6efd7cd41656937026de78586fc3 by Sergio Martins.
Committed on 31/03/2017 at 10:15.
Pushed by smartins into branch '1.1'.
missing-qobject-macro: Don't warn while building Qt bootstrap
Because that lib builds with QT_NO_QOBJECT.
CCMAIL: allen.winter@kdab.com
M +3 -0 src/checks/level1/missing-qobject-macro.cpp
https://commits.kde.org/clazy/7a508664668f6efd7cd41656937026de78586fc3
diff --git a/src/checks/level1/missing-qobject-macro.cpp b/src/checks/level1/missing-qobject-macro.cpp
index c1d4195..7e20a95 100644
--- a/src/checks/level1/missing-qobject-macro.cpp
+++ b/src/checks/level1/missing-qobject-macro.cpp
@@ -59,6 +59,9 @@ 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
+ return;
+
const SourceLocation startLoc = decl->getLocStart();
for (const SourceLocation &loc : m_qobjectMacroLocations) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic