SVN commit 938820 by weilbach: Fix a bug in the backend. Now the backend waits for a job queue to be finished and starts the next one instead of simply dropping the jobs. This fixes a crash in the weblog style getter.x M +8 -0 backend.cpp M +1 -1 backend.h M +1 -1 blogjobqueue.cpp --- trunk/playground/pim/kblogger/src/backend/backend.cpp #938819:938820 @@ -96,6 +96,14 @@ { kDebug(); + if(mJobsQueue->isRunning()){ + connect(mJobsQueue,SIGNAL(jobsDone()), + this,SLOT(runQueuedJobs())); + return; + } + disconnect(mJobsQueue,SIGNAL(jobsDone()), + this,SLOT(runQueuedJobs())); + // show the wait dialog with the progress bar delete mWaitDialog; // create mWaitDialog with max jobs size and mMainWindow as its parent --- trunk/playground/pim/kblogger/src/backend/backend.h #938819:938820 @@ -59,7 +59,6 @@ void populateBlogsList(); - void runQueuedJobs(); ///Blog's functions (jobs) //List recent posts on the serve, is run immediatly void listPosts(const QString& blogname, int downloadCount = 5, QWidget *caller = 0); @@ -74,6 +73,7 @@ public Q_SLOTS: // synchronize the local changes with the blogs. // (Upload new or modified posts, medias and delete posts) + void runQueuedJobs(); void sync(); void slotStopQueue(); void slotStatusBarMessage(const QString&); --- trunk/playground/pim/kblogger/src/backend/blogjobqueue.cpp #938819:938820 @@ -64,8 +64,8 @@ return; } + mIsRunning = true; emit jobsStarted(mPendingJobs.count()); - mIsRunning = true; runsFirstJob(); }