Changeset View
Changeset View
Standalone View
Standalone View
tests/testlib/fakejob.h
Show All 29 Lines | |||||
30 | { | 30 | { | ||
31 | Q_OBJECT | 31 | Q_OBJECT | ||
32 | public: | 32 | public: | ||
33 | static const int DURATION = 50; | 33 | static const int DURATION = 50; | ||
34 | explicit FakeJob(QObject *parent = Q_NULLPTR); | 34 | explicit FakeJob(QObject *parent = Q_NULLPTR); | ||
35 | 35 | | |||
36 | void setExpectedError(int errorCode, const QString &errorText = QString()); | 36 | void setExpectedError(int errorCode, const QString &errorText = QString()); | ||
37 | 37 | | |||
38 | void start(); | 38 | void start() override; | ||
39 | 39 | | |||
40 | private slots: | 40 | private slots: | ||
41 | virtual void onTimeout(); | 41 | virtual void onTimeout(); | ||
42 | 42 | | |||
43 | public: | 43 | public: | ||
44 | bool isDone() const; | 44 | bool isDone() const; | ||
45 | int expectedError() const; | 45 | int expectedError() const; | ||
46 | QString expectedErrorText() const; | 46 | QString expectedErrorText() const; | ||
Show All 9 Lines |