1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Fixed Save Passwords saving in Preferences

This option is now properly saved.
Also updated Slovakia translation of desktop launcher.
This commit is contained in:
nowrep 2011-11-02 12:52:55 +01:00
parent b28e037ad1
commit c3971c2672
5 changed files with 44 additions and 36 deletions

View File

@ -14,8 +14,8 @@ or edit CA Certificates database with SSL Manager.
QupZilla's main aim is to be very fast and very stable QtWebKit browser available to everyone.
There is already a lot of QtWebKit browsers available, but they are either bound to KDE
environment (rekonq), not actively developped (Arora) or very unstable and missing important
features, but there is missing multiplatform, modern and actively developped browser. QupZilla
environment (rekonq), not actively developed or very unstable and missing important
features. But there is missing multiplatform, modern and actively developped browser. QupZilla
is trying to fill this gap by providing very stable browsing experience.
History

View File

@ -3,7 +3,7 @@ Encoding=UTF-8
Name=QupZilla
Comment=A fast and secure web browser
Comment[cs]=Rychlý a bezpečný webový prohlížeč
Comment[sk]=Rychlý a bezpečný webový prehliadač
Comment[sk]=Rýchly a bezpečný webový prehliadač
Comment[de]=Ein schneller und sicherer Web Browser
Comment[nl]=Een snelle en veilige webbrowser
GenericName=Web Browser

View File

