2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2019-08-05 15:47:10 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-10-09 13:07:55 +02:00
|
|
|
#include "itemdatacache.h"
|
2019-09-13 10:50:32 +02:00
|
|
|
#include "testsettings.h"
|
|
|
|
|
|
2020-10-09 13:07:55 +02:00
|
|
|
namespace ProjectExplorer { class Project; }
|
2019-08-05 15:47:10 +02:00
|
|
|
|
|
|
|
|
namespace Autotest {
|
2020-03-13 13:54:33 +01:00
|
|
|
|
|
|
|
|
class ITestFramework;
|
2021-01-08 15:53:30 +01:00
|
|
|
class ITestTool;
|
2020-03-13 13:54:33 +01:00
|
|
|
|
2019-08-05 15:47:10 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class TestProjectSettings : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2021-01-08 15:53:30 +01:00
|
|
|
explicit TestProjectSettings(ProjectExplorer::Project *project);
|
2019-08-05 15:47:10 +02:00
|
|
|
~TestProjectSettings();
|
|
|
|
|
|
|
|
|
|
void setUseGlobalSettings(bool useGlobal);
|
|
|
|
|
bool useGlobalSettings() const { return m_useGlobalSettings; }
|
2019-09-13 10:50:32 +02:00
|
|
|
void setRunAfterBuild(RunAfterBuildMode mode) {m_runAfterBuild = mode; }
|
|
|
|
|
RunAfterBuildMode runAfterBuild() const { return m_runAfterBuild; }
|
2020-11-17 00:23:17 +01:00
|
|
|
QHash<ITestFramework *, bool> activeFrameworks() const { return m_activeTestFrameworks; }
|
2020-06-26 13:59:38 +02:00
|
|
|
void activateFramework(const Utils::Id &id, bool activate);
|
2021-01-08 15:53:30 +01:00
|
|
|
QHash<ITestTool *, bool> activeTestTools() const { return m_activeTestTools; }
|
|
|
|
|
void activateTestTool(const Utils::Id &id, bool activate);
|
2020-07-07 10:57:38 +02:00
|
|
|
Internal::ItemDataCache<Qt::CheckState> *checkStateCache() { return &m_checkStateCache; }
|
2024-04-26 13:45:26 +02:00
|
|
|
bool limitToFilters() const { return m_limitToFilter; }
|
|
|
|
|
void setLimitToFilter(bool enable) { m_limitToFilter = enable; }
|
|
|
|
|
const QStringList pathFilters() const { return m_pathFilters; }
|
|
|
|
|
void setPathFilters(const QStringList &filters) { m_pathFilters = filters; }
|
|
|
|
|
void addPathFilter(const QString &filter) { m_pathFilters.append(filter); }
|
2019-08-05 15:47:10 +02:00
|
|
|
private:
|
|
|
|
|
void load();
|
|
|
|
|
void save();
|
|
|
|
|
|
|
|
|
|
ProjectExplorer::Project *m_project;
|
|
|
|
|
bool m_useGlobalSettings = true;
|
2024-04-26 13:45:26 +02:00
|
|
|
bool m_limitToFilter = false;
|
2019-09-13 10:50:32 +02:00
|
|
|
RunAfterBuildMode m_runAfterBuild = RunAfterBuildMode::None;
|
2020-11-17 00:23:17 +01:00
|
|
|
QHash<ITestFramework *, bool> m_activeTestFrameworks;
|
2021-01-08 15:53:30 +01:00
|
|
|
QHash<ITestTool *, bool> m_activeTestTools;
|
2024-04-26 13:45:26 +02:00
|
|
|
QStringList m_pathFilters;
|
2020-07-07 10:57:38 +02:00
|
|
|
Internal::ItemDataCache<Qt::CheckState> m_checkStateCache;
|
2019-08-05 15:47:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|