┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-08-01 21:11:29 +0000
committerPeter Penz <[email protected]>2009-08-01 21:11:29 +0000
commit79a6e75b6567e8cf2ef677cea6bb2c34075d07c7 (patch)
treef6f90e045a5f95b925e83ae9fef53c33511e7738
parent52478842e320536ce77eb1a13c235b2d5f98927f (diff)
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
-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
{