AutoTest: Unify handling of run modes

Move used enums more central to avoid duplicating
information and unify their usages.

Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Christian Stenger
2017-09-05 13:57:22 +02:00
parent f885785564
commit 8288eadac6
13 changed files with 54 additions and 55 deletions

View File

@@ -44,21 +44,13 @@ class TestRunner : public QObject
Q_OBJECT
public:
enum Mode
{
Run,
RunWithoutDeploy,
Debug,
DebugWithoutDeploy
};
static TestRunner* instance();
~TestRunner();
void setSelectedTests(const QList<TestConfiguration *> &selected);
bool isTestRunning() const { return m_executingTests; }
void prepareToRunTests(Mode mode);
void prepareToRunTests(TestRunMode mode);
signals:
void testRunStarted();
@@ -79,7 +71,7 @@ private:
QFutureWatcher<TestResultPtr> m_futureWatcher;
QList<TestConfiguration *> m_selectedTests;
bool m_executingTests;
Mode m_runMode = Run;
TestRunMode m_runMode = TestRunMode::Run;
// temporarily used if building before running is necessary
QMetaObject::Connection m_buildConnect;