mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-24 06:49:46 -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->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
|
||||
@ -401,6 +405,8 @@ void AutoTypeSelectDialog::showEvent(QShowEvent* event)
|
||||
void AutoTypeSelectDialog::hideEvent(QHideEvent* event)
|
||||
{
|
||||
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) {
|
||||
emit rejected();
|
||||
}
|
||||
|
@ -44,6 +44,11 @@ struct ConfigDirective
|
||||
QVariant defaultValue;
|
||||
};
|
||||
|
||||
enum DialogSortOrder {
|
||||
SORT_ORDER_ASCENDING,
|
||||
SORT_ORDER_DESCENDING
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
|
||||
/**
|
||||
@ -76,6 +81,8 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::AutoTypeDelay,{QS("AutoTypeDelay"), Roaming, 25}},
|
||||
{Config::AutoTypeStartDelay,{QS("AutoTypeStartDelay"), Roaming, 500}},
|
||||
{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::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
|
||||
{Config::GlobalAutoTypeRetypeTime,{QS("GlobalAutoTypeRetypeTime"), Roaming, 15}},
|
||||
|
@ -58,6 +58,8 @@ public:
|
||||
AutoTypeDelay,
|
||||
AutoTypeStartDelay,
|
||||
AutoTypeHideExpiredEntry,
|
||||
AutoTypeDialogSortColumn,
|
||||
AutoTypeDialogSortOrder,
|
||||
GlobalAutoTypeKey,
|
||||
GlobalAutoTypeModifiers,
|
||||
GlobalAutoTypeRetypeTime,
|
||||
|
Loading…
Reference in New Issue
Block a user