From 06df12013b7ccc961fff9b57803b054141fa84f6 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 22 Aug 2022 19:55:30 +0200 Subject: [PATCH] Places Panel: Don't show error message on UserCanceled There's no point telling the user what they just did --- src/panels/places/placespanel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 38dc4dc3a..a55df9b45 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -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(); -- 2.47.3