AutoTest: Clean up header mess

Better decoupling and reduced binary size.

Change-Id: I4f6239979d9d7dae4ad92f19ec8420be38372c07
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Stenger
2020-10-09 13:07:55 +02:00
parent 24db5dcc4f
commit ac14a1e038
40 changed files with 105 additions and 74 deletions

View File

@@ -24,54 +24,56 @@
****************************************************************************/ ****************************************************************************/
#include "autotestplugin.h" #include "autotestplugin.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "autotesticons.h" #include "autotesticons.h"
#include "projectsettingswidget.h" #include "projectsettingswidget.h"
#include "testcodeparser.h" #include "testcodeparser.h"
#include "testframeworkmanager.h" #include "testframeworkmanager.h"
#include "testnavigationwidget.h"
#include "testprojectsettings.h" #include "testprojectsettings.h"
#include "testresultspane.h"
#include "testrunner.h" #include "testrunner.h"
#include "testsettings.h" #include "testsettings.h"
#include "testsettingspage.h" #include "testsettingspage.h"
#include "testtreeitem.h" #include "testtreeitem.h"
#include "testtreeview.h"
#include "testtreemodel.h" #include "testtreemodel.h"
#include "testresultspane.h" #include "testtreeview.h"
#include "testnavigationwidget.h"
#include "qtest/qttestframework.h"
#include "quick/quicktestframework.h"
#include "gtest/gtestframework.h"
#include "boost/boosttestframework.h" #include "boost/boosttestframework.h"
#include "catch/catchframework.h" #include "catch/catchframework.h"
#include "gtest/gtestframework.h"
#include "qtest/qttestframework.h"
#include "quick/quicktestframework.h"
#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <cppeditor/cppeditorconstants.h> #include <cppeditor/cppeditorconstants.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <projectexplorer/buildmanager.h> #include <projectexplorer/buildmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorericons.h> #include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/projectpanelfactory.h> #include <projectexplorer/projectpanelfactory.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runcontrol.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <texteditor/texteditor.h>
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>
#include <texteditor/texteditor.h>
#include <utils/textutils.h> #include <utils/textutils.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QAction> #include <QAction>
#include <QList> #include <QList>
#include <QMap>
#include <QMessageBox>
#include <QMainWindow> #include <QMainWindow>
#include <QMap>
#include <QMenu> #include <QMenu>
#include <QMessageBox>
#include <QTextCursor> #include <QTextCursor>
#ifdef WITH_TESTS #ifdef WITH_TESTS

View File

@@ -23,9 +23,9 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestunittests.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "autotestplugin.h" #include "autotestplugin.h"
#include "autotestunittests.h"
#include "testcodeparser.h" #include "testcodeparser.h"
#include "testsettings.h" #include "testsettings.h"
#include "testtreemodel.h" #include "testtreemodel.h"

View File

@@ -29,6 +29,7 @@
#include "../testframeworkmanager.h" #include "../testframeworkmanager.h"
#include <utils/id.h> #include <utils/id.h>
#include <utils/qtcassert.h>
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -28,6 +28,7 @@
#include "../testframeworkmanager.h" #include "../testframeworkmanager.h"
#include <utils/id.h> #include <utils/id.h>
#include <utils/qtcassert.h>
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -29,6 +29,7 @@
#include "../testtreeitem.h" #include "../testtreeitem.h"
#include <utils/id.h> #include <utils/id.h>
#include <utils/qtcassert.h>
#include <QRegularExpression> #include <QRegularExpression>

View File

@@ -29,6 +29,7 @@
#include "gtest_utils.h" #include "gtest_utils.h"
#include "../autotestconstants.h" #include "../autotestconstants.h"
#include "../testframeworkmanager.h" #include "../testframeworkmanager.h"
#include "../testtreemodel.h"
#include "ui_gtestsettingspage.h" #include "ui_gtestsettingspage.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>

View File

