mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
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.
This commit is contained in:
parent
922e004fc6
commit
8aace3284f
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue