]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Assure that no empty error message is shown in the statusbar. This should not happen...
authorPeter Penz <peter.penz19@gmail.com>
Sat, 1 Aug 2009 21:11:29 +0000 (21:11 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 1 Aug 2009 21:11:29 +0000 (21:11 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1005715

src/dolphindirlister.cpp
src/dolphindirlister.h

index 63320b5280db8985d190622e99587b9113471554..43196bb211546fa80ccc6125683412a8181ac3a7 100644 (file)
@@ -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  *
  *                                                                         *
  *   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 "dolphindirlister.h"
+#include "klocale.h"
 #include <kio/jobclasses.h>
 
 DolphinDirLister::DolphinDirLister() :
 #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 {
     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());
+        }
     }
 }
 
     }
 }
 
index b615f63ba3d83ca2e96578642a053b110fac59bf..6723d19b6833cbaa37cf34773e5a9f897d0ab42e 100644 (file)
@@ -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  *
  *                                                                         *
  *   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  *
 #include <kdirlister.h>
 
 /**
 #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
 {
  */
 class DolphinDirLister : public KDirLister
 {