]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Trezor: fix splashdialog hide on pin cancel
authortobtoht <thotbot@protonmail.com>
Wed, 7 Jul 2021 02:38:15 +0000 (04:38 +0200)
committertobtoht <thotbot@protonmail.com>
Wed, 7 Jul 2021 02:38:15 +0000 (04:38 +0200)
src/WindowManager.cpp
src/WindowManager.h
src/libwalletqt/WalletManager.cpp

index 8ca729e1e77ca6ed13169bb89ebc5ef64c782768..89853d72242fd9d8eef2b429174ca7af4f7d4a29 100644 (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;
index c82c81b88d0c27bc200adb904b0fc7315649b5e4..1bf852fc1b8659c22b91a7ca5a823a905e273230 100644 (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:
index aab885f60a95d845ba33a800f01d383ceece4687..fbecd333504d87e051a43bf0f1df3f756cf78419 100644 (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
     {