forked from qt-creator/qt-creator
ProjectExplorer: Allow devices to report tasks in validate
And use it to report a hard error when docker devices don't have a shared directory set. While this is possibly too harsh in the long run it fits the current situation where we want to use the container for building projects. Change-Id: I1430716b5722fba537bb964463ce25c7001be6a4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -473,6 +473,18 @@ IDeviceWidget *DockerDevice::createWidget()
|
||||
return new DockerDeviceWidget(sharedFromThis());
|
||||
}
|
||||
|
||||
Tasks DockerDevice::validate() const
|
||||
{
|
||||
Tasks result;
|
||||
if (d->m_data.mounts.isEmpty()) {
|
||||
result << Task(Task::Error,
|
||||
tr("The Docker device has not set up shared directories."
|
||||
"This will not work for building."),
|
||||
{}, -1, {});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// DockerDevice
|
||||
|
||||
|
||||
Reference in New Issue
Block a user