diff --git a/src/core/SettingsManager.cpp b/src/core/SettingsManager.cpp index f94266306a..725514f9cf 100644 --- a/src/core/SettingsManager.cpp +++ b/src/core/SettingsManager.cpp @@ -78,7 +78,6 @@ void SettingsManager::createInstance(const QString &path, QObject *parent) registerOption(Backends_PasswordsOption, QLatin1String("file"), EnumerationType, QStringList(QLatin1String("file"))); registerOption(Backends_WebOption, QLatin1String("qtwebkit"), EnumerationType, QStringList(QLatin1String("qtwebkit"))); registerOption(Browser_AlwaysAskWhereToSaveDownloadOption, true, BooleanType); - registerOption(Browser_AskToSavePasswordOption, true, BooleanType); registerOption(Browser_DelayRestoringOfBackgroundTabsOption, false, BooleanType); registerOption(Browser_EnableFullScreenOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")})); registerOption(Browser_EnableGeolocationOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")})); @@ -93,7 +92,6 @@ void SettingsManager::createInstance(const QString &path, QObject *parent) registerOption(Browser_EnableNotificationsOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")})); registerOption(Browser_EnableOfflineStorageDatabaseOption, false, BooleanType); registerOption(Browser_EnableOfflineWebApplicationCacheOption, false, BooleanType); - registerOption(Browser_EnablePasswordsManagerOption, true, BooleanType); registerOption(Browser_EnablePluginsOption, QLatin1String("onDemand"), EnumerationType, QStringList({QLatin1String("enabled"), QLatin1String("onDemand"), QLatin1String("disabled")})); registerOption(Browser_EnablePointerLockOption, QLatin1String("ask"), EnumerationType, QStringList({QLatin1String("ask"), QLatin1String("allow"), QLatin1String("disallow")})); registerOption(Browser_EnableSingleKeyShortcutsOption, true, BooleanType); @@ -114,6 +112,7 @@ void SettingsManager::createInstance(const QString &path, QObject *parent) registerOption(Browser_OfflineWebApplicationCacheLimitOption, 10240, IntegerType); registerOption(Browser_OpenLinksInNewTabOption, true, BooleanType); registerOption(Browser_PrivateModeOption, false, BooleanType); + registerOption(Browser_RememberPasswordsOption, false, BooleanType); registerOption(Browser_ReuseCurrentTabOption, false, BooleanType); registerOption(Browser_ShowSelectionContextMenuOnDoubleClickOption, false, BooleanType); registerOption(Browser_SpellCheckDictionaryOption, QString(), StringType); diff --git a/src/core/SettingsManager.h b/src/core/SettingsManager.h index d7be28ad18..0364f2ead8 100644 --- a/src/core/SettingsManager.h +++ b/src/core/SettingsManager.h @@ -58,7 +58,6 @@ class SettingsManager : public QObject Backends_PasswordsOption, Backends_WebOption, Browser_AlwaysAskWhereToSaveDownloadOption, - Browser_AskToSavePasswordOption, Browser_DelayRestoringOfBackgroundTabsOption, Browser_EnableFullScreenOption, Browser_EnableGeolocationOption, @@ -73,7 +72,6 @@ class SettingsManager : public QObject Browser_EnableNotificationsOption, Browser_EnableOfflineStorageDatabaseOption, Browser_EnableOfflineWebApplicationCacheOption, - Browser_EnablePasswordsManagerOption, Browser_EnablePluginsOption, Browser_EnablePointerLockOption, Browser_EnableSingleKeyShortcutsOption, @@ -94,6 +92,7 @@ class SettingsManager : public QObject Browser_OfflineWebApplicationCacheLimitOption, Browser_OpenLinksInNewTabOption, Browser_PrivateModeOption, + Browser_RememberPasswordsOption, Browser_ReuseCurrentTabOption, Browser_ShowSelectionContextMenuOnDoubleClickOption, Browser_SpellCheckDictionaryOption, diff --git a/src/modules/backends/web/qtwebkit/QtWebKitWebWidget.cpp b/src/modules/backends/web/qtwebkit/QtWebKitWebWidget.cpp index 0f723875db..f6e453f55d 100644 --- a/src/modules/backends/web/qtwebkit/QtWebKitWebWidget.cpp +++ b/src/modules/backends/web/qtwebkit/QtWebKitWebWidget.cpp @@ -370,7 +370,7 @@ void QtWebKitWebWidget::pageLoadFinished() } } - if (!SettingsManager::getValue(SettingsManager::Browser_EnablePasswordsManagerOption).toBool() || !SettingsManager::getValue(SettingsManager::Browser_AskToSavePasswordOption).toBool()) + if (!SettingsManager::getValue(SettingsManager::Browser_RememberPasswordsOption).toBool()) { return; } diff --git a/src/ui/preferences/PreferencesPrivacyPageWidget.cpp b/src/ui/preferences/PreferencesPrivacyPageWidget.cpp index a6c404fe33..38266bda25 100644 --- a/src/ui/preferences/PreferencesPrivacyPageWidget.cpp +++ b/src/ui/preferences/PreferencesPrivacyPageWidget.cpp @@ -20,6 +20,7 @@ #include "PreferencesPrivacyPageWidget.h" #include "CookiesExceptionsDialog.h" #include "../ClearHistoryDialog.h" +#include "../../core/ActionsManager.h" #include "../../core/SettingsManager.h" #include "ui_PreferencesPrivacyPageWidget.h" @@ -73,11 +74,14 @@ PreferencesPrivacyPageWidget::PreferencesPrivacyPageWidget(QWidget *parent) : QW m_ui->clearHistoryCheckBox->setChecked(!m_clearHisorySettings.isEmpty()); m_ui->clearHistoryButton->setEnabled(!m_clearHisorySettings.isEmpty()); + m_ui->rememberPasswordsCheckBox->setChecked(SettingsManager::getValue(SettingsManager::Browser_RememberPasswordsOption).toBool()); + connect(m_ui->privateModeCheckBox, SIGNAL(toggled(bool)), m_ui->historyWidget, SLOT(setDisabled(bool))); connect(m_ui->enableCookiesCheckBox, SIGNAL(toggled(bool)), m_ui->cookiesWidget, SLOT(setEnabled(bool))); connect(m_ui->thirdPartyCookiesExceptionsButton, SIGNAL(clicked(bool)), this, SLOT(setupThirdPartyCookiesExceptions())); connect(m_ui->clearHistoryCheckBox, SIGNAL(toggled(bool)), m_ui->clearHistoryButton, SLOT(setEnabled(bool))); connect(m_ui->clearHistoryButton, SIGNAL(clicked()), this, SLOT(setupClearHistory())); + connect(m_ui->managePasswordsButton, SIGNAL(clicked()), this, SLOT(viewPasswords())); } PreferencesPrivacyPageWidget::~PreferencesPrivacyPageWidget() @@ -123,6 +127,11 @@ void PreferencesPrivacyPageWidget::setupClearHistory() m_ui->clearHistoryButton->setEnabled(!m_clearHisorySettings.isEmpty()); } +void PreferencesPrivacyPageWidget::viewPasswords() +{ + ActionsManager::triggerAction(ActionsManager::PasswordsAction, this); +} + void PreferencesPrivacyPageWidget::save() { SettingsManager::setValue(SettingsManager::Network_DoNotTrackPolicyOption, m_ui->doNotTrackComboBox->currentData().toString()); @@ -135,6 +144,7 @@ void PreferencesPrivacyPageWidget::save() SettingsManager::setValue(SettingsManager::Network_ThirdPartyCookiesAcceptedHostsOption, m_thirdPartyCookiesAcceptedHosts); SettingsManager::setValue(SettingsManager::Network_ThirdPartyCookiesRejectedHostsOption, m_thirdPartyCookiesRejectedHosts); SettingsManager::setValue(SettingsManager::History_ClearOnCloseOption, (m_ui->clearHistoryCheckBox->isChecked() ? m_clearHisorySettings : QStringList())); + SettingsManager::setValue(SettingsManager::Browser_RememberPasswordsOption, m_ui->rememberPasswordsCheckBox->isChecked()); } } diff --git a/src/ui/preferences/PreferencesPrivacyPageWidget.h b/src/ui/preferences/PreferencesPrivacyPageWidget.h index 0db2647912..b7990cd7ea 100644 --- a/src/ui/preferences/PreferencesPrivacyPageWidget.h +++ b/src/ui/preferences/PreferencesPrivacyPageWidget.h @@ -44,6 +44,7 @@ class PreferencesPrivacyPageWidget : public QWidget protected slots: void setupThirdPartyCookiesExceptions(); void setupClearHistory(); + void viewPasswords(); void save(); private: diff --git a/src/ui/preferences/PreferencesPrivacyPageWidget.ui b/src/ui/preferences/PreferencesPrivacyPageWidget.ui index 6532881a7d..77eb549abe 100644 --- a/src/ui/preferences/PreferencesPrivacyPageWidget.ui +++ b/src/ui/preferences/PreferencesPrivacyPageWidget.ui @@ -324,9 +324,6 @@ - - false - Remember passwords @@ -346,10 +343,7 @@ - - - false - + Manageā€¦