forked from qt-creator/qt-creator
AutoTest: Replace a use of Target with BuildSystem
Change-Id: I94414963c9e6b532e44f81e72855717c81d3631b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -324,9 +324,9 @@ int TestRunner::precheckTestConfigurations()
|
||||
|
||||
void TestRunner::onBuildSystemUpdated()
|
||||
{
|
||||
Target *target = ProjectManager::startupTarget();
|
||||
if (QTC_GUARD(target))
|
||||
disconnect(target, &Target::buildSystemUpdated, this, &TestRunner::onBuildSystemUpdated);
|
||||
BuildSystem *bs = activeBuildSystemForActiveProject();
|
||||
if (QTC_GUARD(bs))
|
||||
disconnect(bs, &BuildSystem::updated, this, &TestRunner::onBuildSystemUpdated);
|
||||
if (!m_skipTargetsCheck) {
|
||||
m_skipTargetsCheck = true;
|
||||
runOrDebugTests();
|
||||
@@ -625,15 +625,15 @@ void TestRunner::runOrDebugTests()
|
||||
if (!m_skipTargetsCheck) {
|
||||
if (executablesEmpty()) {
|
||||
m_skipTargetsCheck = true;
|
||||
Target *target = ProjectManager::startupTarget();
|
||||
QTimer::singleShot(5000, this, [this, target = QPointer<Target>(target)] {
|
||||
if (target) {
|
||||
disconnect(target, &Target::buildSystemUpdated,
|
||||
BuildSystem *bs = activeBuildSystemForActiveProject();
|
||||
QTimer::singleShot(5000, this, [this, bs = QPointer<BuildSystem>(bs)] {
|
||||
if (bs) {
|
||||
disconnect(bs, &BuildSystem::updated,
|
||||
this, &TestRunner::onBuildSystemUpdated);
|
||||
}
|
||||
runOrDebugTests();
|
||||
});
|
||||
connect(target, &Target::buildSystemUpdated, this, &TestRunner::onBuildSystemUpdated);
|
||||
connect(bs, &BuildSystem::updated, this, &TestRunner::onBuildSystemUpdated);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user