forked from qt-creator/qt-creator
Qbs: Avoid popping up general messages pane
Except on direct user action. Use more evocative message manager API. Task-number: QTCREATORBUG-24430 Change-Id: I44c6088904b2018baccb72cd3651e2ab62dc1358 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -354,8 +354,8 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
||||
|
||||
if (tcC && tcCxx && !cCompilerPath.isEmpty() && !cxxCompilerPath.isEmpty()
|
||||
&& cFileInfo.absolutePath() != cxxFileInfo.absolutePath()) {
|
||||
Core::MessageManager::write(tr("C and C++ compiler paths differ. C compiler may not work."),
|
||||
Core::MessageManager::ModeSwitch);
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("C and C++ compiler paths differ. C compiler may not work."));
|
||||
}
|
||||
data.insert(QLatin1String(CPP_TOOLCHAINPATH), mainFileInfo.absolutePath());
|
||||
|
||||
|
@@ -252,10 +252,12 @@ QString QbsProfileManager::runQbsConfig(QbsConfigOp op, const QString &key, cons
|
||||
return {};
|
||||
qbsConfig.start(qbsExe.toString(), args);
|
||||
if (!qbsConfig.waitForStarted(3000) || !qbsConfig.waitForFinished(5000)) {
|
||||
Core::MessageManager::write(tr("Failed run qbs config: %1").arg(qbsConfig.errorString()));
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("Failed to run qbs config: %1").arg(qbsConfig.errorString()));
|
||||
} else if (qbsConfig.exitCode() != 0) {
|
||||
Core::MessageManager::write(tr("Failed to run qbs config: %1")
|
||||
.arg(QString::fromLocal8Bit(qbsConfig.readAllStandardError())));
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("Failed to run qbs config: %1")
|
||||
.arg(QString::fromLocal8Bit(qbsConfig.readAllStandardError())));
|
||||
}
|
||||
return QString::fromLocal8Bit(qbsConfig.readAllStandardOutput()).trimmed();
|
||||
}
|
||||
|
@@ -103,8 +103,8 @@ public:
|
||||
~OpTimer()
|
||||
{
|
||||
if (qEnvironmentVariableIsSet(Constants::QBS_PROFILING_ENV)) {
|
||||
MessageManager::write(QString("operation %1 took %2ms")
|
||||
.arg(QLatin1String(m_name)).arg(m_timer.elapsed()));
|
||||
MessageManager::writeSilently(
|
||||
QString("operation %1 took %2ms").arg(QLatin1String(m_name)).arg(m_timer.elapsed()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ bool QbsBuildSystem::addFilesToProduct(
|
||||
product.value("full-display-name").toString(),
|
||||
group.value("name").toString());
|
||||
if (result.error().hasError()) {
|
||||
MessageManager::write(result.error().toString(), Core::MessageManager::ModeSwitch);
|
||||
MessageManager::writeDisrupting(result.error().toString());
|
||||
*notAdded = result.failedFiles();
|
||||
}
|
||||
return notAdded->isEmpty();
|
||||
@@ -405,7 +405,7 @@ RemovedFilesFromProject QbsBuildSystem::removeFilesFromProduct(
|
||||
|
||||
*notRemoved = result.failedFiles();
|
||||
if (result.error().hasError())
|
||||
MessageManager::write(result.error().toString(), Core::MessageManager::ModeSwitch);
|
||||
MessageManager::writeDisrupting(result.error().toString());
|
||||
const bool success = notRemoved->isEmpty();
|
||||
if (!wildcardFiles.isEmpty())
|
||||
*notRemoved += wildcardFiles;
|
||||
@@ -1126,8 +1126,8 @@ void QbsBuildSystem::updateApplicationTargets()
|
||||
RunEnvironmentResult result = session()->getRunEnvironment(productName, procEnv,
|
||||
setupRunEnvConfig);
|
||||
if (result.error().hasError()) {
|
||||
Core::MessageManager::write(tr("Error retrieving run environment: %1")
|
||||
.arg(result.error().toString()));
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("Error retrieving run environment: %1").arg(result.error().toString()));
|
||||
return;
|
||||
}
|
||||
QProcessEnvironment fullEnv = result.environment();
|
||||
|
@@ -491,8 +491,7 @@ void QbsSession::handlePacket(const QJsonObject &packet)
|
||||
} else if (type == "install-done") {
|
||||
emit projectInstalled(getErrorInfo(packet));
|
||||
} else if (type == "log-data") {
|
||||
Core::MessageManager::write("[qbs] " + packet.value("message").toString(),
|
||||
Core::MessageManager::Silent);
|
||||
Core::MessageManager::writeSilently("[qbs] " + packet.value("message").toString());
|
||||
} else if (type == "warning") {
|
||||
const ErrorInfo errorInfo = ErrorInfo(packet.value("warning").toObject());
|
||||
|
||||
@@ -618,11 +617,10 @@ void QbsSession::handleFileListUpdated(const QJsonObject &reply)
|
||||
setProjectDataFromReply(reply, false);
|
||||
const QStringList failedFiles = arrayToStringList(reply.value("failed-files"));
|
||||
if (!failedFiles.isEmpty()) {
|
||||
Core::MessageManager::write(tr("Failed to update files in Qbs project: %1.\n"
|
||||
"The affected files are: \n\t%2")
|
||||
.arg(getErrorInfo(reply).toString(),
|
||||
failedFiles.join("\n\t")),
|
||||
Core::MessageManager::ModeSwitch);
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("Failed to update files in Qbs project: %1.\n"
|
||||
"The affected files are: \n\t%2")
|
||||
.arg(getErrorInfo(reply).toString(), failedFiles.join("\n\t")));
|
||||
}
|
||||
emit fileListUpdated();
|
||||
}
|
||||
|
Reference in New Issue
Block a user