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()
|
void TestRunner::onBuildSystemUpdated()
|
||||||
{
|
{
|
||||||
Target *target = ProjectManager::startupTarget();
|
BuildSystem *bs = activeBuildSystemForActiveProject();
|
||||||
if (QTC_GUARD(target))
|
if (QTC_GUARD(bs))
|
||||||
disconnect(target, &Target::buildSystemUpdated, this, &TestRunner::onBuildSystemUpdated);
|
disconnect(bs, &BuildSystem::updated, this, &TestRunner::onBuildSystemUpdated);
|
||||||
if (!m_skipTargetsCheck) {
|
if (!m_skipTargetsCheck) {
|
||||||
m_skipTargetsCheck = true;
|
m_skipTargetsCheck = true;
|
||||||
runOrDebugTests();
|
runOrDebugTests();
|
||||||
@@ -625,15 +625,15 @@ void TestRunner::runOrDebugTests()
|
|||||||
if (!m_skipTargetsCheck) {
|
if (!m_skipTargetsCheck) {
|
||||||
if (executablesEmpty()) {
|
if (executablesEmpty()) {
|
||||||
m_skipTargetsCheck = true;
|
m_skipTargetsCheck = true;
|
||||||
Target *target = ProjectManager::startupTarget();
|
BuildSystem *bs = activeBuildSystemForActiveProject();
|
||||||
QTimer::singleShot(5000, this, [this, target = QPointer<Target>(target)] {
|
QTimer::singleShot(5000, this, [this, bs = QPointer<BuildSystem>(bs)] {
|
||||||
if (target) {
|
if (bs) {
|
||||||
disconnect(target, &Target::buildSystemUpdated,
|
disconnect(bs, &BuildSystem::updated,
|
||||||
this, &TestRunner::onBuildSystemUpdated);
|
this, &TestRunner::onBuildSystemUpdated);
|
||||||
}
|
}
|
||||||
runOrDebugTests();
|
runOrDebugTests();
|
||||||
});
|
});
|
||||||
connect(target, &Target::buildSystemUpdated, this, &TestRunner::onBuildSystemUpdated);
|
connect(bs, &BuildSystem::updated, this, &TestRunner::onBuildSystemUpdated);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user