CppTools: Tests: Clean up ProjectOpenerAndCloser and introduce timeout

Change-Id: Id46305a7e9fba1d8383622a4d21f22ee8cbc470c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-04-13 17:41:17 +02:00
parent 315585056b
commit 05e0b074c1
2 changed files with 21 additions and 27 deletions

View File

@@ -117,21 +117,15 @@ private:
bool m_runGarbageCollector;
};
class CPPTOOLS_EXPORT ProjectOpenerAndCloser : public QObject
class CPPTOOLS_EXPORT ProjectOpenerAndCloser
{
Q_OBJECT
public:
ProjectOpenerAndCloser(bool waitForFinishedGcOnDestruction = true);
ProjectOpenerAndCloser();
~ProjectOpenerAndCloser(); // Closes opened projects
ProjectInfo open(const QString &projectFile, bool configureAsExampleProject = false);
private:
void onGcFinished();
bool m_waitForFinishedGcOnDestruction;
bool m_gcFinished;
QList<ProjectExplorer::Project *> m_openProjects;
};