docker: Fix StringAspect default value handling

The StringAspect needs to return a possible default value if
no value was set by the user. Otherwise it would write an
empty string when ::apply was called.

Also a small improvement for docker error logging is added

Change-Id: I85f80253894d2c3e726da714616e5275039febcc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-07-07 08:25:03 +02:00
parent 5b683c53c3
commit 6003fe9b36
3 changed files with 13 additions and 3 deletions

View File

@@ -451,8 +451,12 @@ void DockerDevicePrivate::startContainer()
createProcess.setCommand(dockerCreate);
createProcess.runBlocking();
if (createProcess.result() != ProcessResult::FinishedWithSuccess)
if (createProcess.result() != ProcessResult::FinishedWithSuccess) {
qCWarning(dockerDeviceLog) << "Failed creating docker container:";
qCWarning(dockerDeviceLog) << "Exit Code:" << createProcess.exitCode();
qCWarning(dockerDeviceLog) << createProcess.allOutput();
return;
}
m_container = createProcess.cleanedStdOut().trimmed();
if (m_container.isEmpty())
@@ -1094,7 +1098,7 @@ public:
m_view->setSelectionMode(QAbstractItemView::SingleSelection);
m_log = new QTextBrowser;
m_log->setVisible(false);
m_log->setVisible(dockerDeviceLog().isDebugEnabled());
const QString fail = QString{"Docker: "}
+ QCoreApplication::translate("Debugger::Internal::GdbEngine",