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
path: root/src/gui
diff options
context:
space:
mode:
authorToni Spets <toni.spets@iki.fi>2022-02-19 23:40:59 +0300
committerJonathan White <support@dmapps.us>2022-02-21 00:12:16 +0300
commitbfbc0e5ec6ee77f44411dbe3f63c80405cb1c182 (patch)
treecb0b9d95b93cec1a78bab98e42d5cbabf2dc07ef /src/gui
parent0701d1d6cd4d01596b2586a5e02b9a2877c5320c (diff)
Auto-Type: Allow retyping with automatic relock
If relock after performing Auto-Type is enabled it will wait until specified timeout before doing so. Retype time is now configurable and is decreased from the old hardcoded 30 seconds down to 15 seconds to keep the default a bit more secure while still allowing the user to set it higher for their liking. To restore old behavior the user can set retype time to 0 which will make the database relock instantly. Auto-Type relock setting relocated to Auto-Type tab to group it better with the other Auto-Type settings.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/ApplicationSettingsWidget.cpp6
-rw-r--r--src/gui/ApplicationSettingsWidgetGeneral.ui148
-rw-r--r--src/gui/ApplicationSettingsWidgetSecurity.ui8
-rw-r--r--src/gui/DatabaseTabWidget.cpp2
4 files changed, 94 insertions, 70 deletions
diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp
index 61a3cc0f5..7620c9ba5 100644
--- a/src/gui/ApplicationSettingsWidget.cpp
+++ b/src/gui/ApplicationSettingsWidget.cpp
@@ -260,6 +260,7 @@ void ApplicationSettingsWidget::loadSettings()
showExpiredEntriesOnDatabaseUnlockToggled(m_generalUi->showExpiredEntriesOnDatabaseUnlockCheckBox->isChecked());
m_generalUi->autoTypeAskCheckBox->setChecked(config()->get(Config::Security_AutoTypeAsk).toBool());
+ m_generalUi->autoTypeRelockDatabaseCheckBox->setChecked(config()->get(Config::Security_RelockAutoType).toBool());
if (autoType()->isAvailable()) {
m_globalAutoTypeKey = static_cast<Qt::Key>(config()->get(Config::GlobalAutoTypeKey).toInt());
@@ -268,6 +269,7 @@ void ApplicationSettingsWidget::loadSettings()
if (m_globalAutoTypeKey > 0 && m_globalAutoTypeModifiers > 0) {
m_generalUi->autoTypeShortcutWidget->setShortcut(m_globalAutoTypeKey, m_globalAutoTypeModifiers);
}
+ m_generalUi->autoTypeRetypeTimeSpinBox->setValue(config()->get(Config::GlobalAutoTypeRetypeTime).toInt());
m_generalUi->autoTypeShortcutWidget->setAttribute(Qt::WA_MacShowFocusRect, true);
m_generalUi->autoTypeDelaySpinBox->setValue(config()->get(Config::AutoTypeDelay).toInt());
m_generalUi->autoTypeStartDelaySpinBox->setValue(config()->get(Config::AutoTypeStartDelay).toInt());
@@ -297,7 +299,6 @@ void ApplicationSettingsWidget::loadSettings()
m_secUi->lockDatabaseMinimizeCheckBox->setChecked(config()->get(Config::Security_LockDatabaseMinimize).toBool());
m_secUi->lockDatabaseOnScreenLockCheckBox->setChecked(
config()->get(Config::Security_LockDatabaseScreenLock).toBool());
- m_secUi->relockDatabaseAutoTypeCheckBox->setChecked(config()->get(Config::Security_RelockAutoType).toBool());
m_secUi->fallbackToSearch->setChecked(config()->get(Config::Security_IconDownloadFallback).toBool());
m_secUi->passwordsHiddenCheckBox->setChecked(config()->get(Config::Security_PasswordsHidden).toBool());
@@ -392,11 +393,13 @@ void ApplicationSettingsWidget::saveSettings()
m_generalUi->showExpiredEntriesOnDatabaseUnlockOffsetSpinBox->value());
config()->set(Config::Security_AutoTypeAsk, m_generalUi->autoTypeAskCheckBox->isChecked());
+ config()->set(Config::Security_RelockAutoType, m_generalUi->autoTypeRelockDatabaseCheckBox->isChecked());
if (autoType()->isAvailable()) {
config()->set(Config::GlobalAutoTypeKey, m_generalUi->autoTypeShortcutWidget->key());
config()->set(Config::GlobalAutoTypeModifiers,
static_cast<int>(m_generalUi->autoTypeShortcutWidget->modifiers()));
+ config()->set(Config::GlobalAutoTypeRetypeTime, m_generalUi->autoTypeRetypeTimeSpinBox->value());
config()->set(Config::AutoTypeDelay, m_generalUi->autoTypeDelaySpinBox->value());
config()->set(Config::AutoTypeStartDelay, m_generalUi->autoTypeStartDelaySpinBox->value());
}
@@ -410,7 +413,6 @@ void ApplicationSettingsWidget::saveSettings()
config()->set(Config::Security_LockDatabaseIdleSeconds, m_secUi->lockDatabaseIdleSpinBox->value());
config()->set(Config::Security_LockDatabaseMinimize, m_secUi->lockDatabaseMinimizeCheckBox->isChecked());
config()->set(Config::Security_LockDatabaseScreenLock, m_secUi->lockDatabaseOnScreenLockCheckBox->isChecked());
- config()->set(Config::Security_RelockAutoType, m_secUi->relockDatabaseAutoTypeCheckBox->isChecked());
config()->set(Config::Security_IconDownloadFallback, m_secUi->fallbackToSearch->isChecked());
config()->set(Config::Security_PasswordsHidden, m_secUi->passwordsHiddenCheckBox->isChecked());
diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui
index f0404b215..4450b6f58 100644
--- a/src/gui/ApplicationSettingsWidgetGeneral.ui
+++ b/src/gui/ApplicationSettingsWidgetGeneral.ui
@@ -266,12 +266,15 @@
<property name="accessibleName">
<string>On database unlock, show entries that </string>
</property>
- <property name="prefix">
- <string>will expire within </string>
+ <property name="specialValueText">
+ <string>are expired</string>
</property>
<property name="suffix">
<string> days</string>
</property>
+ <property name="prefix">
+ <string>will expire within </string>
+ </property>
<property name="minimum">
<number>0</number>
</property>
@@ -281,9 +284,6 @@
<property name="value">
<number>0</number>
</property>
- <property name="specialValueText">
- <string>are expired</string>
- </property>
</widget>
</item>
<item row="0" column="2">
@@ -1021,6 +1021,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="autoTypeRelockDatabaseCheckBox">
+ <property name="text">
+ <string>Re-lock previously locked database after performing Auto-Type</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -1045,57 +1052,32 @@
<number>8</number>
</property>
<item row="2" column="0">
- <widget class="QLabel" name="autoTypeDelayLabel">
+ <widget class="QLabel" name="autoTypeStartDelayLabel">
<property name="text">
- <string>Auto-Type typing delay:</string>
+ <string>Auto-Type start delay:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
- <cstring>autoTypeDelaySpinBox</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="ShortcutWidget" name="autoTypeShortcutWidget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="accessibleName">
- <string>Global auto-type shortcut</string>
+ <cstring>autoTypeStartDelaySpinBox</cstring>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="autoTypeDelaySpinBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="accessibleName">
- <string>Auto-type character typing delay milliseconds</string>
- </property>
- <property name="suffix">
- <string comment="Milliseconds"> ms</string>
- </property>
- <property name="prefix">
- <string/>
+ <item row="0" column="0">
+ <widget class="QLabel" name="autoTypeShortcutLabel">
+ <property name="text">
+ <string>Global Auto-Type shortcut:</string>
</property>
- <property name="maximum">
- <number>1000</number>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
- <property name="value">
- <number>25</number>
+ <property name="buddy">
+ <cstring>autoTypeShortcutWidget</cstring>
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="QSpinBox" name="autoTypeStartDelaySpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@@ -1126,29 +1108,16 @@
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="autoTypeShortcutLabel">
- <property name="text">
- <string>Global Auto-Type shortcut:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>autoTypeShortcutWidget</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="autoTypeStartDelayLabel">
+ <item row="3" column="0">
+ <widget class="QLabel" name="autoTypeDelayLabel">
<property name="text">
- <string>Auto-Type start delay:</string>
+ <string>Auto-Type typing delay:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
- <cstring>autoTypeStartDelaySpinBox</cstring>
+ <cstring>autoTypeDelaySpinBox</cstring>
</property>
</widget>
</item>
@@ -1165,6 +1134,67 @@
</property>
</spacer>
</item>
+ <item row="0" column="1">
+ <widget class="ShortcutWidget" name="autoTypeShortcutWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="accessibleName">
+ <string>Global auto-type shortcut</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="autoTypeDelaySpinBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="accessibleName">
+ <string>Auto-type character typing delay milliseconds</string>
+ </property>
+ <property name="suffix">
+ <string comment="Milliseconds"> ms</string>
+ </property>
+ <property name="prefix">
+ <string/>
+ </property>
+ <property name="maximum">
+ <number>1000</number>
+ </property>
+ <property name="value">
+ <number>25</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="autoTypeRetypeLabel">
+ <property name="text">
+ <string>Remember last typed entry for:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="autoTypeRetypeTimeSpinBox">
+ <property name="suffix">
+ <string> s</string>
+ </property>
+ <property name="minimum">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>60</number>
+ </property>
+ <property name="value">
+ <number>15</number>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
diff --git a/src/gui/ApplicationSettingsWidgetSecurity.ui b/src/gui/ApplicationSettingsWidgetSecurity.ui
index deab7a6ac..bf4b984e1 100644
--- a/src/gui/ApplicationSettingsWidgetSecurity.ui
+++ b/src/gui/ApplicationSettingsWidgetSecurity.ui
@@ -216,13 +216,6 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="relockDatabaseAutoTypeCheckBox">
- <property name="text">
- <string>Re-lock previously locked database after performing Auto-Type</string>
- </property>
- </widget>
- </item>
- <item>
<widget class="QCheckBox" name="passwordsRepeatVisibleCheckBox">
<property name="text">
<string>Require password repeat when it is visible</string>
@@ -320,7 +313,6 @@
<tabstop>lockDatabaseOnScreenLockCheckBox</tabstop>
<tabstop>touchIDResetOnScreenLockCheckBox</tabstop>
<tabstop>lockDatabaseMinimizeCheckBox</tabstop>
- <tabstop>relockDatabaseAutoTypeCheckBox</tabstop>
<tabstop>passwordsRepeatVisibleCheckBox</tabstop>
<tabstop>passwordsHiddenCheckBox</tabstop>
<tabstop>passwordShowDotsCheckBox</tabstop>
diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp
index 02affe6fa..e75467abe 100644
--- a/src/gui/DatabaseTabWidget.cpp
+++ b/src/gui/DatabaseTabWidget.cpp
@@ -52,7 +52,7 @@ DatabaseTabWidget::DatabaseTabWidget(QWidget* parent)
connect(this, SIGNAL(activeDatabaseChanged(DatabaseWidget*)),
m_dbWidgetStateSync, SLOT(setActive(DatabaseWidget*)));
connect(autoType(), SIGNAL(globalAutoTypeTriggered(const QString&)), SLOT(performGlobalAutoType(const QString&)));
- connect(autoType(), SIGNAL(autotypePerformed()), SLOT(relockPendingDatabase()));
+ connect(autoType(), SIGNAL(autotypeRetypeTimeout()), SLOT(relockPendingDatabase()));
connect(autoType(), SIGNAL(autotypeRejected()), SLOT(relockPendingDatabase()));
connect(m_databaseOpenDialog.data(), &DatabaseOpenDialog::dialogFinished,
this, &DatabaseTabWidget::handleDatabaseUnlockDialogFinished);