blob: cc3f6922d874c756ce2fc6ce3390605d4d92f6f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright (C) 2022 The Qt Company Ltd
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "squishtesttreemodel.h"
#include <QMap>
#include <QObject>
#include <QString>
namespace Squish {
namespace Internal {
class SquishFileHandler : public QObject
{
Q_OBJECT
public:
explicit SquishFileHandler(QObject *parent = nullptr);
~SquishFileHandler() override = default;
static SquishFileHandler *instance();
void openTestSuites();
void closeTestSuite(const QString &suiteName);
void closeAllTestSuites();
void runTestCase(const QString &suiteName, const QString &testCaseName);
void runTestSuite(const QString &suiteName);
void addSharedFolder();
bool removeSharedFolder(const QString &folder);
void removeAllSharedFolders();
void openObjectsMap(const QString &suiteName);
signals:
void testTreeItemCreated(SquishTestTreeItem *item);
void suiteTreeItemRemoved(const QString &filePath);
void suiteTreeItemModified(SquishTestTreeItem *item, const QString &displayName);
void suitesOpened();
private:
QMap<QString, QString> m_suites;
QStringList m_sharedFolders;
void modifySuiteItem(const QString &suiteName,
const QString &filePath,
const QStringList &cases);
};
} // namespace Internal
} // namespace Squish
|