]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Places Panel: Don't show error message on UserCanceled
authorKai Uwe Broulik <kde@privat.broulik.de>
Mon, 22 Aug 2022 17:55:30 +0000 (19:55 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Mon, 22 Aug 2022 17:55:30 +0000 (19:55 +0200)
There's no point telling the user what they just did

src/panels/places/placespanel.cpp

index 38dc4dc3a65d53c3168fffa3fd2a811999a5f65e..a55df9b45db925130330d13cb8a1babb18d7ef26 100644 (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();