Fix disconnecting a closure, forgot it was single shot
This commit is contained in:
parent
716064a006
commit
ec60d1174c
|
@ -178,17 +178,12 @@ void SeafileService::GetLibrariesFinished(QNetworkReply* reply) {
|
||||||
emit GetLibrariesFinishedSignal(libraries);
|
emit GetLibrariesFinishedSignal(libraries);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SeafileService::ChangeLibrary(const QString& new_library,
|
void SeafileService::ChangeLibrary(const QString& new_library) {
|
||||||
bool have_to_disconnect) {
|
|
||||||
if (have_to_disconnect) {
|
|
||||||
disconnect(this, SIGNAL(UpdatingLibrariesFinishedSignal()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (indexing_task_id_ != -1) {
|
if (indexing_task_id_ != -1) {
|
||||||
qLog(Debug) << "Want to change the Seafile library, but Clementine waits "
|
qLog(Debug) << "Want to change the Seafile library, but Clementine waits "
|
||||||
"the previous indexing...";
|
"the previous indexing...";
|
||||||
NewClosure(this, SIGNAL(UpdatingLibrariesFinishedSignal()), this,
|
NewClosure(this, SIGNAL(UpdatingLibrariesFinishedSignal()), this,
|
||||||
SLOT(ChangeLibrary(QString, bool)), new_library, true);
|
SLOT(ChangeLibrary(QString)), new_library);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,7 @@ class SeafileService : public CloudFileService {
|
||||||
public slots:
|
public slots:
|
||||||
void Connect();
|
void Connect();
|
||||||
void ForgetCredentials();
|
void ForgetCredentials();
|
||||||
void ChangeLibrary(const QString& new_library,
|
void ChangeLibrary(const QString& new_library);
|
||||||
bool have_to_disconnect = false);
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void Connected();
|
void Connected();
|
||||||
|
|
Loading…
Reference in New Issue