Change the name of the task when updating the libraries in the Seafile

service and clean the code
This commit is contained in:
Chocobozzz 2015-02-23 15:27:20 +01:00
parent 4b1a6651b1
commit 2804ab32ec
1 changed files with 4 additions and 5 deletions

View File

@ -217,15 +217,14 @@ void SeafileService::Connect() {
}
void SeafileService::UpdateLibraries() {
if (indexing_task_id_ == -1) {
indexing_task_id_ =
app_->task_manager()->StartTask(tr("Build index of Seafile"));
}
// Quit if we are already updating the libraries
else {
if (indexing_task_id_ != -1) {
return;
}
indexing_task_id_ =
app_->task_manager()->StartTask(tr("Building Seafile index..."));
connect(this, SIGNAL(GetLibrariesFinishedSignal(QMap<QString, QString>)),
this, SLOT(UpdateLibrariesInProgress(QMap<QString, QString>)));