Places Panel: Don't show error message on UserCanceled

There's no point telling the user what they just did
This commit is contained in:
Kai Uwe Broulik 2022-08-22 19:55:30 +02:00
parent 53be1a4ccb
commit 06df12013b

View file

@ -229,7 +229,9 @@ void PlacesPanel::slotTearDownRequestedExternally(const QString &udi)
void PlacesPanel::slotTearDownDone(Solid::ErrorType error, const QVariant& errorData)
{
if (error && errorData.isValid()) {
if (error == Solid::ErrorType::DeviceBusy) {
if (error == Solid::ErrorType::UserCanceled) {
// No need to tell the user what they just did.
} else if (error == Solid::ErrorType::DeviceBusy) {
KListOpenFilesJob* listOpenFilesJob = new KListOpenFilesJob(m_deviceToTearDown->filePath());
connect(listOpenFilesJob, &KIO::Job::result, this, [this, listOpenFilesJob](KJob*) {
const KProcessList::KProcessInfoList blockingProcesses = listOpenFilesJob->processInfoList();