forked from qt-creator/qt-creator
AutoTest: Remove confusing information
If there is no information regarding the tests to provide to the user 'unknown' is not helpful either. Just give no hint if we do not have any. While at it ensure to provide only non-empty information. Change-Id: Ia1667c2cfd35b0456bfd47c2d4a14ed4d0000a4d Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -324,11 +324,12 @@ void TestRunner::prepareToRunTests(TestRunMode mode)
|
|||||||
|
|
||||||
static QString firstTestCaseTarget(const TestConfiguration *config)
|
static QString firstTestCaseTarget(const TestConfiguration *config)
|
||||||
{
|
{
|
||||||
const QSet<QString> &internalTargets = config->internalTargets();
|
for (const QString &internalTarget : config->internalTargets()) {
|
||||||
int size = internalTargets.size();
|
const QString buildTarget = internalTarget.split('|').first();
|
||||||
if (size)
|
if (!buildTarget.isEmpty())
|
||||||
return (*internalTargets.begin()).split('|').first();
|
return buildTarget;
|
||||||
return TestRunner::tr("<unknown>");
|
}
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
static ProjectExplorer::RunConfiguration *getRunConfiguration(const QString &dialogDetail)
|
static ProjectExplorer::RunConfiguration *getRunConfiguration(const QString &dialogDetail)
|
||||||
@@ -571,8 +572,10 @@ RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &
|
|||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
setWindowTitle(tr("Select Run Configuration"));
|
setWindowTitle(tr("Select Run Configuration"));
|
||||||
|
|
||||||
m_details = new QLabel(tr("Could not determine which run configuration to choose for running"
|
QString details = tr("Could not determine which run configuration to choose for running tests");
|
||||||
" tests (%1)").arg(testsInfo), this);
|
if (!testsInfo.isEmpty())
|
||||||
|
details.append(QString(" (%1)").arg(testsInfo));
|
||||||
|
m_details = new QLabel(details, this);
|
||||||
m_rcCombo = new QComboBox(this);
|
m_rcCombo = new QComboBox(this);
|
||||||
m_executable = new QLabel(this);
|
m_executable = new QLabel(this);
|
||||||
m_arguments = new QLabel(this);
|
m_arguments = new QLabel(this);
|
||||||
|
Reference in New Issue
Block a user