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

List:       kde-commits
Subject:    [kdevplatform/1.5] vcs/dvcs: Set error state correctly so that KJob notices
From:       eli mackenzie <argonel () gmail ! com>
Date:       2013-01-31 21:57:29
Message-ID: 20130131215729.B6140A6091 () git ! kde ! org
[Download RAW message or body]

Git commit c96be5e2c114bc1561cd05d1343e80eaf1552aa9 by eli mackenzie.
Committed on 31/01/2013 at 18:08.
Pushed by argonel into branch '1.5'.

Set error state correctly so that KJob notices

Setting the error number and text is not enough to precent KJob
from trying to run a job. I've also changed the job state to
VcsJob::JobFailed.

REVIEW: 108689

M  +4    -0    vcs/dvcs/dvcsjob.cpp

http://commits.kde.org/kdevplatform/c96be5e2c114bc1561cd05d1343e80eaf1552aa9

diff --git a/vcs/dvcs/dvcsjob.cpp b/vcs/dvcs/dvcsjob.cpp
index d05d58f..5370e46 100644
--- a/vcs/dvcs/dvcsjob.cpp
+++ b/vcs/dvcs/dvcsjob.cpp
@@ -156,6 +156,8 @@ void DVcsJob::start()
         d->model->appendLine(error);
         setError( 255 );
         setErrorText(error);
+        d->status = JobFailed;
+        emitResult();
         return;
     }
     if( !workingdir.isAbsolute() ) {
@@ -163,6 +165,8 @@ void DVcsJob::start()
         d->model->appendLine(error);
         setError( 255 );
         setErrorText(error);
+        d->status = JobFailed;
+        emitResult();
         return;
     }
 

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

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