aboutsummaryrefslogtreecommitdiff
path: root/src/forms
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-09-27 11:44:05 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-09-27 11:44:05 +0200
commitef3ab866bc2d1c215eea90fba0651db7a6e87c43 (patch)
tree9c16f594bc3b20e6bf52a181126543ed826fe974 /src/forms
parentPassing full arguments to running instance (diff)
downloadsmolbote-ef3ab866bc2d1c215eea90fba0651db7a6e87c43.tar.xz
Code cleanup
Diffstat (limited to 'src/forms')
-rw-r--r--src/forms/aboutdialog.cpp4
-rw-r--r--src/forms/downloadswidget.cpp4
-rw-r--r--src/forms/profilesdialog.cpp10
3 files changed, 11 insertions, 7 deletions
diff --git a/src/forms/aboutdialog.cpp b/src/forms/aboutdialog.cpp
index 2fe312b..e9c2a93 100644
--- a/src/forms/aboutdialog.cpp
+++ b/src/forms/aboutdialog.cpp
@@ -54,7 +54,9 @@ AboutDialog::AboutDialog(QWidget *parent) :
"Configuration lives in %2<br>"
"Default configuration lives in %3"
"</p>")
- .arg(qApp->applicationLongVersion(), sSettings->configurationPath(), sSettings->defaultsPath()));
+ .arg(browser->applicationLongVersion(),
+ browser->settings()->configurationPath(),
+ browser->settings()->defaultsPath()));
ui->toolBox->addItem(detailsLabel, tr("Details"));
QLabel *libsLabel = new QLabel(this);
diff --git a/src/forms/downloadswidget.cpp b/src/forms/downloadswidget.cpp
index ab1d6c0..008e371 100644
--- a/src/forms/downloadswidget.cpp
+++ b/src/forms/downloadswidget.cpp
@@ -46,7 +46,9 @@ DownloadsWidget::~DownloadsWidget()
void DownloadsWidget::addDownload(QWebEngineDownloadItem *item)
{
- QString filepath = QFileDialog::getSaveFileName(this, tr("Save"), sSettings->value("downloads.path").toString() + "/" + QFileInfo(item->path()).fileName());
+ QString filepath = QFileDialog::getSaveFileName(this,
+ tr("Save"),
+ browser->settings()->value("downloads.path").toString() + "/" + QFileInfo(item->path()).fileName());
if(filepath.isEmpty()) {
// user cancelled the save dialog
diff --git a/src/forms/profilesdialog.cpp b/src/forms/profilesdialog.cpp
index 00e4920..7723683 100644
--- a/src/forms/profilesdialog.cpp
+++ b/src/forms/profilesdialog.cpp
@@ -69,8 +69,8 @@ void ProfilesDialog::loadProfiles()
{
ui->listWidget->clear();
- for(QString name : qApp->profiles()) {
- QListWidgetItem *item = new QListWidgetItem(qApp->profile(name)->name(), ui->listWidget);
+ for(QString name : browser->profiles()) {
+ QListWidgetItem *item = new QListWidgetItem(browser->profile(name)->name(), ui->listWidget);
item->setData(Qt::UserRole, name);
}
}
@@ -81,18 +81,18 @@ void ProfilesDialog::newProfile()
QString name = QInputDialog::getText(this, tr("Profile Name"), tr("Profile Name:"), QLineEdit::Normal, tr("Default"), &ok);
if(ok) {
- qApp->profile(name);
+ browser->profile(name);
loadProfiles();
}
}
void ProfilesDialog::loadSelectedProfile()
{
- m_window->setProfile(qApp->profile(ui->listWidget->currentItem()->data(Qt::UserRole).toString()));
+ m_window->setProfile(browser->profile(ui->listWidget->currentItem()->data(Qt::UserRole).toString()));
}
void ProfilesDialog::viewProfile(int index)
{
- m_view->setProfile(qApp->profile(ui->listWidget->item(index)->data(Qt::UserRole).toString()));
+ m_view->setProfile(browser->profile(ui->listWidget->item(index)->data(Qt::UserRole).toString()));
m_view->show();
}