mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 23:39:45 -05:00
parent
4dcd41975d
commit
c701e8ec73
@ -89,6 +89,10 @@ AutoTypeSelectDialog::AutoTypeSelectDialog(QWidget* parent)
|
|||||||
connect(m_ui->action, &QToolButton::clicked, this, &AutoTypeSelectDialog::activateCurrentMatch);
|
connect(m_ui->action, &QToolButton::clicked, this, &AutoTypeSelectDialog::activateCurrentMatch);
|
||||||
|
|
||||||
connect(m_ui->cancelButton, SIGNAL(clicked()), SLOT(reject()));
|
connect(m_ui->cancelButton, SIGNAL(clicked()), SLOT(reject()));
|
||||||
|
|
||||||
|
auto sortColumn = config()->get(Config::AutoTypeDialogSortColumn).toInt();
|
||||||
|
auto sortOrder = static_cast<Qt::SortOrder> (config()->get(Config::AutoTypeDialogSortOrder).toInt());
|
||||||
|
m_ui->view->sortByColumn(sortColumn, sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Required for QScopedPointer
|
// Required for QScopedPointer
|
||||||
@ -401,6 +405,8 @@ void AutoTypeSelectDialog::showEvent(QShowEvent* event)
|
|||||||
void AutoTypeSelectDialog::hideEvent(QHideEvent* event)
|
void AutoTypeSelectDialog::hideEvent(QHideEvent* event)
|
||||||
{
|
{
|
||||||
config()->set(Config::GUI_AutoTypeSelectDialogSize, size());
|
config()->set(Config::GUI_AutoTypeSelectDialogSize, size());
|
||||||
|
config()->set(Config::AutoTypeDialogSortColumn, m_ui->view->horizontalHeader()->sortIndicatorSection());
|
||||||
|
config()->set(Config::AutoTypeDialogSortOrder, m_ui->view->horizontalHeader()->sortIndicatorOrder());
|
||||||
if (!m_accepted) {
|
if (!m_accepted) {
|
||||||
emit rejected();
|
emit rejected();
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,11 @@ struct ConfigDirective
|
|||||||
QVariant defaultValue;
|
QVariant defaultValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum DialogSortOrder {
|
||||||
|
SORT_ORDER_ASCENDING,
|
||||||
|
SORT_ORDER_DESCENDING
|
||||||
|
};
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,6 +81,8 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||||||
{Config::AutoTypeDelay,{QS("AutoTypeDelay"), Roaming, 25}},
|
{Config::AutoTypeDelay,{QS("AutoTypeDelay"), Roaming, 25}},
|
||||||
{Config::AutoTypeStartDelay,{QS("AutoTypeStartDelay"), Roaming, 500}},
|
{Config::AutoTypeStartDelay,{QS("AutoTypeStartDelay"), Roaming, 500}},
|
||||||
{Config::AutoTypeHideExpiredEntry,{QS("AutoTypeHideExpiredEntry"), Roaming, false}},
|
{Config::AutoTypeHideExpiredEntry,{QS("AutoTypeHideExpiredEntry"), Roaming, false}},
|
||||||
|
{Config::AutoTypeDialogSortColumn,{QS("AutoTypeDialogSortColumn"), Roaming, 0}},
|
||||||
|
{Config::AutoTypeDialogSortOrder,{QS("AutoTypeDialogSortOrder"), Roaming, SORT_ORDER_ASCENDING}},
|
||||||
{Config::GlobalAutoTypeKey,{QS("GlobalAutoTypeKey"), Roaming, 0}},
|
{Config::GlobalAutoTypeKey,{QS("GlobalAutoTypeKey"), Roaming, 0}},
|
||||||
{Config::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
|
{Config::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
|
||||||
{Config::GlobalAutoTypeRetypeTime,{QS("GlobalAutoTypeRetypeTime"), Roaming, 15}},
|
{Config::GlobalAutoTypeRetypeTime,{QS("GlobalAutoTypeRetypeTime"), Roaming, 15}},
|
||||||
|
@ -58,6 +58,8 @@ public:
|
|||||||
AutoTypeDelay,
|
AutoTypeDelay,
|
||||||
AutoTypeStartDelay,
|
AutoTypeStartDelay,
|
||||||
AutoTypeHideExpiredEntry,
|
AutoTypeHideExpiredEntry,
|
||||||
|
AutoTypeDialogSortColumn,
|
||||||
|
AutoTypeDialogSortOrder,
|
||||||
GlobalAutoTypeKey,
|
GlobalAutoTypeKey,
|
||||||
GlobalAutoTypeModifiers,
|
GlobalAutoTypeModifiers,
|
||||||
GlobalAutoTypeRetypeTime,
|
GlobalAutoTypeRetypeTime,
|
||||||
|
Loading…
Reference in New Issue
Block a user