Commit 87423acc authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Polish target/toolchain warnings a bit.

parent 09f89d52
......@@ -267,8 +267,10 @@ bool Project::fromMap(const QVariantMap &map)
Target *t = 0;
if (target(idFromMap(targetMap))) {
qWarning() << "Duplicated target id found, not restoring second target with id"<<idFromMap(targetMap)<<"(Continuing)";
const QString id = idFromMap(targetMap);
if (target(id)) {
qWarning("Warning: Duplicated target id found, not restoring second target with id '%s'. Continuing.",
qPrintable(id));
} else {
foreach (ITargetFactory *factory, factories) {
if (factory->canRestore(this, targetMap)) {
......@@ -278,7 +280,7 @@ bool Project::fromMap(const QVariantMap &map)
}
if (!t) {
qWarning() << "Restoration of a target failed! (Continuing)";
qWarning("Warning: Unable to restore target '%s'. Continuing.", qPrintable(id));
continue;
}
addTarget(t);
......
......@@ -118,6 +118,12 @@ QVariantMap Qt4BuildConfiguration::toMap() const
return map;
}
static inline QString msgBuildConfigNotApplicable(const QString &d, const QtVersion *qtVersion,
const Target *target)
{
return QString::fromLatin1("Warning: Buildconfiguration '%1' : Qt '%2' from %3 not supported by target '%4'").
arg(d, qtVersion->displayName(), qtVersion->qmakeCommand(), target->id());
}
bool Qt4BuildConfiguration::fromMap(const QVariantMap &map)
{
......@@ -149,12 +155,12 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map)
QtVersion *version = qtVersion();
if (!map.contains(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration.NeedsV0Update"))) { // we are not upgrading from pre-targets!
if (version->isValid() && !version->supportedTargetIds().contains(target()->id())) {
qWarning() << "Buildconfiguration" << displayName() << ": Qt" << version->displayName() << "not supported by target" << target()->id();
qWarning("%s", qPrintable(msgBuildConfigNotApplicable(displayName(), version, target())));
return false;
}
} else {
if (!version->isValid() || !version->supportedTargetIds().contains(target()->id())) {
qWarning() << "Buildconfiguration" << displayName() << ": Qt" << version->displayName() << "not supported by target" << target()->id();
qWarning("%s", qPrintable(msgBuildConfigNotApplicable(displayName(), version, target())));
return false;
}
}
......@@ -168,7 +174,14 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map)
}
if (!toolChain()) {
qWarning() << "No toolchain available for" << qtVersion()->displayName() << "used in" << target()->id() << "!";
if (version->isValid()) {
qWarning("Warning: No toolchain available for '%s' from %s used in '%s'.",
qPrintable(version->displayName()), qPrintable(version->qmakeCommand()),
qPrintable(target()->id()));
} else {
qWarning("Warning: No toolchain available for invalid Qt version used in '%s'.",
qPrintable(target()->id()));
}
return false;
}
......
......@@ -1541,9 +1541,11 @@ void QtVersion::updateAbiAndMkspec() const
}
if (m_abis.isEmpty()) {
qDebug() << "Could not find ABI for" << m_mkspecFullPath << qmakeCXX;
qDebug() << "Qt Creator doesn't know about the system includes, "
"nor the system defines.";
qWarning("Warning: Could not find ABI for '%s' ('%s', %s) /%s "
"Qt Creator does not know about the system includes, "
"nor the system defines.",
qPrintable(m_mkspecFullPath), qPrintable(displayName()),
qPrintable(qmakeCommand()), qPrintable(qmakeCXX));
}
QStringList configValues = evaluator.values("CONFIG");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment