1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02: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:
nowrep 2013-07-14 22:29:47 +02:00
parent b05ddc12db
commit 371250ff15
2 changed files with 16 additions and 3 deletions

View File

@ -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,7 +737,12 @@ void Preferences::reloadPacFileClicked()
void Preferences::showPassManager(bool state)
{
m_autoFillManager->setVisible(state);
if (m_autoFillManager) {
m_autoFillManager->setVisible(state);
}
else {
m_autoFillEnabled = state;
}
}
void Preferences::buttonClicked(QAbstractButton* button)

View File

@ -109,6 +109,7 @@ private:
int m_afterLaunch;
int m_onNewTab;
QPoint m_notifPosition;
bool m_autoFillEnabled;
};
#endif // PREFERENCES_H