mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 00:39:53 -05:00
Show a dialog when no window matches for auto-type.
This commit is contained in:
parent
0b9167c78b
commit
b194c29166
@ -30,6 +30,7 @@
|
|||||||
#include "core/Group.h"
|
#include "core/Group.h"
|
||||||
#include "core/ListDeleter.h"
|
#include "core/ListDeleter.h"
|
||||||
#include "core/Tools.h"
|
#include "core/Tools.h"
|
||||||
|
#include "gui/MessageBox.h"
|
||||||
|
|
||||||
AutoType* AutoType::m_instance = Q_NULLPTR;
|
AutoType* AutoType::m_instance = Q_NULLPTR;
|
||||||
|
|
||||||
@ -189,6 +190,8 @@ void AutoType::performGlobalAutoType(const QList<Database*>& dbList)
|
|||||||
|
|
||||||
if (entryList.isEmpty()) {
|
if (entryList.isEmpty()) {
|
||||||
m_inAutoType = false;
|
m_inAutoType = false;
|
||||||
|
MessageBox::information(Q_NULLPTR, tr("Auto-Type - KeePassX"),
|
||||||
|
tr("Couldn't find an entry that matches the window title."));
|
||||||
}
|
}
|
||||||
else if ((entryList.size() == 1) && !config()->get("security/autotypeask").toBool()) {
|
else if ((entryList.size() == 1) && !config()->get("security/autotypeask").toBool()) {
|
||||||
m_inAutoType = false;
|
m_inAutoType = false;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "autotype/AutoType.h"
|
#include "autotype/AutoType.h"
|
||||||
#include "autotype/AutoTypePlatformPlugin.h"
|
#include "autotype/AutoTypePlatformPlugin.h"
|
||||||
#include "autotype/test/AutoTypeTestInterface.h"
|
#include "autotype/test/AutoTypeTestInterface.h"
|
||||||
|
#include "gui/MessageBox.h"
|
||||||
|
|
||||||
void TestAutoType::initTestCase()
|
void TestAutoType::initTestCase()
|
||||||
{
|
{
|
||||||
@ -101,6 +102,7 @@ void TestAutoType::testGlobalAutoTypeWithNoMatch()
|
|||||||
QList<Database*> dbList;
|
QList<Database*> dbList;
|
||||||
dbList.append(m_db);
|
dbList.append(m_db);
|
||||||
|
|
||||||
|
MessageBox::setNextAnswer(QMessageBox::Ok);
|
||||||
m_autoType->performGlobalAutoType(dbList);
|
m_autoType->performGlobalAutoType(dbList);
|
||||||
|
|
||||||
QCOMPARE(m_test->actionChars(), QString());
|
QCOMPARE(m_test->actionChars(), QString());
|
||||||
|
Loading…
Reference in New Issue
Block a user