diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-04-20 11:41:40 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-04-26 15:10:15 +0200 |
commit | a7138c4fd1dcaff5099b9a68beccfe1de48fa723 (patch) | |
tree | a4705525a589270bfd9614a29d61520bf9422be2 /tests/auto/corelib | |
parent | 76f9a768e89351e8b0690cdf2889bc45441f9686 (diff) |
Clean up includes involving tst_qmetatype_common.h
The functions it defines depend on many many types in QtCore for which
it did not have a #include; both files that included it thus had to
pull in QtCore to compile. Put that #include where it belongs and
clean out many specific QtCore includes that it makes redundant.
Change-Id: Ie9d9ec325d4879d771cb14baecb06fecbdaf62c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/io/qsettings/tst_qsettings.cpp | 13 | ||||
-rw-r--r-- | tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h | 3 | ||||
-rw-r--r-- | tests/auto/corelib/kernel/qmetatype/tst_qmetatype_common.h | 5 |
3 files changed, 8 insertions, 13 deletions
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index 90d139ab8e..e338611507 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -26,27 +26,22 @@ ** ****************************************************************************/ - #include <QTest> #include <QtCore/QSettings> #include <private/qsettings_p.h> + +#include "tst_qmetatype_common.h" + #include <QtCore/QCoreApplication> -#include <QtCore/QDateTime> -#include <QtCore/QtGlobal> -#include <QtCore/QMetaType> -#include <QtCore/QString> #include <QtCore/QDir> +#include <QtCore/QtGlobal> #include <QtCore/QThread> #include <QtCore/QSysInfo> #if QT_CONFIG(shortcut) # include <QtGui/QKeySequence> #endif -#include <QtCore> -#include <QtGui> -#include "tst_qmetatype_common.h" - #include <cctype> #include <stdlib.h> #if defined(Q_OS_WIN) && defined(Q_CC_GNU) diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h index 15fe3e6874..99d9787c02 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -26,7 +26,6 @@ ** ****************************************************************************/ -#include <QtCore> #include <QTest> #include "tst_qmetatype_common.h" #include "tst_qvariant_common.h" diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype_common.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype_common.h index 1ba9c47fa8..bc36bcd98e 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype_common.h +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype_common.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -31,7 +31,8 @@ #ifndef TST_QMETATYPE_H #define TST_QMETATYPE_H -#include <qmetatype.h> +#include <QtCore> + #include <float.h> #define FOR_EACH_PRIMITIVE_METATYPE(F) \ |