mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 01:53:25 -08:00
[DeckSync] Drop ineffective UniqueConnection flags on lambda connects
This commit is contained in:
parent
d9877d2869
commit
cc9321b648
1 changed files with 18 additions and 24 deletions
|
|
@ -106,31 +106,25 @@ DeckSyncManager::DeckSyncManager(AbstractClient *_client, ColorIdentityProvider
|
|||
if (client == nullptr) {
|
||||
return;
|
||||
}
|
||||
connect(
|
||||
client, &AbstractClient::statusChanged, this,
|
||||
[this](ClientStatus status) {
|
||||
if (status == StatusDisconnected) {
|
||||
offline = true;
|
||||
debounceTimer->stop();
|
||||
// A run cannot survive the session it was started on: the in-flight
|
||||
// command comes back RespNotConnected, the remaining queue would be
|
||||
// sent on a dead client, and a re-login as another account would
|
||||
// receive this profile's uploads and deletes.
|
||||
if (syncing) {
|
||||
activeConflict = ActiveConflict();
|
||||
failSync(tr("Disconnected."));
|
||||
}
|
||||
connect(client, &AbstractClient::statusChanged, this, [this](ClientStatus status) {
|
||||
if (status == StatusDisconnected) {
|
||||
offline = true;
|
||||
debounceTimer->stop();
|
||||
// A run cannot survive the session it was started on: the in-flight
|
||||
// command comes back RespNotConnected, the remaining queue would be
|
||||
// sent on a dead client, and a re-login as another account would
|
||||
// receive this profile's uploads and deletes.
|
||||
if (syncing) {
|
||||
activeConflict = ActiveConflict();
|
||||
failSync(tr("Disconnected."));
|
||||
}
|
||||
},
|
||||
Qt::UniqueConnection);
|
||||
connect(
|
||||
client, &AbstractClient::userInfoChanged, this,
|
||||
[this](const ServerInfo_User &userInfo) {
|
||||
offline = false;
|
||||
serverUsername = QString::fromStdString(userInfo.name());
|
||||
autoSyncSoon();
|
||||
},
|
||||
Qt::UniqueConnection);
|
||||
}
|
||||
});
|
||||
connect(client, &AbstractClient::userInfoChanged, this, [this](const ServerInfo_User &userInfo) {
|
||||
offline = false;
|
||||
serverUsername = QString::fromStdString(userInfo.name());
|
||||
autoSyncSoon();
|
||||
});
|
||||
}
|
||||
|
||||
void DeckSyncManager::setServerIdentity(const QString &host, int port, const QString &username)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue