diff options
| author | Kai Uwe Broulik <[email protected]> | 2022-08-24 17:00:01 +0200 |
|---|---|---|
| committer | Kai Uwe Broulik <[email protected]> | 2022-08-24 17:00:01 +0200 |
| commit | a44830c3a9f954c376d21d4526d94c26d19d010c (patch) | |
| tree | 2ed10a125ba55a7fe291542f9211f80cd7098520 /src/panels/places/placespanel.cpp | |
| parent | 29cd7b8e1f2f21e8ae8aabba71cadb123c668775 (diff) | |
Don't show error message on ERR_USER_CANCELED
There's no point telling the user what they just did.
After https://invent.kde.org/frameworks/kio/-/commit/f192c133eb01bc8448d5ddd97fe20f8e6dbc467d
this error has a text associated with it, so it might
show up in the UI.
Diffstat (limited to 'src/panels/places/placespanel.cpp')
| -rw-r--r-- | src/panels/places/placespanel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index a55df9b45..095dc9970 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -173,7 +173,11 @@ void PlacesPanel::slotUrlsDropped(const QUrl& dest, QDropEvent* event, QWidget* { KIO::DropJob *job = DragAndDropHelper::dropUrls(dest, event, parent); if (job) { - connect(job, &KIO::DropJob::result, this, [this](KJob *job) { if (job->error()) Q_EMIT errorMessage(job->errorString()); }); + connect(job, &KIO::DropJob::result, this, [this](KJob *job) { + if (job->error() && job->error() != KIO::ERR_USER_CANCELED) { + Q_EMIT errorMessage(job->errorString()); + } + }); } } |