@ -33,12 +33,15 @@ void AutoFillModel::loadSettings()
{
QSettings settings(mApp->getActiveProfilPath()+"settings.ini", QSettings::IniFormat);
settings.beginGroup("Web-Browser-Settings");
m_isStoring = settings.value("AutoFillForms",true).toBool();
m_isStoring = settings.value("SavePasswordsOnSites", true).toBool();
settings.endGroup();
}
bool AutoFillModel::isStored(const QUrl &url)
{
if (!isStoringEnabled(url))
return false;
QString server = url.host();
QSqlQuery query;
query.exec("SELECT count(id) FROM autofill WHERE server='"+server+"'");
@ -52,6 +55,7 @@ bool AutoFillModel::isStoringEnabled(const QUrl &url)
{
if (!m_isStoring)
return false;
QString server = url.host();
QSqlQuery query;
query.exec("SELECT count(id) FROM autofill_exceptions WHERE server='"+server+"'");

View File

@ -38,6 +38,7 @@
#include "thememanager.h"
#include "acceptlanguage.h"
#include "globalfunctions.h"
#include "autofillmodel.h"
bool removeFile(const QString &fullFileName)
{
@ -67,15 +68,14 @@ void removeDir(const QString &d)
}
}
Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
QDialog(parent)
,ui(new Ui::Preferences)
,p_QupZilla(mainClass)
,m_pluginsList(0)
Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
: QDialog(parent)
, ui(new Ui::Preferences)
, p_QupZilla(mainClass)
, m_pluginsList(0)
{
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this);
m_bgLabelSize = this->sizeHint();
QSettings settings(mApp->getActiveProfilPath()+"settings.ini", QSettings::IniFormat);
//GENERAL URLs
@ -145,18 +145,18 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
settings.endGroup();
//AddressBar
settings.beginGroup("AddressBar");
ui->selectAllOnFocus->setChecked( settings.value("SelectAllTextOnDoubleClick",true).toBool() );
ui->addComWithCtrl->setChecked( settings.value("AddComDomainWithCtrlKey",false).toBool() );
ui->addCountryWithAlt->setChecked( settings.value("AddCountryDomainWithAltKey",true).toBool() );
ui->selectAllOnFocus->setChecked( settings.value("SelectAllTextOnDoubleClick", true).toBool() );
ui->addComWithCtrl->setChecked( settings.value("AddComDomainWithCtrlKey", false).toBool() );
ui->addCountryWithAlt->setChecked( settings.value("AddCountryDomainWithAltKey", true).toBool() );
settings.endGroup();
//BROWSING
settings.beginGroup("Web-Browser-Settings");
ui->allowPlugins->setChecked( settings.value("allowFlash",true).toBool() );
ui->allowJavaScript->setChecked( settings.value("allowJavaScript",true).toBool() );
ui->allowPlugins->setChecked( settings.value("allowFlash", true).toBool() );
ui->allowJavaScript->setChecked( settings.value("allowJavaScript", true).toBool() );
ui->blockPopup->setChecked( !settings.value("allowJavaScriptOpenWindow", false).toBool() );
ui->allowJava->setChecked( settings.value("allowJava",true).toBool() );
ui->loadImages->setChecked( settings.value("autoLoadImages",true).toBool() );
ui->allowJava->setChecked( settings.value("allowJava", true).toBool() );
ui->loadImages->setChecked( settings.value("autoLoadImages", true).toBool() );
ui->allowDNSPrefetch->setChecked( settings.value("DNS-Prefetch", false).toBool() );
ui->jscanAccessClipboard->setChecked( settings.value("JavaScriptCanAccessClipboard", true).toBool() );
ui->linksInFocusChain->setChecked( settings.value("IncludeLinkInFocusChain", false).toBool() );
@ -174,7 +174,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
connect(ui->pagesInCache, SIGNAL(valueChanged(int)), this, SLOT(pageCacheValueChanged(int)));
ui->pageCacheLabel->setText(QString::number(ui->pagesInCache->value()));
ui->allowCache->setChecked( settings.value("AllowLocalCache",true).toBool() );
ui->allowCache->setChecked( settings.value("AllowLocalCache", true).toBool() );
ui->cacheMB->setValue( settings.value("LocalCacheSize", 50).toInt() );
ui->MBlabel->setText( settings.value("LocalCacheSize", 50).toString() + " MB");
connect(ui->allowCache, SIGNAL(clicked(bool)), this, SLOT(allowCacheChanged(bool)));
@ -182,28 +182,29 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
allowCacheChanged(ui->allowCache->isChecked());
//PASSWORD MANAGER
ui->allowPassManager->setChecked(settings.value("AutoFillForms",true).toBool());
ui->allowPassManager->setChecked(settings.value("SavePasswordsOnSites", true).toBool());
connect(ui->allowPassManager, SIGNAL(toggled(bool)), this, SLOT(showPassManager(bool)));
m_autoFillManager = new AutoFillManager(this);
ui->autoFillFrame->addWidget(m_autoFillManager);
showPassManager(ui->allowPassManager->isChecked());
//PRIVACY
//Web storage
ui->storeIcons->setChecked( settings.value("allowPersistentStorage",true).toBool() );
ui->storeIcons->setChecked( settings.value("allowPersistentStorage", true).toBool() );
ui->saveHistory->setChecked( mApp->history()->isSaving() );
ui->deleteHistoryOnClose->setChecked( settings.value("deleteHistoryOnClose",false).toBool() );
ui->deleteHistoryOnClose->setChecked( settings.value("deleteHistoryOnClose", false).toBool() );
if (!ui->saveHistory->isChecked())
ui->deleteHistoryOnClose->setEnabled(false);
connect(ui->saveHistory, SIGNAL(toggled(bool)), this, SLOT(saveHistoryChanged(bool)));
//Cookies
ui->saveCookies->setChecked( settings.value("allowCookies",true).toBool() );
ui->saveCookies->setChecked( settings.value("allowCookies", true).toBool() );
if (!ui->saveCookies->isChecked())
ui->deleteCookiesOnClose->setEnabled(false);
connect(ui->saveCookies, SIGNAL(toggled(bool)), this, SLOT(saveCookiesChanged(bool)));
ui->deleteCookiesOnClose->setChecked( settings.value("deleteCookiesOnClose", false).toBool() );
ui->matchExactly->setChecked( settings.value("allowCookiesFromVisitedDomainOnly",false).toBool() );
ui->filterTracking->setChecked( settings.value("filterTrackingCookie",false).toBool() );
ui->matchExactly->setChecked( settings.value("allowCookiesFromVisitedDomainOnly", false).toBool() );
ui->filterTracking->setChecked( settings.value("filterTrackingCookie", false).toBool() );
//CSS Style
ui->userStyleSheet->setText( settings.value("userStyleSheet", "").toString() );
@ -566,7 +567,6 @@ void Preferences::saveSettings()
settings.setValue("showHomeButton", ui->showHome->isChecked());
settings.setValue("showBackForwardButtons",ui->showBackForward->isChecked());
settings.setValue("useTransparentBackground", ui->useTransparentBg->isChecked());
settings.setValue("menuTextColor", m_menuTextColor);
settings.setValue("showAddTabButton", ui->showAddTabButton->isChecked());
settings.endGroup();
@ -596,18 +596,18 @@ void Preferences::saveSettings()
settings.setValue("FixedFont", ui->fontFixed->currentFont().family());
settings.setValue("SansSerifFont", ui->fontSansSerif->currentFont().family());
settings.setValue("SerifFont", ui->fontSerif->currentFont().family());
settings.setValue("DefaultFontSize", ui->sizeDefault->value());
settings.setValue("FixedFontSize", ui->sizeFixed->value());
settings.endGroup();
//BROWSING
settings.beginGroup("Web-Browser-Settings");
settings.setValue("allowFlash",ui->allowPlugins->isChecked());
settings.setValue("allowJavaScript",ui->allowJavaScript->isChecked());
settings.setValue("allowFlash", ui->allowPlugins->isChecked());
settings.setValue("allowJavaScript", ui->allowJavaScript->isChecked());
settings.setValue("allowJavaScriptOpenWindow", !ui->blockPopup->isChecked());
settings.setValue("allowJava",ui->allowJava->isChecked());
settings.setValue("autoLoadImages",ui->loadImages->isChecked());
settings.setValue("maximumCachedPages",ui->pagesInCache->value());
settings.setValue("allowJava", ui->allowJava->isChecked());
settings.setValue("autoLoadImages", ui->loadImages->isChecked());
settings.setValue("DNS-Prefetch", ui->allowDNSPrefetch->isChecked());
settings.setValue("JavaScriptCanAccessClipboard", ui->jscanAccessClipboard->isChecked());
settings.setValue("IncludeLinkInFocusChain", ui->linksInFocusChain->isChecked());
@ -618,22 +618,25 @@ void Preferences::saveSettings()
settings.setValue("CheckUpdates", ui->checkUpdates->isChecked());
settings.setValue("DefaultZoom", ui->defaultZoom->value());
//Cache
settings.setValue("maximumCachedPages", ui->pagesInCache->value());
settings.setValue("AllowLocalCache", ui->allowCache->isChecked());
settings.setValue("LocalCacheSize", ui->cacheMB->value());
//CSS Style
settings.setValue("userStyleSheet", ui->userStyleSheet->text());
//PASSWORD MANAGER
settings.setValue("SavePasswordsOnSites", ui->allowPassManager->isChecked());
//PRIVACY
//Web storage
settings.setValue("allowPersistentStorage", ui->storeIcons->isChecked());
//ui->saveHistory->setChecked( p_QupZilla->history->isSaving() );
settings.setValue("deleteHistoryOnClose",ui->deleteHistoryOnClose->isChecked());
//Cookies
settings.setValue("allowCookies",ui->saveCookies->isChecked());
settings.setValue("allowCookies", ui->saveCookies->isChecked());
settings.setValue("deleteCookiesOnClose", ui->deleteCookiesOnClose->isChecked());
settings.setValue("allowCookiesFromVisitedDomainOnly",ui->matchExactly->isChecked() );
settings.setValue("filterTrackingCookie",ui->filterTracking->isChecked() );
settings.setValue("allowCookiesFromVisitedDomainOnly", ui->matchExactly->isChecked() );
settings.setValue("filterTrackingCookie", ui->filterTracking->isChecked() );
settings.endGroup();
//NOTIFICATIONS
@ -651,10 +654,12 @@ void Preferences::saveSettings()
settings.setValue("AddComDomainWithCtrlKey",ui->addComWithCtrl->isChecked() );
settings.setValue("AddCountryDomainWithAltKey", ui->addCountryWithAlt->isChecked() );
settings.endGroup();
//Languages
settings.beginGroup("Language");
settings.setValue("language",ui->languages->itemData(ui->languages->currentIndex()).toString());
settings.endGroup();
//Proxy Configuration
NetworkProxyFactory::ProxyPreference proxyPreference;
if (ui->systemProxy->isChecked())
@ -694,6 +699,7 @@ void Preferences::saveSettings()
mApp->plugins()->c2f_saveSettings();
mApp->networkManager()->loadSettings();
mApp->desktopNotifications()->loadSettings();
mApp->autoFill()->loadSettings();
}
Preferences::~Preferences()

View File

@ -78,13 +78,11 @@ private:
ThemeManager* m_themesManager;
QPointer<DesktopNotification> m_notification;
QColor m_menuTextColor;
QString m_homepage;
QString m_newTabUrl;
QString m_actProfileName;
int m_afterLaunch;
int m_onNewTab;
QSize m_bgLabelSize;
QPoint m_notifPosition;
};