[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kget
From:       Lukas Appelhans <l.appelhans () gmx ! de>
Date:       2011-05-29 0:08:28
Message-ID: 20110529000828.99118AC73E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1233954 by lappelhans:

Really stop transfers when they have a nonsolveable error
also remove the two not used mms implementations


 M  +1 -1      core/job.cpp  
 M  +6 -1      core/scheduler.cpp  
 M  +1 -2      core/transfer.cpp  
 D             transfer-plugins/mms (directory)  
 D             transfer-plugins/mmsclient (directory)  


--- trunk/KDE/kdenetwork/kget/core/job.cpp #1233953:1233954
@@ -64,11 +64,11 @@
 
 void Job::setError(const QString &text, const QPixmap &pixmap, ErrorType type, int \
errorId)  {
+    setStatus(Job::Aborted);
     m_error.id = errorId;
     m_error.text = text;
     m_error.pixmap = pixmap;
     m_error.type = type;
-    setStatus(Job::Aborted);
 }
 
 Job::Error Job::error() const
--- trunk/KDE/kdenetwork/kget/core/scheduler.cpp #1233953:1233954
@@ -182,9 +182,14 @@
         case AbortTimeout:
             kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") \
= AbortTimeout ";  break;
+        case Error:
+            kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") \
= Error "; +            break;
     }
     
-    if (failure.status == Error || //If this happens the job just gets stopped
+    if (failure.status == Error) {
+        static_cast<Transfer*>(job)->handler()->stop();
+    } else if (//If this happens the job just gets stopped
         // Second condition: if count >  reconnectRetries and Timeout happened \
                trigger a stop/start BUT only if
         // 10 timeouts have happened (9 of them without taking any action). This \
                means every 10*Settings::reconnectDelay() (ex. 15s -> 150s)
        (failure.count >  Settings::reconnectRetries() && (failure.status == \
                StallTimeout || failure.status == AbortTimeout) 
--- trunk/KDE/kdenetwork/kget/core/transfer.cpp #1233953:1233954
@@ -308,8 +308,7 @@
 {
     const bool statusChanged = (status() != jobStatus);
     QString statusText = text;
-    if (statusText.isEmpty())
-    {
+    if (statusText.isEmpty()) {
         statusText = i18nc(STATUSTEXTS[jobStatus].context, \
STATUSTEXTS[jobStatus].name);  }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic