void MainWindow::startTask(Task *task) { connect(task, SIGNAL(started()), SLOT(taskStart())); connect(task, SIGNAL(succeeded()), SLOT(taskEnd())); connect(task, SIGNAL(failed(QString)), SLOT(taskEnd())); task->start(); }
void TTRssFetcher::callNextCmd() { if (!commandList.isEmpty()) { proggress = proggressTotal - commandList.size() - Settings::instance()->getRetentionDays() + lastDate; emit progress(proggress, proggressTotal); currentCommand = commandList.takeFirst(); (this->*currentCommand)(); } else { taskEnd(); } }