┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dolphindirlister.cpp11
-rw-r--r--src/dolphindirlister.h9
2 files changed, 11 insertions, 9 deletions
diff --git a/src/dolphindirlister.cpp b/src/dolphindirlister.cpp
index 63320b528..43196bb21 100644
--- a/src/dolphindirlister.cpp
+++ b/src/dolphindirlister.cpp
@@ -1,6 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
+ * Copyright (C) 2006-2009 by Peter Penz <[email protected]> *
* *
* 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());
+ }
}
}
diff --git a/src/dolphindirlister.h b/src/dolphindirlister.h
index b615f63ba..6723d19b6 100644
--- a/src/dolphindirlister.h
+++ b/src/dolphindirlister.h
@@ -1,6 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
+ * Copyright (C) 2006-2009 by Peter Penz <[email protected]> *
* *
* 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
{