Trezor: fix splashdialog hide on pin cancel

This commit is contained in:
tobtoht 2021-07-07 04:38:15 +02:00
parent 4b747bf163
commit f2a72c342e
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
3 changed files with 11 additions and 5 deletions

View file

@ -22,6 +22,7 @@ WindowManager::WindowManager() {
connect(m_walletManager, &WalletManager::walletOpened, this, &WindowManager::onWalletOpened);
connect(m_walletManager, &WalletManager::walletCreated, this, &WindowManager::onWalletCreated);
connect(m_walletManager, &WalletManager::deviceButtonRequest, this, &WindowManager::onDeviceButtonRequest);
connect(m_walletManager, &WalletManager::deviceButtonPressed, this, &WindowManager::onDeviceButtonPressed);
connect(m_walletManager, &WalletManager::deviceError, this, &WindowManager::onDeviceError);
connect(qApp, &QGuiApplication::lastWindowClosed, this, &WindowManager::quitAfterLastWindow);
@ -374,6 +375,10 @@ void WindowManager::onDeviceButtonRequest(quint64 code) {
m_splashDialog->setEnabled(true);
}
void WindowManager::onDeviceButtonPressed() {
m_splashDialog->hide();
}
void WindowManager::onDeviceError(const QString &errorMessage) {
// TODO: when does this get called?
qCritical() << Q_FUNC_INFO << errorMessage;

View file

@ -39,6 +39,7 @@ private slots:
void onWalletOpenPasswordRequired(bool invalidPassword, const QString &path);
void onInitialNetworkConfigured();
void onDeviceButtonRequest(quint64 code);
void onDeviceButtonPressed();
void onDeviceError(const QString &errorMessage);
private:

View file

@ -36,11 +36,11 @@ public:
emit m_mgr->deviceButtonRequest(code);
}
//
// virtual void onDeviceButtonPressed() override
// {
// qDebug() << __FUNCTION__;
// emit m_mgr->deviceButtonPressed();
// }
virtual void onDeviceButtonPressed() override
{
qDebug() << __FUNCTION__;
emit m_mgr->deviceButtonPressed();
}
virtual void onDeviceError(const std::string &message) override
{