Setting thread priority is only possible after calling start()

This commit is contained in:
Daniel Molkentin 2013-09-11 15:51:06 +02:00
parent 91759c4a27
commit 574e029254

View file

@ -566,7 +566,6 @@ void Folder::startSync(const QStringList &pathList)
qDebug() << "*** Start syncing";
_thread = new QThread(this);
_thread->setPriority(QThread::LowPriority);
setIgnoredFiles();
_csync = new CSyncThread( _csync_ctx, path(), QUrl(ownCloudInfo::instance()->webdavUrl() + secondPath()).path());
_csync->moveToThread(_thread);
@ -589,6 +588,7 @@ void Folder::startSync(const QStringList &pathList)
connect(_csync, SIGNAL(transmissionProgress(Progress::Info)), this, SLOT(slotTransmissionProgress(Progress::Info)));
_thread->start();
_thread->setPriority(QThread::LowPriority);
QMetaObject::invokeMethod(_csync, "startSync", Qt::QueuedConnection);
// disable events until syncing is done