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

List:       kde-commits
Subject:    [kipi-plugins] vkontakte: vkontakte: Bring UI to its normal state when UploadPhotosJob finishes with
From:       Alexander Potashev <aspotashev () gmail ! com>
Date:       2015-05-10 17:27:47
Message-ID: E1YrV11-0006s2-32 () scm ! kde ! org
[Download RAW message or body]

Git commit 1cb8eaaa894462253bf111c7347c15e4649bb5fc by Alexander Potashev.
Committed on 10/05/2015 at 16:44.
Pushed by aspotashev into branch 'master'.

vkontakte: Bring UI to its normal state when UploadPhotosJob finishes with an error

M  +5    -12   vkontakte/vkwindow.cpp

http://commits.kde.org/kipi-plugins/1cb8eaaa894462253bf111c7347c15e4649bb5fc

diff --git a/vkontakte/vkwindow.cpp b/vkontakte/vkwindow.cpp
index 240a19a..bede268 100644
--- a/vkontakte/vkwindow.cpp
+++ b/vkontakte/vkwindow.cpp
@@ -88,17 +88,6 @@
 #include "albumchooserwidget.h"
 #include "authinfowidget.h"
 
-#undef SLOT_JOB_DONE_INIT
-#define SLOT_JOB_DONE_INIT(JobClass)                     \
-    JobClass* const job = dynamic_cast<JobClass*>(kjob); \
-    Q_ASSERT(job);                                       \
-    m_jobs.removeAll(job);                               \
-    if (job && job->error())                             \
-    {                                                    \
-        handleVkError(job);                              \
-        return;                                          \
-    }
-
 namespace KIPIVkontaktePlugin
 {
 
@@ -440,7 +429,11 @@ void VkontakteWindow::slotStartTransfer()
 
 void VkontakteWindow::slotPhotoUploadDone(KJob *kjob)
 {
-    SLOT_JOB_DONE_INIT(Vkontakte::UploadPhotosJob)
+    Vkontakte::UploadPhotosJob* const job = dynamic_cast<Vkontakte::UploadPhotosJob*>(kjob);
+    Q_ASSERT(job);
+    m_jobs.removeAll(job);
+    if (job && job->error())
+        handleVkError(job);
 
     m_progressBar->hide();
     m_progressBar->progressCompleted();

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

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