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>
This commit is contained in:
Edward Welbourne 2022-04-20 11:41:40 +02:00
parent 76f9a768e8
commit a7138c4fd1
3 changed files with 8 additions and 13 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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) \