diff options
Diffstat (limited to 'src/browser.h')
-rw-r--r-- | src/browser.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/browser.h b/src/browser.h index 43ff1f4..9fd0bdf 100644 --- a/src/browser.h +++ b/src/browser.h @@ -25,19 +25,17 @@ #include <bookmarks/bookmarkswidget.h> #include "forms/downloadswidget.h" #include "settings.h" -#include <QNetworkAccessManager> #include "webengine/webengineprofile.h" #include "filter/blockermanager.h" #include "webengine/urlinterceptor.h" -#ifdef qApp -#undef qApp -#endif -#define qApp Browser::instance() +#include <memory> -#define sSettings Browser::instance()->settings() -#define sNetwork Browser::instance()->network() +#ifdef browser +#undef browser +#endif +#define browser Browser::instance() class MainWindow; class Browser : public SingleApplication @@ -57,7 +55,6 @@ public: static Browser *instance(); Settings *settings(); - QNetworkAccessManager *network(); BookmarksWidget *bookmarks(); DownloadsWidget *downloads(); BlockerManager *blocklists(); @@ -71,19 +68,17 @@ public: QStringList plugins(); public slots: - void addWindow(MainWindow* window); - MainWindow *addWindow(const QStringList params); + MainWindow* createWindow(const QHash<QString, QVariant> options); void clean(); private: Q_DISABLE_COPY(Browser) - Settings *m_settings = nullptr; + std::unique_ptr<Settings> m_settings; QVector<QPointer<MainWindow>> m_windows; QHash<QString, WebEngineProfile *> m_profiles; - QNetworkAccessManager *m_networkAccessManager = nullptr; UrlRequestInterceptor *m_urlRequestInterceptor = nullptr; BookmarksWidget *m_bookmarksManager = nullptr; DownloadsWidget *m_downloadManager = nullptr; |