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)
|
: QDialog(parent)
|
||||||
, ui(new Ui::Preferences)
|
, ui(new Ui::Preferences)
|
||||||
, p_QupZilla(mainClass)
|
, p_QupZilla(mainClass)
|
||||||
|
, m_autoFillManager(0)
|
||||||
, m_pluginsList(0)
|
, m_pluginsList(0)
|
||||||
|
, m_autoFillEnabled(false)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->languages->setLayoutDirection(Qt::LeftToRight);
|
ui->languages->setLayoutDirection(Qt::LeftToRight);
|
||||||
|
|
||||||
m_themesManager = new ThemeManager(ui->themesWidget, this);
|
m_themesManager = new ThemeManager(ui->themesWidget, this);
|
||||||
m_autoFillManager = new AutoFillManager(this);
|
|
||||||
ui->autoFillFrame->addWidget(m_autoFillManager);
|
|
||||||
m_pluginsList = new PluginsManager(this);
|
m_pluginsList = new PluginsManager(this);
|
||||||
ui->pluginsFrame->addWidget(m_pluginsList);
|
ui->pluginsFrame->addWidget(m_pluginsList);
|
||||||
|
|
||||||
|
@ -497,9 +497,16 @@ void Preferences::showStackedPage(QListWidgetItem* item)
|
||||||
ui->stackedWidget->setCurrentIndex(index);
|
ui->stackedWidget->setCurrentIndex(index);
|
||||||
|
|
||||||
setNotificationPreviewVisible(index == 9);
|
setNotificationPreviewVisible(index == 9);
|
||||||
|
|
||||||
if (index == 10) {
|
if (index == 10) {
|
||||||
m_pluginsList->load();
|
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)
|
void Preferences::setNotificationPreviewVisible(bool state)
|
||||||
|
@ -730,7 +737,12 @@ void Preferences::reloadPacFileClicked()
|
||||||
|
|
||||||
void Preferences::showPassManager(bool state)
|
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)
|
void Preferences::buttonClicked(QAbstractButton* button)
|
||||||
|
|
|
@ -109,6 +109,7 @@ private:
|
||||||
int m_afterLaunch;
|
int m_afterLaunch;
|
||||||
int m_onNewTab;
|
int m_onNewTab;
|
||||||
QPoint m_notifPosition;
|
QPoint m_notifPosition;
|
||||||
|
bool m_autoFillEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PREFERENCES_H
|
#endif // PREFERENCES_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user