- case 0: log(QLatin1String("DONE: Transfer completed successfully."), ""); break;
- case 6: log(QLatin1String("ERROR: Remote host could not be resolved!"), ""); break;
- case 7: log(QLatin1String("ERROR: Connection to remote host could not be established!"), ""); break;
- case 22: log(QLatin1String("ERROR: Requested URL was not found or returned an error!"), ""); break;
- case 28: log(QLatin1String("ERROR: Operation timed out !!!"), ""); break;
- default: log(QString().sprintf("ERROR: Terminated with unknown code %d", exitCode), ""); break;
+ const QString line = QString::fromLatin1(process.readLine()).simplified();
+ if ((!line.isEmpty()) && line.compare(QLatin1String("<")) && line.compare(QLatin1String(">")))
+ {
+ log(line);
+ }
+ }
+
+ if (!bAborted)
+ {
+ const int exitCode = process.exitCode();
+ switch (exitCode)
+ {
+ case -1:
+ case 0: log(QLatin1String("DONE: Transfer completed successfully."), ""); break;
+ case 6: log(QLatin1String("ERROR: Remote host could not be resolved!"), ""); break;
+ case 7: log(QLatin1String("ERROR: Connection to remote host could not be established!"), ""); break;
+ case 22: log(QLatin1String("ERROR: Requested URL was not found or returned an error!"), ""); break;
+ case 28: log(QLatin1String("ERROR: Operation timed out !!!"), ""); break;
+ default: log(QString().sprintf("ERROR: Terminated with unknown code %d", exitCode), ""); break;
+ }
+ return (exitCode == 0);