diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-03-05 15:55:31 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-11 23:18:42 +0100 |
commit | c46b030cd301fc2ff05830765952a668bbdbc188 (patch) | |
tree | 5db538aa2d8be7c40d546c15d7a823d8a81153a5 /tests | |
parent | ed74ec4c40f1476c545bcaacb12fe3a607172035 (diff) |
Make headersclean in qtdeclarative enforce correct header conventions.
This test wasn't testing much before.
Refactor it to reuse headersclean from qtbase.
It will now fail to compile if the headers from this module don't follow
the rules.
Change-Id: I2816b85543da74f66b993b7ee705cdb9e1c0f1c8
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/headersclean/headersclean.pro | 13 | ||||
-rw-r--r-- | tests/auto/headersclean/qt_headersclean_headers.h (renamed from tests/auto/headersclean/tst_headersclean.cpp) | 25 | ||||
-rw-r--r-- | tests/auto/host.pro | 8 |
3 files changed, 17 insertions, 29 deletions
diff --git a/tests/auto/headersclean/headersclean.pro b/tests/auto/headersclean/headersclean.pro index 4ce05fe512..379648e950 100644 --- a/tests/auto/headersclean/headersclean.pro +++ b/tests/auto/headersclean/headersclean.pro @@ -1,6 +1,9 @@ -CONFIG += testcase -TARGET = tst_headersclean -SOURCES += tst_headersclean.cpp -QT = core testlib +QT = core testlib declarative qml quick qmltest qmldevtools +HEADERSCLEAN_PRI = $${QT.core.sources}/../../tests/auto/other/headersclean/headersclean.pri +isEmpty(QT.core.sources)|!include($$HEADERSCLEAN_PRI) { + warning("headersclean.pri from QtCore sources not available. test disabled") + TEMPLATE=subdirs +} -contains(QT_CONFIG,qml): QT += qml qml-private +# shadowing problems in scenegraph, allow it for now +*-g++*: QMAKE_CXXFLAGS -= -Wshadow diff --git a/tests/auto/headersclean/tst_headersclean.cpp b/tests/auto/headersclean/qt_headersclean_headers.h index d5131f96cd..d3f4e4b5c8 100644 --- a/tests/auto/headersclean/tst_headersclean.cpp +++ b/tests/auto/headersclean/qt_headersclean_headers.h @@ -39,24 +39,13 @@ ** ****************************************************************************/ -#define QT_NO_KEYWORDS -#define signals int -#define slots int -#define emit public:; -#define foreach public:; -#define forever public:; - -#include <QtCore/QtCore> -#include <QtTest/QtTest> +#ifndef QT_HEADERSCLEAN_HEADERS +#define QT_HEADERSCLEAN_HEADERS +#include <QtDeclarative/QtDeclarative> #include <QtQml/QtQml> +#include <QtQmlDevTools/QtQmlDevTools> +#include <QtQuick/QtQuick> +#include <QtQuickTest/QtQuickTest> -class tst_HeadersClean: public QObject -{ - Q_OBJECT -public: - tst_HeadersClean() {} -}; - -QTEST_MAIN(tst_HeadersClean) -#include "tst_headersclean.moc" +#endif diff --git a/tests/auto/host.pro b/tests/auto/host.pro index 0a96ef0413..eab6de2981 100644 --- a/tests/auto/host.pro +++ b/tests/auto/host.pro @@ -1,9 +1,5 @@ TEMPLATE=subdirs -# FIXME -# This test is crrently broken: -#SUBDIRS=\ - #headersclean \ - -SUBDIRS= +SUBDIRS=\ + headersclean \ |