[Pkg-owncloud-commits] [owncloud-client] 193/333: owncloudcmd: Fix an error during update phase would not terminate

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 8aace3284ffdfee96dc45246a48e0d1c26a4cc6b
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Mar 21 10:03:11 2014 +0100

    owncloudcmd:  Fix an error during update phase would not terminate
    
    the QApplication::quit()  would be run before the exec() and would
    be a noop,   and then exec would just wait forever.
---
 src/owncloudcmd/owncloudcmd.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/owncloudcmd/owncloudcmd.cpp b/src/owncloudcmd/owncloudcmd.cpp
index d8e53a6..d24b041 100644
--- a/src/owncloudcmd/owncloudcmd.cpp
+++ b/src/owncloudcmd/owncloudcmd.cpp
@@ -177,7 +177,10 @@ int main(int argc, char **argv) {
     SyncJournalDb db(options.source_dir);
     CSyncThread csyncthread(_csync_ctx, options.source_dir, QUrl(options.target_url).path(), &db);
     QObject::connect(&csyncthread, SIGNAL(finished()), &app, SLOT(quit()));
-    csyncthread.startSync();
+
+    // Have to be done async, else, an error while updating does not terminate the event loop.
+    QMetaObject::invokeMethod(&csyncthread, "startSync", Qt::QueuedConnection);
+
 
     app.exec();
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list