Changeset View
Changeset View
Standalone View
Standalone View
src/qt/intro.cpp
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | void Intro::on_dataDirCustom_clicked() { | ||||
ui->ellipsisButton->setEnabled(true); | ui->ellipsisButton->setEnabled(true); | ||||
} | } | ||||
void Intro::startThread() { | void Intro::startThread() { | ||||
thread = new QThread(this); | thread = new QThread(this); | ||||
FreespaceChecker *executor = new FreespaceChecker(this); | FreespaceChecker *executor = new FreespaceChecker(this); | ||||
executor->moveToThread(thread); | executor->moveToThread(thread); | ||||
connect(executor, SIGNAL(reply(int, QString, quint64)), this, | connect(executor, &FreespaceChecker::reply, this, &Intro::setStatus); | ||||
SLOT(setStatus(int, QString, quint64))); | connect(this, &Intro::requestCheck, executor, &FreespaceChecker::check); | ||||
connect(this, SIGNAL(requestCheck()), executor, SLOT(check())); | |||||
/* make sure executor object is deleted in its own thread */ | /* make sure executor object is deleted in its own thread */ | ||||
connect(this, SIGNAL(stopThread()), executor, SLOT(deleteLater())); | connect(this, &Intro::stopThread, executor, &QObject::deleteLater); | ||||
connect(this, SIGNAL(stopThread()), thread, SLOT(quit())); | connect(this, &Intro::stopThread, thread, &QThread::quit); | ||||
thread->start(); | thread->start(); | ||||
} | } | ||||
void Intro::checkPath(const QString &dataDir) { | void Intro::checkPath(const QString &dataDir) { | ||||
mutex.lock(); | mutex.lock(); | ||||
pathToCheck = dataDir; | pathToCheck = dataDir; | ||||
if (!signalled) { | if (!signalled) { | ||||
Show All 14 Lines |