mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Assure that no empty error message is shown in the statusbar. This should not happen and the fix in this case should be done in the corresponding IO-slave, but let's be prepared for the "worst case".
svn path=/trunk/KDE/kdebase/apps/; revision=1005715
This commit is contained in:
parent
52478842e3
commit
79a6e75b65
|
@ -1,6 +1,5 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Peter Penz *
|
||||
* peter.penz@gmx.at *
|
||||
* Copyright (C) 2006-2009 by Peter Penz <peter.penz@gmx.at> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
|
@ -19,6 +18,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
#include "dolphindirlister.h"
|
||||
#include "klocale.h"
|
||||
#include <kio/jobclasses.h>
|
||||
|
||||
DolphinDirLister::DolphinDirLister() :
|
||||
|
@ -35,7 +35,12 @@ void DolphinDirLister::handleError(KIO::Job* job)
|
|||
if (job->error() == KIO::ERR_IS_FILE) {
|
||||
emit urlIsFileError(url());
|
||||
} else {
|
||||
emit errorMessage(job->errorString());
|
||||
const QString errorString = job->errorString();
|
||||
if (errorString.isEmpty()) {
|
||||
emit errorMessage(i18nc("@info:status", "Unknown error."));
|
||||
} else {
|
||||
emit errorMessage(job->errorString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Peter Penz *
|
||||
* peter.penz@gmx.at *
|
||||
* Copyright (C) 2006-2009 by Peter Penz <peter.penz@gmx.at> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
|
@ -24,10 +23,8 @@
|
|||
#include <kdirlister.h>
|
||||
|
||||
/**
|
||||
* @brief Extends the class KDirLister by emitting an error
|
||||
* signal containing text.
|
||||
*
|
||||
* @author Peter Penz
|
||||
* @brief Extends the class KDirLister by emitting a signal when an
|
||||
* error occured instead of showing an error dialog.
|
||||
*/
|
||||
class DolphinDirLister : public KDirLister
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue