mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 10:03:26 -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) {
|
if (client == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
connect(
|
connect(client, &AbstractClient::statusChanged, this, [this](ClientStatus status) {
|
||||||
client, &AbstractClient::statusChanged, this,
|
if (status == StatusDisconnected) {
|
||||||
[this](ClientStatus status) {
|
offline = true;
|
||||||
if (status == StatusDisconnected) {
|
debounceTimer->stop();
|
||||||
offline = true;
|
// A run cannot survive the session it was started on: the in-flight
|
||||||
debounceTimer->stop();
|
// command comes back RespNotConnected, the remaining queue would be
|
||||||
// A run cannot survive the session it was started on: the in-flight
|
// sent on a dead client, and a re-login as another account would
|
||||||
// command comes back RespNotConnected, the remaining queue would be
|
// receive this profile's uploads and deletes.
|
||||||
// sent on a dead client, and a re-login as another account would
|
if (syncing) {
|
||||||
// receive this profile's uploads and deletes.
|
activeConflict = ActiveConflict();
|
||||||
if (syncing) {
|
failSync(tr("Disconnected."));
|
||||||
activeConflict = ActiveConflict();
|
|
||||||
failSync(tr("Disconnected."));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
Qt::UniqueConnection);
|
});
|
||||||
connect(
|
connect(client, &AbstractClient::userInfoChanged, this, [this](const ServerInfo_User &userInfo) {
|
||||||
client, &AbstractClient::userInfoChanged, this,
|
offline = false;
|
||||||
[this](const ServerInfo_User &userInfo) {
|
serverUsername = QString::fromStdString(userInfo.name());
|
||||||
offline = false;
|
autoSyncSoon();
|
||||||
serverUsername = QString::fromStdString(userInfo.name());
|
});
|
||||||
autoSyncSoon();
|
|
||||||
},
|
|
||||||
Qt::UniqueConnection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeckSyncManager::setServerIdentity(const QString &host, int port, const QString &username)
|
void DeckSyncManager::setServerIdentity(const QString &host, int port, const QString &username)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue