Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Manna <kyle@kylemanna.com>2017-01-15 04:08:48 +0300
committerKyle Manna <kyle@kylemanna.com>2017-01-15 04:08:48 +0300
commitf33cd1541941a088b90f463d457f4a9f86aa712a (patch)
treec65f62be1b3e0682c4cccb6ceac7dbe025b42423
parent05774854efb4e32280aac7d7bcd420779c4ec375 (diff)
gui: Clear YubiKeys detected on each load
* Clear the YubiKey detected list on each load. * In the event the YubiKey was removed, it will no longer be displayed. * If it's still present it won't be duplicated.
-rw-r--r--src/gui/DatabaseOpenWidget.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp
index 5d3815963..0b63bc0fc 100644
--- a/src/gui/DatabaseOpenWidget.cpp
+++ b/src/gui/DatabaseOpenWidget.cpp
@@ -64,6 +64,10 @@ DatabaseOpenWidget::DatabaseOpenWidget(QWidget* parent)
connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(openDatabase()));
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject()));
+
+ connect(YubiKey::instance(), SIGNAL(detected(int,bool)),
+ SLOT(ykDetected(int,bool)),
+ Qt::QueuedConnection);
}
DatabaseOpenWidget::~DatabaseOpenWidget()
@@ -92,10 +96,8 @@ void DatabaseOpenWidget::load(const QString& filename)
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
- /* YubiKey init is slow */
- connect(YubiKey::instance(), SIGNAL(detected(int,bool)),
- SLOT(ykDetected(int,bool)),
- Qt::QueuedConnection);
+ /* YubiKey init is slow, detect asynchronously to not block the UI */
+ m_ui->comboChallengeResponse->clear();
QtConcurrent::run(YubiKey::instance(), &YubiKey::detect);
m_ui->editPassword->setFocus();