mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-26 06:26:11 -05:00
Fix unit test crash
This commit is contained in:
parent
434d0fb1c0
commit
46942413db
@ -109,6 +109,7 @@ private:
|
||||
bool appExitCalled;
|
||||
};
|
||||
|
||||
#define KEEPASSXC_MAIN_WINDOW qobject_cast<MainWindow*>(qobject_cast<Application*>(qApp)->mainWindow())
|
||||
#define KEEPASSXC_MAIN_WINDOW (qobject_cast<Application*>(qApp) ? \
|
||||
qobject_cast<MainWindow*>(qobject_cast<Application*>(qApp)->mainWindow()) : nullptr)
|
||||
|
||||
#endif // KEEPASSX_MAINWINDOW_H
|
||||
|
@ -33,8 +33,10 @@ YkChallengeResponseKey::YkChallengeResponseKey(int slot, bool blocking)
|
||||
: m_slot(slot),
|
||||
m_blocking(blocking)
|
||||
{
|
||||
connect(this, SIGNAL(userInteractionRequired()), KEEPASSXC_MAIN_WINDOW, SLOT(showYubiKeyPopup()));
|
||||
connect(this, SIGNAL(userConfirmed()), KEEPASSXC_MAIN_WINDOW, SLOT(hideYubiKeyPopup()));
|
||||
if (KEEPASSXC_MAIN_WINDOW) {
|
||||
connect(this, SIGNAL(userInteractionRequired()), KEEPASSXC_MAIN_WINDOW, SLOT(showYubiKeyPopup()));
|
||||
connect(this, SIGNAL(userConfirmed()), KEEPASSXC_MAIN_WINDOW, SLOT(hideYubiKeyPopup()));
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray YkChallengeResponseKey::rawKey() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user