Example #1
0
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();
}
Example #2
0
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();
    }
}