From 1bc1ae8cd09851faa05345f5a6b105b02fe75dd2 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 19 Nov 2020 18:22:36 +0200 Subject: Drop args.hxx dependency Replace args.hxx with QCommandLineParser. --- src/browser.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/browser.h') diff --git a/src/browser.h b/src/browser.h index 69cf804..8e443fe 100644 --- a/src/browser.h +++ b/src/browser.h @@ -1,7 +1,7 @@ /* * This file is part of smolbote. It's copyrighted by the contributors recorded * in the version control history of the file, available from its original - * location: https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote + * location: https://neueland.iserlohn-fortress.net/cgit/smolbote * * SPDX-License-Identifier: GPL-3.0 */ @@ -37,26 +37,32 @@ public: return qAsConst(m_windows); } - BookmarksWidget *bookmarks() const + [[deprecated]] BookmarksWidget *bookmarks() const { return m_bookmarks.get(); } - DownloadsWidget *downloads() const + [[deprecated]] DownloadsWidget *downloads() const { return m_downloads.get(); } + bool remoteEnabled() const + { + return static_cast(remoteConnection); + } signals: void pluginAdded(QPluginLoader *); public slots: - void about(); - void aboutPlugins(); + [[deprecated]] void about(); + [[deprecated]] void aboutPlugins(); - void showWidget(QWidget *widget, MainWindow *where) const; + [[deprecated]] void showWidget(QWidget *widget, MainWindow *where) const; void open(const QVector &data, bool merge = true); + void loadConfiguration(const QString &path); bool loadPlugin(const QString &path); + void enableRemote(bool toggle); private: struct PluginInfo { @@ -77,6 +83,8 @@ private: Q_DISABLE_COPY(Browser) + QMetaObject::Connection remoteConnection; + std::unique_ptr m_conf; std::shared_ptr m_bookmarks; std::unique_ptr m_downloads; std::unique_ptr> m_profileManager{ nullptr }; -- cgit v1.2.1