forked from qt-creator/qt-creator
Devices: Do not pop up general messages pane
That should only happen on direct user interaction. Also use new message manager API. Task-number: QTCREATORBUG-24430 Change-Id: I87297b2ec7191b88210d3a2037afe27b8a3f40e9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -87,9 +87,10 @@ const char *overridingEnvironmentVariable(QdbTool tool)
|
||||
void showMessage(const QString &message, bool important)
|
||||
{
|
||||
const QString fullMessage = QCoreApplication::translate("Boot2Qt", "Boot2Qt: %1").arg(message);
|
||||
const Core::MessageManager::PrintToOutputPaneFlags flags = important
|
||||
? Core::MessageManager::ModeSwitch : Core::MessageManager::Silent;
|
||||
Core::MessageManager::write(fullMessage, flags);
|
||||
if (important)
|
||||
Core::MessageManager::writeFlashing(fullMessage);
|
||||
else
|
||||
Core::MessageManager::writeSilently(fullMessage);
|
||||
}
|
||||
|
||||
QString settingsGroupKey()
|
||||
|
@@ -193,15 +193,13 @@ LinuxDevice::LinuxDevice()
|
||||
DeviceProcess * const proc = createProcess(nullptr);
|
||||
QObject::connect(proc, &DeviceProcess::finished, [proc] {
|
||||
if (!proc->errorString().isEmpty()) {
|
||||
Core::MessageManager::write(tr("Error running remote shell: %1")
|
||||
.arg(proc->errorString()),
|
||||
Core::MessageManager::ModeSwitch);
|
||||
Core::MessageManager::writeDisrupting(
|
||||
tr("Error running remote shell: %1").arg(proc->errorString()));
|
||||
}
|
||||
proc->deleteLater();
|
||||
});
|
||||
QObject::connect(proc, &DeviceProcess::error, [proc] {
|
||||
Core::MessageManager::write(tr("Error starting remote shell."),
|
||||
Core::MessageManager::ModeSwitch);
|
||||
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
||||
proc->deleteLater();
|
||||
});
|
||||
Runnable runnable;
|
||||
|
@@ -176,8 +176,8 @@ void WinRtDeviceFactory::onPrerequisitesLoaded()
|
||||
|
||||
void WinRtDeviceFactory::onProcessError()
|
||||
{
|
||||
MessageManager::write(tr("Error while executing winrtrunner: %1")
|
||||
.arg(m_process->errorString()), MessageManager::Flash);
|
||||
MessageManager::writeDisrupting(
|
||||
tr("Error while executing winrtrunner: %1").arg(m_process->errorString()));
|
||||
}
|
||||
|
||||
void WinRtDeviceFactory::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
@@ -190,8 +190,7 @@ void WinRtDeviceFactory::onProcessFinished(int exitCode, QProcess::ExitStatus ex
|
||||
}
|
||||
|
||||
if (exitCode != 0) {
|
||||
MessageManager::write(tr("winrtrunner returned with exit code %1.")
|
||||
.arg(exitCode), MessageManager::Flash);
|
||||
MessageManager::writeFlashing(tr("winrtrunner returned with exit code %1.").arg(exitCode));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user