diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-22 19:37:31 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-22 19:37:31 +0200 |
commit | 657e13760365aad3ab358b237060bf2356fc4a80 (patch) | |
tree | 339d530885a32fade0b9c4f77a9683111b00796c /src/browser.cpp | |
parent | Plugin commands no longer require --command (diff) | |
download | smolbote-657e13760365aad3ab358b237060bf2356fc4a80.tar.xz |
clang-format pass
Diffstat (limited to 'src/browser.cpp')
-rw-r--r-- | src/browser.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index f2c7314..e26dbc8 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -11,18 +11,18 @@ #include "mainwindow/mainwindow.h" #include "mainwindow/subwindow.h" #include "webengine/urlinterceptor.h" -#include <webprofile.h> #include <QAction> -#include <bookmarks/bookmarkswidget.h> -#include <configuration/configuration.h> -#include <downloads/downloadswidget.h> -#include <version.h> #include <QDir> #include <QFileInfo> #include <QFileInfoList> -#include <QPluginLoader> #include <QJsonArray> +#include <QPluginLoader> #include <about/aboutdialog.h> +#include <bookmarks/bookmarkswidget.h> +#include <configuration/configuration.h> +#include <downloads/downloadswidget.h> +#include <version.h> +#include <webprofile.h> Browser::Browser(int &argc, char *argv[]) : SingleApplication(argc, argv) @@ -38,8 +38,7 @@ Browser::~Browser() m_bookmarks->save(); qDeleteAll(m_windows); - m_windows.clear(); - + m_windows.clear(); } void Browser::about() @@ -84,7 +83,7 @@ void Browser::setup(const QString &defaultProfile) const QDir profilesDir(m_config->value<QString>("profile.path").value()); if(profilesDir.exists()) { - const auto entries = profilesDir.entryInfoList({"*.profile"}, QDir::Files | QDir::Readable, QDir::Time); + const auto entries = profilesDir.entryInfoList({ "*.profile" }, QDir::Files | QDir::Readable, QDir::Time); for(const QFileInfo &f : entries) { auto name = f.baseName(); @@ -125,9 +124,6 @@ void Browser::setup(const QString &defaultProfile) // downloads m_downloads = std::make_shared<DownloadsWidget>(QString::fromStdString(m_config->value<std::string>("downloads.path").value())); connect(WebProfile::defaultProfile(), &WebProfile::downloadRequested, m_downloads.get(), &DownloadsWidget::addDownload); - - - } WebProfile *Browser::profile(const QString &name) const @@ -146,7 +142,7 @@ void Browser::createSession(const QString &profileName, bool newWindow, const QS auto *mainwindow = m_windows.last(); if(newWindow) { - QString firstUrl;// = WebProfile::defaultProfile()->homepage(); + QString firstUrl; // = WebProfile::defaultProfile()->homepage(); if(!urls.isEmpty()) firstUrl = urls.at(0); auto *w = mainwindow->createSubWindow(firstUrl); |