mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Don't show error message on ERR_USER_CANCELED
There's no point telling the user what they just did. Afterf192c133eb
this error has a text associated with it, so it might show up in the UI. (cherry picked from commita44830c3a9
)
This commit is contained in:
parent
f595a9b7a9
commit
573fc54be3
4 changed files with 12 additions and 4 deletions
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1342,7 +1342,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()) {
|
||||
|
|
Loading…
Reference in a new issue