From 4db38197c2bac8bcee9d08a0e20ed2c8d127b8f2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 13 Feb 2018 12:25:10 +0100 Subject: Testlib: Rename qtest_global.h to qttestglobal.h This follows the naming convention for global headers and causes qttestglobal.h to be added to the top of the generated QtTest header. It is necessary to have it there when other headers depend on features defined in configure.json. [ChangeLog][QtTest] The qtest_global.h header is now deprecated. Include qttestglobal.h instead. Change-Id: Iaed639d4e13dd99cee6387fce9d15d6e55b0b1e8 Reviewed-by: Oswald Buddenhagen --- src/testlib/qabstractitemmodeltester.h | 2 +- src/testlib/qbenchmark.h | 2 +- src/testlib/qbenchmark_p.h | 2 +- src/testlib/qbenchmarkmetric.h | 2 +- src/testlib/qbenchmarkmetric_p.h | 2 +- src/testlib/qtest.h | 2 +- src/testlib/qtest_global.h | 75 ---------------------------------- src/testlib/qtestaccessible.h | 2 +- src/testlib/qtestblacklist_p.h | 2 +- src/testlib/qtestcase.h | 2 +- src/testlib/qtestdata.h | 2 +- src/testlib/qtestevent.h | 2 +- src/testlib/qtesteventloop.h | 2 +- src/testlib/qtestkeyboard.h | 2 +- src/testlib/qtestlog_p.h | 2 +- src/testlib/qtestmouse.cpp | 2 +- src/testlib/qtestmouse.h | 2 +- src/testlib/qtestresult_p.h | 2 +- src/testlib/qtesttable_p.h | 2 +- src/testlib/qtesttouch.h | 2 +- src/testlib/qttestglobal.h | 74 +++++++++++++++++++++++++++++++++ src/testlib/testlib.pro | 4 +- 22 files changed, 95 insertions(+), 96 deletions(-) delete mode 100644 src/testlib/qtest_global.h create mode 100644 src/testlib/qttestglobal.h (limited to 'src/testlib') diff --git a/src/testlib/qabstractitemmodeltester.h b/src/testlib/qabstractitemmodeltester.h index 617e189817..e85d7522f7 100644 --- a/src/testlib/qabstractitemmodeltester.h +++ b/src/testlib/qabstractitemmodeltester.h @@ -30,7 +30,7 @@ #define QABSTRACTITEMMODELTESTER_H #include -#include +#include #ifdef QT_GUI_LIB #include diff --git a/src/testlib/qbenchmark.h b/src/testlib/qbenchmark.h index 1340fd7715..4a55fcc23e 100644 --- a/src/testlib/qbenchmark.h +++ b/src/testlib/qbenchmark.h @@ -40,7 +40,7 @@ #ifndef QBENCHMARK_H #define QBENCHMARK_H -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qbenchmark_p.h b/src/testlib/qbenchmark_p.h index dbfa0127b6..3fa9c5f534 100644 --- a/src/testlib/qbenchmark_p.h +++ b/src/testlib/qbenchmark_p.h @@ -69,7 +69,7 @@ #include #include -#include +#include #ifdef QTESTLIB_USE_VALGRIND #include #endif diff --git a/src/testlib/qbenchmarkmetric.h b/src/testlib/qbenchmarkmetric.h index 6e423473b1..6605606402 100644 --- a/src/testlib/qbenchmarkmetric.h +++ b/src/testlib/qbenchmarkmetric.h @@ -41,7 +41,7 @@ #ifndef QBENCHMARKMETRIC_H #define QBENCHMARKMETRIC_H -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qbenchmarkmetric_p.h b/src/testlib/qbenchmarkmetric_p.h index a036c645bf..049b9711e2 100644 --- a/src/testlib/qbenchmarkmetric_p.h +++ b/src/testlib/qbenchmarkmetric_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index a5df27e3b9..1cb6a91d33 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -41,7 +41,7 @@ #ifndef QTEST_H #define QTEST_H -#include +#include #include #include #include diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h deleted file mode 100644 index 3fbb1d428c..0000000000 --- a/src/testlib/qtest_global.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtTest module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTEST_GLOBAL_H -#define QTEST_GLOBAL_H - -#include - -QT_BEGIN_NAMESPACE - - -#if defined(QT_STATIC) -# define Q_TESTLIB_EXPORT -#else -# ifdef QT_BUILD_TESTLIB_LIB -# define Q_TESTLIB_EXPORT Q_DECL_EXPORT -# else -# define Q_TESTLIB_EXPORT Q_DECL_IMPORT -# endif -#endif - -#if (defined Q_CC_HPACC) && (defined __ia64) -# ifdef Q_TESTLIB_EXPORT -# undef Q_TESTLIB_EXPORT -# endif -# define Q_TESTLIB_EXPORT -#endif - -#define QTEST_VERSION QT_VERSION -#define QTEST_VERSION_STR QT_VERSION_STR - -namespace QTest -{ - enum TestFailMode { Abort = 1, Continue = 2 }; -} - -QT_END_NAMESPACE - -#endif diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h index 0470d15ed7..d14dcec031 100644 --- a/src/testlib/qtestaccessible.h +++ b/src/testlib/qtestaccessible.h @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #if QT_CONFIG(accessibility) diff --git a/src/testlib/qtestblacklist_p.h b/src/testlib/qtestblacklist_p.h index df205fc77b..08ce052231 100644 --- a/src/testlib/qtestblacklist_p.h +++ b/src/testlib/qtestblacklist_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index cc666c365a..54669c11de 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -40,7 +40,7 @@ #ifndef QTESTCASE_H #define QTESTCASE_H -#include +#include #include #include diff --git a/src/testlib/qtestdata.h b/src/testlib/qtestdata.h index c87236fcfc..cf10fed8f3 100644 --- a/src/testlib/qtestdata.h +++ b/src/testlib/qtestdata.h @@ -40,7 +40,7 @@ #ifndef QTESTDATA_H #define QTESTDATA_H -#include +#include #include #include diff --git a/src/testlib/qtestevent.h b/src/testlib/qtestevent.h index 159e3e01ff..3f6bd20bd8 100644 --- a/src/testlib/qtestevent.h +++ b/src/testlib/qtestevent.h @@ -45,7 +45,7 @@ #pragma qt_no_master_include #endif -#include +#include #ifdef QT_GUI_LIB #include #include diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h index 81c0b9126c..19ad22565e 100644 --- a/src/testlib/qtesteventloop.h +++ b/src/testlib/qtesteventloop.h @@ -40,7 +40,7 @@ #ifndef QTESTEVENTLOOP_H #define QTESTEVENTLOOP_H -#include +#include #include #include diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h index a7cf78f25a..63501ffb1e 100644 --- a/src/testlib/qtestkeyboard.h +++ b/src/testlib/qtestkeyboard.h @@ -46,7 +46,7 @@ #endif #include -#include +#include #include #include diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h index f72c047c35..3d28795188 100644 --- a/src/testlib/qtestlog_p.h +++ b/src/testlib/qtestlog_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtestmouse.cpp b/src/testlib/qtestmouse.cpp index eda7edbd89..76369e0490 100644 --- a/src/testlib/qtestmouse.cpp +++ b/src/testlib/qtestmouse.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index e2835828a1..e3e446577d 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -45,7 +45,7 @@ #pragma qt_no_master_include #endif -#include +#include #include #include #include diff --git a/src/testlib/qtestresult_p.h b/src/testlib/qtestresult_p.h index 061ca5f311..4df75b2805 100644 --- a/src/testlib/qtestresult_p.h +++ b/src/testlib/qtestresult_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtesttable_p.h b/src/testlib/qtesttable_p.h index 53de9a2f43..d2f389a134 100644 --- a/src/testlib/qtesttable_p.h +++ b/src/testlib/qtesttable_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h index 83ca83602e..20a9476ee7 100644 --- a/src/testlib/qtesttouch.h +++ b/src/testlib/qtesttouch.h @@ -45,7 +45,7 @@ #pragma qt_no_master_include #endif -#include +#include #include #include #include diff --git a/src/testlib/qttestglobal.h b/src/testlib/qttestglobal.h new file mode 100644 index 0000000000..d07464345d --- /dev/null +++ b/src/testlib/qttestglobal.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtTest module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTTESTGLOBAL_H +#define QTTESTGLOBAL_H + +#include + +QT_BEGIN_NAMESPACE + +#if defined(QT_STATIC) +# define Q_TESTLIB_EXPORT +#else +# ifdef QT_BUILD_TESTLIB_LIB +# define Q_TESTLIB_EXPORT Q_DECL_EXPORT +# else +# define Q_TESTLIB_EXPORT Q_DECL_IMPORT +# endif +#endif + +#if (defined Q_CC_HPACC) && (defined __ia64) +# ifdef Q_TESTLIB_EXPORT +# undef Q_TESTLIB_EXPORT +# endif +# define Q_TESTLIB_EXPORT +#endif + +#define QTEST_VERSION QT_VERSION +#define QTEST_VERSION_STR QT_VERSION_STR + +namespace QTest +{ + enum TestFailMode { Abort = 1, Continue = 2 }; +} + +QT_END_NAMESPACE + +#endif diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index 109feee630..1e1f21e740 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -29,7 +29,6 @@ HEADERS = \ qtestdata.h \ qtestevent.h \ qtesteventloop.h \ - qtest_global.h \ qtest_gui.h \ qtest_network.h \ qtest_widgets.h \ @@ -40,7 +39,8 @@ HEADERS = \ qtestsystem.h \ qtesttouch.h \ qtestblacklist_p.h \ - qtesthelpers_p.h + qtesthelpers_p.h \ + qttestglobal.h SOURCES = \ qabstractitemmodeltester.cpp \ -- cgit v1.2.3