@@ -25,6 +25,11 @@
#include "itestframework.h" #include "itestframework.h"
#include "autotestconstants.h"
#include "itestparser.h"
#include "testtreeitem.h"
#include "testtreemodel.h"
namespace Autotest { namespace Autotest {
ITestBase::ITestBase(bool activeByDefault) ITestBase::ITestBase(bool activeByDefault)

View File

@@ -25,12 +25,13 @@
#pragma once #pragma once
#include "testtreeitem.h" #include <utils/id.h>
#include "itestparser.h"
namespace Autotest { namespace Autotest {
class ITestParser;
class ITestSettings; class ITestSettings;
class TestTreeItem;
class ITestBase class ITestBase
{ {

View File

@@ -26,13 +26,13 @@
#pragma once #pragma once
#include "testtreeitem.h" #include "testtreeitem.h"
#include "testtreemodel.h"
#include <utils/id.h>
#include <cplusplus/CppDocument.h> #include <cplusplus/CppDocument.h>
#include <cpptools/cppworkingcopy.h> #include <cpptools/cppworkingcopy.h>
#include <qmljs/qmljsdocument.h> #include <qmljs/qmljsdocument.h>
#include <QFutureInterface>
namespace Autotest { namespace Autotest {
class ITestBase; class ITestBase;

View File

@@ -23,10 +23,14 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestplugin.h"
#include "projectsettingswidget.h" #include "projectsettingswidget.h"
#include "autotestplugin.h"
#include "testframeworkmanager.h" #include "testframeworkmanager.h"
#include "testprojectsettings.h" #include "testprojectsettings.h"
#include "testtreemodel.h"
#include <utils/algorithm.h>
#include <QBoxLayout> #include <QBoxLayout>
#include <QComboBox> #include <QComboBox>

View File

@@ -30,6 +30,7 @@
#include "../testsettings.h" #include "../testsettings.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/environment.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QByteArrayList> #include <QByteArrayList>

View File

@@ -27,6 +27,7 @@
#include "quicktestparser.h" #include "quicktestparser.h"
#include "quicktesttreeitem.h" #include "quicktesttreeitem.h"
#include "../autotestconstants.h"
#include "../testframeworkmanager.h" #include "../testframeworkmanager.h"
#include "../qtest/qttestconstants.h" #include "../qtest/qttestconstants.h"

View File

@@ -29,6 +29,7 @@
#include "quicktestvisitors.h" #include "quicktestvisitors.h"
#include "quicktest_utils.h" #include "quicktest_utils.h"
#include "../testcodeparser.h" #include "../testcodeparser.h"
#include "../testtreemodel.h"
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>
#include <cpptools/projectpart.h> #include <cpptools/projectpart.h>

View File

@@ -23,17 +23,18 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestconstants.h"
#include "autotestplugin.h"
#include "testcodeparser.h" #include "testcodeparser.h"
#include "autotestconstants.h"
#include "testframeworkmanager.h" #include "testframeworkmanager.h"
#include "testsettings.h" #include "testsettings.h"
#include "testtreemodel.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/futureprogress.h> #include <coreplugin/progressmanager/futureprogress.h>
#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/progressmanager.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>
#include <cpptools/cpptoolsconstants.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <qmljstools/qmljsmodelmanager.h> #include <qmljstools/qmljsmodelmanager.h>
@@ -43,7 +44,6 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/runextensions.h> #include <utils/runextensions.h>
#include <QDirIterator>
#include <QFuture> #include <QFuture>
#include <QFutureInterface> #include <QFutureInterface>
#include <QLoggingCategory> #include <QLoggingCategory>

View File

@@ -28,16 +28,19 @@
#include "itestparser.h" #include "itestparser.h"
#include <qmljs/qmljsdocument.h> #include <qmljs/qmljsdocument.h>
#include <utils/id.h>
#include <QObject>
#include <QMap>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QMap>
#include <QObject>
#include <QTimer> #include <QTimer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QThreadPool; class QThreadPool;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace ProjectExplorer { class Project; }
namespace Autotest { namespace Autotest {
class ITestFramework; class ITestFramework;

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "testconfiguration.h" #include "testconfiguration.h"
#include "testoutputreader.h" #include "testoutputreader.h"
#include "testrunconfiguration.h" #include "testrunconfiguration.h"

View File

@@ -32,7 +32,6 @@
#include <utils/environment.h> #include <utils/environment.h>
#include <QFutureInterface> #include <QFutureInterface>
#include <QObject>
#include <QPointer> #include <QPointer>
#include <QStringList> #include <QStringList>

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "testeditormark.h" #include "testeditormark.h"
#include "testresultspane.h" #include "testresultspane.h"
namespace Autotest { namespace Autotest {

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "testframeworkmanager.h" #include "testframeworkmanager.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "autotestplugin.h" #include "autotestplugin.h"
#include "itestsettings.h" #include "itestsettings.h"
@@ -34,7 +35,6 @@
#include <QSettings> #include <QSettings>
using namespace Core;
using namespace Utils; using namespace Utils;
namespace Autotest { namespace Autotest {

View File

@@ -24,26 +24,28 @@
****************************************************************************/ ****************************************************************************/
#include "testnavigationwidget.h" #include "testnavigationwidget.h"
#include "testframeworkmanager.h"
#include "testtreemodel.h"
#include "testtreeview.h"
#include "testtreeitemdelegate.h"
#include "testcodeparser.h"
#include "testrunner.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "autotesticons.h" #include "autotesticons.h"
#include "testcodeparser.h"
#include "testframeworkmanager.h"
#include "testrunner.h"
#include "testtreeitem.h" #include "testtreeitem.h"
#include "testtreeitemdelegate.h"
#include "testtreemodel.h"
#include "testtreeview.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/find/itemviewfind.h> #include <coreplugin/find/itemviewfind.h>
#include <coreplugin/coreconstants.h> #include <projectexplorer/buildmanager.h>
#include <coreplugin/icore.h> #include <projectexplorer/project.h>
#include <texteditor/texteditor.h> #include <projectexplorer/session.h>
#include <utils/algorithm.h>
#include <utils/link.h>
#include <utils/progressindicator.h> #include <utils/progressindicator.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/session.h>
#include <QAction> #include <QAction>
#include <QMenu> #include <QMenu>

View File

@@ -26,7 +26,6 @@
#pragma once #pragma once
#include "itemdatacache.h" #include "itemdatacache.h"
#include "testrunner.h"
#include <coreplugin/inavigationwidgetfactory.h> #include <coreplugin/inavigationwidgetfactory.h>
@@ -53,6 +52,7 @@ class TestTreeModel;
namespace Internal { namespace Internal {
class TestRunner;
class TestTreeSortFilterModel; class TestTreeSortFilterModel;
class TestTreeView; class TestTreeView;

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "testoutputreader.h" #include "testoutputreader.h"
#include "testresult.h" #include "testresult.h"
#include "testresultspane.h" #include "testresultspane.h"

View File

@@ -24,12 +24,16 @@
****************************************************************************/ ****************************************************************************/
#include "testprojectsettings.h" #include "testprojectsettings.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "testframeworkmanager.h" #include "testframeworkmanager.h"
#include <projectexplorer/project.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <QLoggingCategory>
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -25,10 +25,10 @@
#pragma once #pragma once
#include "itemdatacache.h"
#include "testsettings.h" #include "testsettings.h"
#include "testtreemodel.h"
#include <projectexplorer/project.h> namespace ProjectExplorer { class Project; }
namespace Autotest { namespace Autotest {

View File

@@ -27,10 +27,10 @@
#include "autotestconstants.h" #include "autotestconstants.h"
#include <QString>
#include <QColor> #include <QColor>
#include <QMetaType> #include <QMetaType>
#include <QSharedPointer> #include <QSharedPointer>
#include <QString>
namespace Autotest { namespace Autotest {

View File

@@ -23,8 +23,9 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestplugin.h"
#include "testresultdelegate.h" #include "testresultdelegate.h"
#include "autotestplugin.h"
#include "testresultmodel.h" #include "testresultmodel.h"
#include "testsettings.h" #include "testsettings.h"

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "testresultmodel.h" #include "testresultmodel.h"
#include "autotesticons.h" #include "autotesticons.h"
#include "autotestplugin.h" #include "autotestplugin.h"
#include "testresultdelegate.h" #include "testresultdelegate.h"

View File

@@ -28,9 +28,9 @@
#include "testresult.h" #include "testresult.h"
#include <QAbstractItemModel> #include <QAbstractItemModel>
#include <QSortFilterProxyModel>
#include <QFont> #include <QFont>
#include <QSet> #include <QSet>
#include <QSortFilterProxyModel>
#include <utils/optional.h> #include <utils/optional.h>
#include <utils/treemodel.h> #include <utils/treemodel.h>

View File

@@ -23,17 +23,16 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestplugin.h"
#include "autotesticons.h"
#include "testresultspane.h" #include "testresultspane.h"
#include "testresultmodel.h"
#include "autotesticons.h"
#include "autotestplugin.h"
#include "testeditormark.h"
#include "testresultdelegate.h" #include "testresultdelegate.h"
#include "testresultmodel.h"
#include "testrunner.h" #include "testrunner.h"
#include "testsettings.h" #include "testsettings.h"
#include "testtreemodel.h" #include "testtreemodel.h"
#include "testcodeparser.h"
#include "testeditormark.h"
#include "testoutputreader.h"
#include <aggregation/aggregate.h> #include <aggregation/aggregate.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>

View File

@@ -25,15 +25,13 @@
#pragma once #pragma once
#include "autotestplugin.h"
#include "testconfiguration.h" #include "testconfiguration.h"
#include <debugger/debuggerrunconfigurationaspect.h> #include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/applicationlauncher.h> #include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>

View File

@@ -27,11 +27,11 @@
#include "autotestconstants.h" #include "autotestconstants.h"
#include "autotestplugin.h" #include "autotestplugin.h"
#include "testoutputreader.h"
#include "testprojectsettings.h" #include "testprojectsettings.h"
#include "testresultspane.h" #include "testresultspane.h"
#include "testrunconfiguration.h" #include "testrunconfiguration.h"
#include "testsettings.h" #include "testsettings.h"
#include "testoutputreader.h"
#include "testtreeitem.h" #include "testtreeitem.h"
#include "testtreemodel.h" #include "testtreemodel.h"

View File

@@ -26,8 +26,6 @@
#pragma once #pragma once
#include "autotest_global.h" #include "autotest_global.h"
#include "testconfiguration.h"
#include "testresult.h" #include "testresult.h"
#include <QDialog> #include <QDialog>
@@ -43,13 +41,13 @@ class QLabel;
class QProcess; class QProcess;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace ProjectExplorer { namespace ProjectExplorer { class Project; }
class Project;
}
namespace Autotest { namespace Autotest {
enum class TestRunMode; enum class TestRunMode;
class TestConfiguration;
class TestOutputReader;
namespace Internal { namespace Internal {

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "testsettings.h" #include "testsettings.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "testframeworkmanager.h" #include "testframeworkmanager.h"

View File

@@ -23,15 +23,17 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestconstants.h"
#include "testcodeparser.h"
#include "testframeworkmanager.h"
#include "testsettingspage.h" #include "testsettingspage.h"
#include "autotestconstants.h"
#include "autotestplugin.h"
#include "testframeworkmanager.h"
#include "testsettings.h" #include "testsettings.h"
#include "testtreemodel.h" #include "testtreemodel.h"
#include "autotestplugin.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/algorithm.h>
#include <utils/id.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>

View File

@@ -23,11 +23,12 @@
** **
****************************************************************************/ ****************************************************************************/
#include "testtreeitem.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "itestframework.h" #include "itestframework.h"
#include "itestparser.h" #include "itestparser.h"
#include "testconfiguration.h" #include "testconfiguration.h"
#include "testtreeitem.h"
#include <cplusplus/Icons.h> #include <cplusplus/Icons.h>
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>

View File

@@ -28,9 +28,9 @@
#include <utils/treemodel.h> #include <utils/treemodel.h>
#include <QList> #include <QList>
#include <QMetaType>
#include <QSet> #include <QSet>
#include <QString> #include <QString>
#include <QMetaType>
namespace { namespace {
enum ItemRole { enum ItemRole {

View File

@@ -23,9 +23,10 @@
** **
****************************************************************************/ ****************************************************************************/
#include "testtreeitem.h"
#include "testtreeitemdelegate.h" #include "testtreeitemdelegate.h"
#include "testtreeitem.h"
#include <QPainter> #include <QPainter>
namespace Autotest { namespace Autotest {

View File

@@ -23,20 +23,21 @@
** **
****************************************************************************/ ****************************************************************************/
#include "testtreemodel.h"
#include "autotestconstants.h" #include "autotestconstants.h"
#include "autotestplugin.h" #include "autotestplugin.h"
#include "testcodeparser.h" #include "testcodeparser.h"
#include "testframeworkmanager.h" #include "testframeworkmanager.h"
#include "testprojectsettings.h" #include "testprojectsettings.h"
#include "testsettings.h" #include "testsettings.h"
#include "testtreeitem.h"
#include "testtreemodel.h"
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <qmljs/qmljsmodelmanagerinterface.h> #include <qmljs/qmljsmodelmanagerinterface.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
using namespace ProjectExplorer; using namespace ProjectExplorer;

View File

@@ -28,10 +28,9 @@
#include "autotest_global.h" #include "autotest_global.h"
#include "itemdatacache.h" #include "itemdatacache.h"
#include "testconfiguration.h"
#include "testtreeitem.h" #include "testtreeitem.h"
#include <utils/algorithm.h> #include <utils/id.h>
#include <utils/treemodel.h> #include <utils/treemodel.h>
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>

View File

@@ -23,12 +23,11 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotestconstants.h"
#include "testtreeitem.h"
#include "testtreemodel.h"
#include "testtreeview.h" #include "testtreeview.h"
#include <coreplugin/coreconstants.h> #include "autotestconstants.h"
#include "testtreemodel.h"
#include <coreplugin/icontext.h> #include <coreplugin/icontext.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>