Docker: Don't show auto detect controls

When a docker device is auto-detected (created by the installer)
we do not want to show the auto-detect controls.

Change-Id: I31f07f4fbb595bb52787e358a8467e46c862ee48
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-12-06 13:46:08 +01:00
parent ebe708c1a3
commit 89b81b6046

View File

@@ -203,6 +203,23 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device)
using namespace Layouting;
// clang-format off
Column detectionControls {
Space(20),
Row {
Tr::tr("Search Locations:"),
searchDirsComboBox,
searchDirsLineEdit
},
Row {
autoDetectButton,
undoAutoDetectButton,
listAutoDetectedButton,
st,
},
Tr::tr("Detection log:"),
logView
};
Form {
repoLabel, m_repoLineEdit, br,
tagLabel, m_tagLineEdit, br,
@@ -216,22 +233,7 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device)
pathListLabel,
m_pathsListEdit,
}, br,
Column {
Space(20),
Row {
Tr::tr("Search Locations:"),
searchDirsComboBox,
searchDirsLineEdit
},
Row {
autoDetectButton,
undoAutoDetectButton,
listAutoDetectedButton,
st,
},
Tr::tr("Detection log:"),
logView
}
(dockerDevice->isAutoDetected() ? Column {} : std::move(detectionControls)),
}.attachTo(this, WithoutMargins);
// clang-format on