diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-24 02:06:20 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-24 02:06:20 +0100 |
commit | 21552196c529cdc4e7112d2f09a80ab81c71207a (patch) | |
tree | 5bc9fe9f55da0775384b2449f7ee543cbe7afed2 /src/forms | |
parent | Download manager (diff) | |
download | smolbote-21552196c529cdc4e7112d2f09a80ab81c71207a.tar.xz |
Settings class rework
Using toml as format
Diffstat (limited to 'src/forms')
-rw-r--r-- | src/forms/blockerdialog.cpp | 5 | ||||
-rw-r--r-- | src/forms/downloaddialog.cpp | 6 |
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 |