mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Make group autotype setting editable via GUI.
This commit is contained in:
parent
dd82c9f8f9
commit
1558dd8309
@ -42,6 +42,9 @@ EditGroupWidget::EditGroupWidget(QWidget* parent)
|
|||||||
m_mainUi->searchComboBox->addItem("Inherit");
|
m_mainUi->searchComboBox->addItem("Inherit");
|
||||||
m_mainUi->searchComboBox->addItem("Enable");
|
m_mainUi->searchComboBox->addItem("Enable");
|
||||||
m_mainUi->searchComboBox->addItem("Disable");
|
m_mainUi->searchComboBox->addItem("Disable");
|
||||||
|
m_mainUi->autotypeComboBox->addItem("Inherit");
|
||||||
|
m_mainUi->autotypeComboBox->addItem("Enable");
|
||||||
|
m_mainUi->autotypeComboBox->addItem("Disable");
|
||||||
|
|
||||||
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
|
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
@ -90,6 +93,19 @@ void EditGroupWidget::loadGroup(Group* group, bool create, Database* database)
|
|||||||
default:
|
default:
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
}
|
}
|
||||||
|
switch (group->autoTypeEnabled()) {
|
||||||
|
case Group::Inherit:
|
||||||
|
m_mainUi->autotypeComboBox->setCurrentIndex(0);
|
||||||
|
break;
|
||||||
|
case Group::Enable:
|
||||||
|
m_mainUi->autotypeComboBox->setCurrentIndex(1);
|
||||||
|
break;
|
||||||
|
case Group::Disable:
|
||||||
|
m_mainUi->autotypeComboBox->setCurrentIndex(2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Q_ASSERT(false);
|
||||||
|
}
|
||||||
|
|
||||||
IconStruct iconStruct;
|
IconStruct iconStruct;
|
||||||
iconStruct.uuid = group->iconUuid();
|
iconStruct.uuid = group->iconUuid();
|
||||||
@ -120,6 +136,19 @@ void EditGroupWidget::save()
|
|||||||
default:
|
default:
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
}
|
}
|
||||||
|
switch (m_mainUi->autotypeComboBox->currentIndex()) {
|
||||||
|
case 0:
|
||||||
|
m_group->setAutoTypeEnabled(Group::Inherit);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
m_group->setAutoTypeEnabled(Group::Enable);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
m_group->setAutoTypeEnabled(Group::Disable);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Q_ASSERT(false);
|
||||||
|
}
|
||||||
|
|
||||||
IconStruct iconStruct = m_editGroupWidgetIcons->save();
|
IconStruct iconStruct = m_editGroupWidgetIcons->save();
|
||||||
|
|
||||||
|
@ -63,6 +63,16 @@
|
|||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QComboBox" name="searchComboBox"/>
|
<widget class="QComboBox" name="searchComboBox"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="autotypeLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Autotype</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="autotypeComboBox"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user