Mark system includes as such
Useful so you don't get warnings about unfixable things
commit8c790539b21309f9df573186395effa15d04e028
authorAlbert Astals Cid <albert.astals@canonical.com>
dateMon 27 Jun 2016, 18:44 (10 years ago)
parente3b26a3aeb8490
plugins/Cursor/CMakeLists.txt+4
@@ -3,6 +3,10 @@ add_subdirectory(3rd_party)
33include_directories(
44 ${CMAKE_CURRENT_SOURCE_DIR}
55 ${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/xcursor
6+)
7+
8+include_directories(
9+ SYSTEM
610 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
711)
812
plugins/Dash/CMakeLists.txt+4
@@ -10,6 +10,10 @@ endif()
1010include_directories(
1111 ${CMAKE_CURRENT_SOURCE_DIR}
1212 ${CMAKE_CURRENT_BINARY_DIR}
13+)
14+
15+include_directories(
16+ SYSTEM
1317 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
1418 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1519 ${Qt5V8_PRIVATE_INCLUDE_DIR}
plugins/Dash/abstractdashview.h+1−3
@@ -21,11 +21,9 @@
2121
2222class QAbstractItemModel;
2323class QQmlComponent;
24−#pragma GCC diagnostic push
25−#pragma GCC diagnostic ignored "-pedantic"
24+
2625#include <private/qqmldelegatemodel_p.h>
2726#include <qqmlinfo.h>
28−#pragma GCC diagnostic pop
2927
3028class AbstractDashView : public QQuickItem
3129{
plugins/Dash/horizontaljournal.cpp+1−4
@@ -26,12 +26,9 @@
2626#include "horizontaljournal.h"
2727
2828#include <qqmlengine.h>
29−#pragma GCC diagnostic push
30−#pragma GCC diagnostic ignored "-pedantic"
31−#include <private/qqmldelegatemodel_p.h>
3229#include <qqmlinfo.h>
30+#include <private/qqmldelegatemodel_p.h>
3331#include <private/qquickitem_p.h>
34−#pragma GCC diagnostic pop
3532
3633HorizontalJournal::HorizontalJournal()
3734 : m_firstVisibleIndex(-1)
plugins/Dash/listviewwithpageheader.cpp−3
@@ -95,14 +95,11 @@
9595#include <QDebug>
9696#include <qqmlinfo.h>
9797#include <qqmlengine.h>
98−#pragma GCC diagnostic push
99−#pragma GCC diagnostic ignored "-pedantic"
10098#include <private/qqmlcontext_p.h>
10199#include <private/qqmldelegatemodel_p.h>
102100#include <private/qqmlglobal_p.h>
103101#include <private/qquickitem_p.h>
104102#include <private/qquickanimation_p.h>
105−#pragma GCC diagnostic pop
106103// #include <private/qquickrectangle_p.h>
107104
108105qreal ListViewWithPageHeader::ListItem::height() const
plugins/Dash/organicgrid.cpp−3
@@ -16,10 +16,7 @@
1616
1717#include "organicgrid.h"
1818
19−#pragma GCC diagnostic push
20−#pragma GCC diagnostic ignored "-pedantic"
2119#include <private/qquickitem_p.h>
22−#pragma GCC diagnostic pop
2320
2421OrganicGrid::OrganicGrid()
2522 : m_firstVisibleIndex(-1)
plugins/Dash/verticaljournal.cpp−3
@@ -27,10 +27,7 @@
2727 */
2828#include "verticaljournal.h"
2929
30−#pragma GCC diagnostic push
31−#pragma GCC diagnostic ignored "-pedantic"
3230#include <private/qquickitem_p.h>
33−#pragma GCC diagnostic pop
3431
3532VerticalJournal::VerticalJournal()
3633 : m_columnWidth(0)
plugins/Lights/CMakeLists.txt+1
@@ -2,6 +2,7 @@ pkg_check_modules(ANDROID_HEADERS REQUIRED android-headers)
22pkg_check_modules(ANDROID_HARDWARE REQUIRED libhardware)
33
44include_directories(
5+ SYSTEM
56 ${ANDROID_HEADERS_INCLUDE_DIRS}
67)
78
plugins/Lights/android-hardware.h−4
@@ -15,9 +15,5 @@
1515 *
1616 */
1717
18−// The purpose of this header wrapper is just to avoid having warnings being reported on
19−// code from external header files, as we can't do anything about them.
20−#pragma GCC system_header
21−
2218#include <hardware/hardware.h>
2319#include <hardware/lights.h>
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt−1
@@ -1,7 +1,6 @@
11include_directories(
22 ${CMAKE_CURRENT_SOURCE_DIR}
33 ${CMAKE_CURRENT_BINARY_DIR}
4− ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
54)
65
76set(DOWNLOADDAEMONLISTENER_SOURCES
plugins/Ubuntu/Gestures/CMakeLists.txt+5−1
@@ -24,7 +24,10 @@ qt5_use_modules(UbuntuGesturesQml Core Quick)
2424# So that Foo.cpp can #include "Foo.moc"
2525include_directories(${CMAKE_CURRENT_BINARY_DIR})
2626
27−include_directories(${UBUNTUGESTURES_INCLUDE_DIRS})
27+include_directories(
28+ SYSTEM
29+ ${UBUNTUGESTURES_INCLUDE_DIRS}
30+)
2831
2932# There's no cmake var for v8 include path :-/ so create one
3033LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
@@ -32,6 +35,7 @@ SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/QtV8/${Qt5Core_VERSION_STRING}/QtV8)
3235
3336# DANGER! DANGER! Using Qt's private API!
3437include_directories(
38+ SYSTEM
3539 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
3640 ${Qt5Quick_INCLUDE_DIRS}
3741 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
plugins/Ubuntu/Gestures/TouchDispatcher.cpp−4
@@ -19,11 +19,7 @@
1919#include <QGuiApplication>
2020#include <QScopedPointer>
2121#include <QStyleHints>
22−
23−#pragma GCC diagnostic push
24−#pragma GCC diagnostic ignored "-pedantic"
2522#include <private/qquickitem_p.h>
26−#pragma GCC diagnostic pop
2723
2824#define TOUCHDISPATCHER_DEBUG 0
2925
plugins/Unity/Indicators/CMakeLists.txt+4
@@ -6,6 +6,10 @@ find_package(Qt5Quick REQUIRED)
66include_directories(
77 ${CMAKE_CURRENT_SOURCE_DIR}
88 ${CMAKE_CURRENT_BINARY_DIR}
9+)
10+
11+include_directories(
12+ SYSTEM
913 ${GLIB_INCLUDE_DIRS}
1014 ${GIO_INCLUDE_DIRS}
1115 ${QMENUMODEL_INCLUDE_DIRS}
plugins/Utils/CMakeLists.txt+4
@@ -1,6 +1,10 @@
11include_directories(
22 ${CMAKE_CURRENT_SOURCE_DIR}
33 ${CMAKE_CURRENT_BINARY_DIR}
4+)
5+
6+include_directories(
7+ SYSTEM
48 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
59 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
610 ${GIO_INCLUDE_DIRS}
plugins/Utils/globalfunctions.cpp+1−4
@@ -16,11 +16,8 @@
1616
1717#include "globalfunctions.h"
1818
19−#pragma GCC diagnostic push
20−#pragma GCC diagnostic ignored "-pedantic"
21−#include <private/qquickitem_p.h>
22−#pragma GCC diagnostic pop
2319#include <QQmlEngine>
20+#include <private/qquickitem_p.h>
2421
2522GlobalFunctions::GlobalFunctions(QObject *parent)
2623 : QObject(parent)
src/CMakeLists.txt+1
@@ -1,6 +1,7 @@
11pkg_check_modules(CONNECTIVITY REQUIRED connectivity-qt1)
22
33include_directories(
4+ SYSTEM
45 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
56 ${CONNECTIVITY_INCLUDE_DIRS}
67)
tests/mocks/Utils/CMakeLists.txt+5−1
@@ -1,10 +1,14 @@
11include_directories(
22 ${CMAKE_CURRENT_SOURCE_DIR}
33 ${CMAKE_CURRENT_BINARY_DIR}
4+ ${CMAKE_SOURCE_DIR}/plugins/Utils
5+)
6+
7+include_directories(
8+ SYSTEM
49 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
510 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
611 ${GIO_INCLUDE_DIRS}
7− ${CMAKE_SOURCE_DIR}/plugins/Utils
812)
913
1014set(QMLPLUGIN_SRC
tests/plugins/Dash/CMakeLists.txt+4
@@ -12,10 +12,14 @@ endif()
1212
1313
1414include_directories(
15+ SYSTEM
1516 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
1617 ${Qt5Quick_INCLUDE_DIRS}
1718 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1819 ${Qt5V8_PRIVATE_INCLUDE_DIR}
20+ )
21+
22+include_directories(
1923 ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash
2024 ${CMAKE_CURRENT_BINARY_DIR}
2125 )
tests/plugins/Dash/horizontaljournaltest.cpp−3
@@ -23,10 +23,7 @@
2323#include <QStringListModel>
2424#include <QQmlContext>
2525#include <QQmlEngine>
26−#pragma GCC diagnostic push
27−#pragma GCC diagnostic ignored "-pedantic"
2826#include <private/qquickitem_p.h>
29−#pragma GCC diagnostic pop
3027
3128#include "horizontaljournal.h"
3229
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp−3
@@ -22,12 +22,9 @@
2222#include <QSignalSpy>
2323#include <QSortFilterProxyModel>
2424#include <QtTestGui>
25−#pragma GCC diagnostic push
26−#pragma GCC diagnostic ignored "-pedantic"
2725#include <private/qqmllistmodel_p.h>
2826#include <private/qquickanimation_p.h>
2927#include <private/qquickitem_p.h>
30−#pragma GCC diagnostic pop
3128
3229class StringListModel : public QAbstractListModel
3330{
tests/plugins/Dash/listviewwithpageheadersectiontest.cpp−3
@@ -21,12 +21,9 @@
2121#include <QQuickView>
2222#include <QSignalSpy>
2323#include <QtTestGui>
24−#pragma GCC diagnostic push
25−#pragma GCC diagnostic ignored "-pedantic"
2624#include <private/qqmllistmodel_p.h>
2725#include <private/qquickanimation_p.h>
2826#include <private/qquickitem_p.h>
29−#pragma GCC diagnostic pop
3027
3128class ListViewWithPageHeaderTestSection : public QObject
3229{
tests/plugins/Dash/listviewwithpageheadertest.cpp−3
@@ -21,12 +21,9 @@
2121#include <QQuickView>
2222#include <QSignalSpy>
2323#include <QtTestGui>
24−#pragma GCC diagnostic push
25−#pragma GCC diagnostic ignored "-pedantic"
2624#include <private/qqmllistmodel_p.h>
2725#include <private/qquickanimation_p.h>
2826#include <private/qquickitem_p.h>
29−#pragma GCC diagnostic pop
3027
3128#include <limits>
3229
tests/plugins/Dash/organicgridtest.cpp−3
@@ -23,10 +23,7 @@
2323#include <QStringListModel>
2424#include <QQmlContext>
2525#include <QQmlEngine>
26−#pragma GCC diagnostic push
27−#pragma GCC diagnostic ignored "-pedantic"
2826#include <private/qquickitem_p.h>
29−#pragma GCC diagnostic pop
3027
3128#include "organicgrid.h"
3229
tests/plugins/Dash/verticaljournaltest.cpp−3
@@ -23,10 +23,7 @@
2323#include <QStringListModel>
2424#include <QQmlContext>
2525#include <QQmlEngine>
26−#pragma GCC diagnostic push
27−#pragma GCC diagnostic ignored "-pedantic"
2826#include <private/qquickitem_p.h>
29−#pragma GCC diagnostic pop
3027
3128#include "verticaljournal.h"
3229
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+3−2
@@ -4,14 +4,15 @@ pkg_check_modules(UBUNTUGESTURES REQUIRED UbuntuGestures)
44
55# DANGER! DANGER! Using Qt's private API!
66include_directories(
7+ SYSTEM
78 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
9+ ${UBUNTUGESTURES_INCLUDE_DIRS}
10+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
811)
912
1013include_directories(
1114 ${CMAKE_SOURCE_DIR}/plugins/Ubuntu/Gestures
12− ${UBUNTUGESTURES_INCLUDE_DIRS}
1315 ${CMAKE_CURRENT_BINARY_DIR}
14− ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1516 )
1617
1718export_qmlfiles(UbuntuGesturesTest .)
tests/qmltests/Components/CMakeLists.txt+5−1
@@ -6,8 +6,12 @@ pkg_check_modules(UBUNTUGESTURES REQUIRED UbuntuGestures)
66
77include_directories(
88 ${CMAKE_SOURCE_DIR}/plugins/Ubuntu/Gestures
9− ${UBUNTUGESTURES_INCLUDE_DIRS}
109 ${CMAKE_CURRENT_BINARY_DIR}
10+ )
11+
12+include_directories(
13+ SYSTEM
14+ ${UBUNTUGESTURES_INCLUDE_DIRS}
1115 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1216 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1317 ${UBUNTUGESTURES_INCLUDEDIR}/UbuntuGestures/${UBUNTUGESTURES_VERSION}
tests/utils/modules/Unity/Test/CMakeLists.txt+5−1
@@ -5,10 +5,14 @@ add_definitions(-DQT_NO_KEYWORDS)
55pkg_check_modules(UBUNTUGESTURES REQUIRED UbuntuGestures)
66
77include_directories(
8+ ${CMAKE_SOURCE_DIR}/src
9+)
10+
11+include_directories(
12+ SYSTEM
813 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
914 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1015 ${UBUNTUGESTURES_INCLUDE_DIRS}
11− ${CMAKE_SOURCE_DIR}/src
1216)
1317
1418set(UnityTestQML_SOURCES