mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Preferences: Load autofill page on-demand
Don't ask for master password when preferences dialog is opened. Only ask for it when user actually enters autofill page.
This commit is contained in:
parent
b05ddc12db
commit
371250ff15
|
@ -60,15 +60,15 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
|||
: QDialog(parent)
|
||||
, ui(new Ui::Preferences)
|
||||
, p_QupZilla(mainClass)
|
||||
, m_autoFillManager(0)
|
||||
, m_pluginsList(0)
|
||||
, m_autoFillEnabled(false)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
ui->setupUi(this);
|
||||
ui->languages->setLayoutDirection(Qt::LeftToRight);
|
||||
|
||||
m_themesManager = new ThemeManager(ui->themesWidget, this);
|
||||
m_autoFillManager = new AutoFillManager(this);
|
||||
ui->autoFillFrame->addWidget(m_autoFillManager);
|
||||
m_pluginsList = new PluginsManager(this);
|
||||
ui->pluginsFrame->addWidget(m_pluginsList);
|
||||
|
||||
|
@ -497,9 +497,16 @@ void Preferences::showStackedPage(QListWidgetItem* item)
|
|||
ui->stackedWidget->setCurrentIndex(index);
|
||||
|
||||
setNotificationPreviewVisible(index == 9);
|
||||
|
||||
if (index == 10) {
|
||||
m_pluginsList->load();
|
||||
}
|
||||
|
||||
if (index == 7 && !m_autoFillManager) {
|
||||
m_autoFillManager = new AutoFillManager(this);
|
||||
ui->autoFillFrame->addWidget(m_autoFillManager);
|
||||
m_autoFillManager->setVisible(m_autoFillEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::setNotificationPreviewVisible(bool state)
|
||||
|
@ -730,8 +737,13 @@ void Preferences::reloadPacFileClicked()
|
|||
|
||||
void Preferences::showPassManager(bool state)
|
||||
{
|
||||
if (m_autoFillManager) {
|
||||
m_autoFillManager->setVisible(state);
|
||||
}
|
||||
else {
|
||||
m_autoFillEnabled = state;
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::buttonClicked(QAbstractButton* button)
|
||||
{
|
||||
|
|
|
@ -109,6 +109,7 @@ private:
|
|||
int m_afterLaunch;
|
||||
int m_onNewTab;
|
||||
QPoint m_notifPosition;
|
||||
bool m_autoFillEnabled;
|
||||
};
|
||||
|
||||
#endif // PREFERENCES_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user