diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-07 23:28:42 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-07 23:28:42 +0100 |
commit | b984992fc92b6dd607732d6dad1c533b36f1ba3a (patch) | |
tree | 984c5ede072c2ebb10ad32acb5d5928162feb97f /src/widgets | |
parent | Searching through BookmarkModel elements (diff) | |
download | smolbote-b984992fc92b6dd607732d6dad1c533b36f1ba3a.tar.xz |
Added .clang-format
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/loadingbar.cpp | 6 | ||||
-rw-r--r-- | src/widgets/mainwindowmenubar.cpp | 10 | ||||
-rw-r--r-- | src/widgets/mainwindowtabbar.cpp | 12 | ||||
-rw-r--r-- | src/widgets/mainwindowtabbar.h | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/widgets/loadingbar.cpp b/src/widgets/loadingbar.cpp index 5dde427..e72c5bb 100644 --- a/src/widgets/loadingbar.cpp +++ b/src/widgets/loadingbar.cpp @@ -7,11 +7,11 @@ */ #include "loadingbar.h" -#include <QWebEngineView> #include <QTimer> +#include <QWebEngineView> -LoadingBar::LoadingBar(QWidget *parent) : - QProgressBar(parent) +LoadingBar::LoadingBar(QWidget *parent) + : QProgressBar(parent) { setMaximum(100); } diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp index ada3ad1..c0bea4f 100644 --- a/src/widgets/mainwindowmenubar.cpp +++ b/src/widgets/mainwindowmenubar.cpp @@ -7,17 +7,17 @@ */ #include "mainwindowmenubar.h" -#include <QApplication> -#include <QInputDialog> #include "forms/profileview.h" #include "mainwindow.h" +#include <QApplication> +#include <QInputDialog> #include <settings/configuration.h> #include "browser.h" #include "downloads/downloadswidget.h" -MainWindowMenuBar::MainWindowMenuBar(std::shared_ptr<Configuration> config, MainWindow *parent) : - QMenuBar(parent) +MainWindowMenuBar::MainWindowMenuBar(std::shared_ptr<Configuration> config, MainWindow *parent) + : QMenuBar(parent) { Q_ASSERT(config); Q_CHECK_PTR(parent); @@ -93,5 +93,5 @@ void MainWindowMenuBar::setProfileName(const QString &name) void MainWindowMenuBar::handleLoadProfile(const QString &name, MainWindow *window) { - window->setProfile(static_cast<Browser*>(qApp->instance())->profile(name)); + window->setProfile(static_cast<Browser *>(qApp->instance())->profile(name)); } diff --git a/src/widgets/mainwindowtabbar.cpp b/src/widgets/mainwindowtabbar.cpp index da2cef3..5cf360d 100644 --- a/src/widgets/mainwindowtabbar.cpp +++ b/src/widgets/mainwindowtabbar.cpp @@ -8,13 +8,13 @@ #include "mainwindowtabbar.h" #include <QContextMenuEvent> -#include <settings/configuration.h> #include <QShortcut> +#include <settings/configuration.h> #include "mainwindow.h" -MainWindowTabBar::MainWindowTabBar(const std::shared_ptr<Configuration> &config, MainWindow *parent) : - QTabBar(parent) +MainWindowTabBar::MainWindowTabBar(const std::shared_ptr<Configuration> &config, MainWindow *parent) + : QTabBar(parent) { Q_CHECK_PTR(parent); m_parent = parent; @@ -37,13 +37,13 @@ MainWindowTabBar::MainWindowTabBar(const std::shared_ptr<Configuration> &config, QShortcut *tabLeftShortcut = new QShortcut(parent); tabLeftShortcut->setKey(QKeySequence(QString::fromStdString(config->value<std::string>("browser.shortcuts.tabLeft").value()))); connect(tabLeftShortcut, &QShortcut::activated, [this]() { - this->setCurrentIndex(currentIndex()-1); + this->setCurrentIndex(currentIndex() - 1); }); QShortcut *tabRightShortcut = new QShortcut(parent); tabRightShortcut->setKey(QKeySequence(QString::fromStdString(config->value<std::string>("browser.shortcuts.tabRight").value()))); connect(tabRightShortcut, &QShortcut::activated, [this]() { - this->setCurrentIndex(currentIndex()+1); + this->setCurrentIndex(currentIndex() + 1); }); } @@ -94,7 +94,7 @@ void MainWindowTabBar::contextMenuEvent(QContextMenuEvent *event) } QMenu menu(this); - QAction* closeAction = menu.addAction(tr("Close tab")); + QAction *closeAction = menu.addAction(tr("Close tab")); connect(closeAction, &QAction::triggered, this, [tabIndex, this]() { removeTab(tabIndex); }); diff --git a/src/widgets/mainwindowtabbar.h b/src/widgets/mainwindowtabbar.h index d0ae9cb..845b908 100644 --- a/src/widgets/mainwindowtabbar.h +++ b/src/widgets/mainwindowtabbar.h @@ -9,9 +9,9 @@ #ifndef WEBVIEWTABBAR_H #define WEBVIEWTABBAR_H -#include <QTabBar> -#include "webengine/webview.h" #include "webengine/webengineprofile.h" +#include "webengine/webview.h" +#include <QTabBar> #include <memory> class Configuration; @@ -46,7 +46,7 @@ private slots: private: // store all views in a vector since tabs can only store a QVariant, and that can't easily take a pointer - QVector<WebView*> m_views; + QVector<WebView *> m_views; MainWindow *m_parent; }; |