File r908189.diff of Package kdebase4-runtime

Subject: sftp: fix changing URL in location bar pops up error messages
From: wstephenson@suse.de
Bug: kde#108812
Patch-upstream: 908189
--- kioslave/sftp/kio_sftp.cpp	(revision 908188)
+++ kioslave/sftp/kio_sftp.cpp	(revision 908189)
@@ -742,9 +742,12 @@ void sftpProtocol::openConnection() {
             infoMessage(i18n("Connection failed."));
             caption = i18n("Connection closed by remote host.");
             msg = ssh.errorMsg();
-            messageBox(Information, msg, caption);
+            if (!msg.isEmpty()) {
+                caption += '\n';
+                caption += msg;
+            }
             closeConnection();
-            error(ERR_COULD_NOT_LOGIN, msg);
+            error(ERR_COULD_NOT_LOGIN, caption);
             return;
 
         case KSshProcess::ERR_INTERACT:
@@ -755,11 +758,15 @@ void sftpProtocol::openConnection() {
         case KSshProcess::ERR_HOST_KEY_REJECTED:
         default:
             infoMessage(i18n("Connection failed."));
+            // Don't call messageBox! Leave GUI handling to the apps (#108812)
             caption = i18n("Unexpected SFTP error: %1", err);
             msg = ssh.errorMsg();
-            messageBox(Information, msg, caption);
+            if (!msg.isEmpty()) {
+                caption += '\n';
+                caption += msg;
+            }
             closeConnection();
-            error(ERR_UNKNOWN, msg);
+            error(ERR_UNKNOWN, caption);
             return;
         }
     }
Index: kioslave/sftp/kio_sftp.cpp
===================================================================