Cleanup compiler warnings on all platforms (#10847)

Fixes #10730.

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
This commit is contained in:
Carlo Teubner 2024-06-13 02:25:15 +01:00 committed by GitHub
parent af3b4074e2
commit c3df16147d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 15 deletions

View file

@ -515,20 +515,23 @@ void BrowserService::showPasswordGenerator(const KeyPairMessage& keyPairMessage)
if (!m_passwordGenerator) {
m_passwordGenerator = PasswordGeneratorWidget::popupGenerator();
connect(m_passwordGenerator.data(), &PasswordGeneratorWidget::closed, m_passwordGenerator.data(), [=] {
if (!m_passwordGenerator->isPasswordGenerated()) {
auto errorMessage = browserMessageBuilder()->getErrorReply("generate-password",
ERROR_KEEPASS_ACTION_CANCELLED_OR_DENIED);
m_browserHost->sendClientMessage(keyPairMessage.socket, errorMessage);
}
connect(m_passwordGenerator.data(),
&PasswordGeneratorWidget::closed,
m_passwordGenerator.data(),
[this, keyPairMessage] {
if (!m_passwordGenerator->isPasswordGenerated()) {
auto errorMessage = browserMessageBuilder()->getErrorReply(
"generate-password", ERROR_KEEPASS_ACTION_CANCELLED_OR_DENIED);
m_browserHost->sendClientMessage(keyPairMessage.socket, errorMessage);
}
QTimer::singleShot(50, this, [&] { hideWindow(); });
});
QTimer::singleShot(50, this, [&] { hideWindow(); });
});
connect(m_passwordGenerator.data(),
&PasswordGeneratorWidget::appliedPassword,
m_passwordGenerator.data(),
[=](const QString& password) {
[this, keyPairMessage](const QString& password) {
const Parameters params{{"password", password}};
m_browserHost->sendClientMessage(keyPairMessage.socket,
browserMessageBuilder()->buildResponse("generate-password",