[DeckSync] Drop ineffective UniqueConnection flags on lambda connects

This commit is contained in:
Lukas Brübach 2026-11-06 09:57:14 +01:00
parent d9877d2869
commit cc9321b648

View file

@ -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)