Commit a44830c3 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Don't show error message on ERR_USER_CANCELED

There's no point telling the user what they just did.

After frameworks/kio@f192c133
this error has a text associated with it, so it might
show up in the UI.
parent 29cd7b8e
Pipeline #222509 passed with stage
in 12 minutes and 38 seconds
......@@ -24,7 +24,7 @@ DolphinNewFileMenu::~DolphinNewFileMenu()
void DolphinNewFileMenu::slotResult(KJob* job)
{
if (job->error()) {
if (job->error() && job->error() != KIO::ERR_USER_CANCELED) {
Q_EMIT errorMessage(job->errorString());
} else {
KNewFileMenu::slotResult(job);
......
......@@ -255,7 +255,11 @@ void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* eve
KIO::DropJob *job = DragAndDropHelper::dropUrls(destItem.mostLocalUrl(), &dropEvent, this);
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());
}
});
}
}
}
......
......@@ -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());
}
});
}
}
......
......@@ -1367,7 +1367,7 @@ void DolphinView::slotItemCreated(const QUrl& url)
void DolphinView::slotJobResult(KJob *job)
{
if (job->error()) {
if (job->error() && job->error() != KIO::ERR_USER_CANCELED) {
Q_EMIT errorMessage(job->errorString());
}
if (!m_selectedUrls.isEmpty()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment