1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 03:45:56 +01:00

Fix disconnecting a closure, forgot it was single shot

This commit is contained in:
Chocobozzz 2015-02-20 16:08:04 +01:00
parent 716064a006
commit ec60d1174c
2 changed files with 3 additions and 9 deletions

View File

@ -178,17 +178,12 @@ void SeafileService::GetLibrariesFinished(QNetworkReply* reply) {
emit GetLibrariesFinishedSignal(libraries);
}
void SeafileService::ChangeLibrary(const QString& new_library,
bool have_to_disconnect) {
if (have_to_disconnect) {
disconnect(this, SIGNAL(UpdatingLibrariesFinishedSignal()));
}
void SeafileService::ChangeLibrary(const QString& new_library) {
if (indexing_task_id_ != -1) {
qLog(Debug) << "Want to change the Seafile library, but Clementine waits "
"the previous indexing...";
NewClosure(this, SIGNAL(UpdatingLibrariesFinishedSignal()), this,
SLOT(ChangeLibrary(QString, bool)), new_library, true);
SLOT(ChangeLibrary(QString)), new_library);
return;
}

View File

@ -80,8 +80,7 @@ class SeafileService : public CloudFileService {
public slots:
void Connect();
void ForgetCredentials();
void ChangeLibrary(const QString& new_library,
bool have_to_disconnect = false);
void ChangeLibrary(const QString& new_library);
signals:
void Connected();