aboutsummaryrefslogtreecommitdiff
path: root/src/forms
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-02-24 02:06:20 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-02-24 02:06:20 +0100
commit21552196c529cdc4e7112d2f09a80ab81c71207a (patch)
tree5bc9fe9f55da0775384b2449f7ee543cbe7afed2 /src/forms
parentDownload manager (diff)
downloadsmolbote-21552196c529cdc4e7112d2f09a80ab81c71207a.tar.xz
Settings class rework
Using toml as format
Diffstat (limited to 'src/forms')
-rw-r--r--src/forms/blockerdialog.cpp5
-rw-r--r--src/forms/downloaddialog.cpp6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/forms/blockerdialog.cpp b/src/forms/blockerdialog.cpp
index fa613bd..9c6bd0a 100644
--- a/src/forms/blockerdialog.cpp
+++ b/src/forms/blockerdialog.cpp
@@ -21,7 +21,7 @@
#include "blockerdialog.h"
#include "ui_blockerdialog.h"
-#include "settings.h"
+#include "browser.h"
#include <QLabel>
#include <QListWidget>
@@ -29,11 +29,10 @@ BlockerDialog::BlockerDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::UrlInterceptorDialog)
{
- Settings settings;
ui->setupUi(this);
m_subscription = new BlockerSubscription(this);
- QString sublocation = settings.value("blocker/subscription").toString();
+ QString sublocation = sSettings->value("blocker.path").toString();
if(!sublocation.isEmpty()) {
m_subscription->loadFromFile(sublocation);
}
diff --git a/src/forms/downloaddialog.cpp b/src/forms/downloaddialog.cpp
index 950fa96..d182076 100644
--- a/src/forms/downloaddialog.cpp
+++ b/src/forms/downloaddialog.cpp
@@ -27,7 +27,7 @@
#include <QListWidget>
#include <QLabel>
#include "webengine/downloaditemform.h"
-#include "settings.h"
+#include "browser.h"
DownloadDialog::DownloadDialog(QWidget *parent) :
QDialog(parent),
@@ -46,9 +46,7 @@ DownloadDialog::~DownloadDialog()
void DownloadDialog::addDownload(QWebEngineDownloadItem *item)
{
- Settings settings;
-
- QString filepath = QFileDialog::getSaveFileName(this, tr("Save"), settings.value("downloads/path").toString() + "/" + QFileInfo(item->path()).fileName());
+ QString filepath = QFileDialog::getSaveFileName(this, tr("Save"), sSettings->value("downloads.path").toString() + "/" + QFileInfo(item->path()).fileName());
if(filepath.isEmpty()) {
// user cancelled the save dialog