diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-08-27 15:27:37 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-08-27 15:35:38 +0300 |
commit | a7465aa35b4efd3bfc4bbd9be4d1572d25a05bb2 (patch) | |
tree | 9dfa5112b52705ae4f0e04f1e43b0307a7806f5a /src | |
parent | Add CMakePresets.json (diff) | |
download | rekonq-a7465aa35b4efd3bfc4bbd9be4d1572d25a05bb2.tar.xz |
Rename rView to RekonqView
- move rview.hpp to include/
- move src/mainwindow/* to src/
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/application.cpp | 2 | ||||
-rw-r--r-- | src/application.hpp | 10 | ||||
-rw-r--r-- | src/application_instance.cpp | 2 | ||||
-rw-r--r-- | src/plugins/rplugininterface.hpp | 8 | ||||
-rw-r--r-- | src/plugins/rview.hpp | 27 | ||||
-rw-r--r-- | src/rekonqwindow.cpp (renamed from src/mainwindow/rekonqwindow.cpp) | 8 | ||||
-rw-r--r-- | src/rekonqwindow.h (renamed from src/mainwindow/rekonqwindow.h) | 4 | ||||
-rw-r--r-- | src/rekonqwindow.ui (renamed from src/mainwindow/rekonqwindow.ui) | 0 | ||||
-rw-r--r-- | src/taskmanager.cpp (renamed from src/mainwindow/taskmanager.cpp) | 0 | ||||
-rw-r--r-- | src/taskmanager.h (renamed from src/mainwindow/taskmanager.h) | 0 | ||||
-rw-r--r-- | src/taskmanager.ui (renamed from src/mainwindow/taskmanager.ui) | 0 |
12 files changed, 21 insertions, 46 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a48bed28..6bf47516 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,10 +10,10 @@ set(rekonq_SRCS #---------------------------------------- main.cpp application.cpp application_instance.cpp application.hpp #---------------------------------------- - mainwindow/rekonqwindow.cpp mainwindow/rekonqwindow.h mainwindow/rekonqwindow.ui - mainwindow/taskmanager.cpp mainwindow/taskmanager.h mainwindow/taskmanager.ui + rekonqwindow.cpp rekonqwindow.h rekonqwindow.ui + taskmanager.cpp taskmanager.h taskmanager.ui #---------------------------------------- - plugins/rplugininterface.hpp plugins/rview.hpp + plugins/rplugininterface.hpp #---------------------------------------- ) list(TRANSFORM rekonq_SRCS PREPEND src/) diff --git a/src/application.cpp b/src/application.cpp index 126eb020..be4bb4fc 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -347,7 +347,7 @@ RekonqWindow *Application::newWindow() return window; } -rView *Application::newView(const QUrl &url, RekonqWindow *window) +RekonqView *Application::newView(const QUrl &url, RekonqWindow *window) { RekonqPluginInterface *interface = nullptr; for (const auto &plugin : m_plugins) diff --git a/src/application.hpp b/src/application.hpp index ce4bbfd1..7d75af3a 100644 --- a/src/application.hpp +++ b/src/application.hpp @@ -11,15 +11,15 @@ #pragma once -#include "mainwindow/rekonqwindow.h" #include "rekonq.hpp" +#include "rekonqwindow.h" #include <QPointer> #include <QUrl> #include <QWidget> #include <SingleApplication> // Forward Declarations -class rView; +class RekonqView; class PluginLoader; // class WebTab; @@ -27,7 +27,7 @@ class PluginLoader; typedef QList<QPointer<PluginLoader>> RekonqPluginList; typedef QList<QPointer<RekonqWindow>> RekonqWindowList; -typedef QList<QPointer<rView>> RekonqViewList; +typedef QList<QPointer<RekonqView>> RekonqViewList; // --------------------------------------------------------------------------------------------------------------- @@ -75,7 +75,7 @@ public slots: * @param instanceId if the current instance, check QCoreApplication::arguments instead of @param message * @param message the command line */ - void parseCommandLine(int instanceId, const QByteArray &message); + void parseCommandLine(quint32 instanceId, const QByteArray &message); /** * Save application's configuration @@ -95,7 +95,7 @@ public slots: // RekonqWindow *newWindow(bool withTab = true, bool PrivateBrowsingMode = false); // RekonqWindow *newWindow(WebPage *pg); RekonqWindow *newWindow(); - rView *newView(const QUrl &url = QUrl(), RekonqWindow *window = nullptr); + RekonqView *newView(const QUrl &url = QUrl(), RekonqWindow *window = nullptr); // void createWebAppShortcut(const QString & urlString = QString(), const QString & titleString = QString()); diff --git a/src/application_instance.cpp b/src/application_instance.cpp index 42c77dc1..53dd9885 100644 --- a/src/application_instance.cpp +++ b/src/application_instance.cpp @@ -13,7 +13,7 @@ static const char *description = "A lightweight Web Browser based on Qt WebEngine"; -void Application::parseCommandLine(int instanceId, const QByteArray &message) +void Application::parseCommandLine(quint32 instanceId, const QByteArray &message) { // Initialize command line args QCommandLineParser parser; diff --git a/src/plugins/rplugininterface.hpp b/src/plugins/rplugininterface.hpp index 16186591..e45f2422 100644 --- a/src/plugins/rplugininterface.hpp +++ b/src/plugins/rplugininterface.hpp @@ -9,15 +9,17 @@ #pragma once -#include "rview.hpp" #include <QtPlugin> +#include <rsettings.hpp> +#include <rview.hpp> class RekonqPluginInterface : public QObject { Q_OBJECT public: - virtual rView *view(const QUrl &url) = 0; + virtual void init(RekonqSettings *settings) = 0; + virtual RekonqView *view(const QUrl &url) = 0; }; -#define RekonqPluginInterface_iid "rekonq.3.RekongPluginInterface" +#define RekonqPluginInterface_iid "net.rekonq.3.RekonqPluginInterface/1" Q_DECLARE_INTERFACE(RekonqPluginInterface, RekonqPluginInterface_iid) diff --git a/src/plugins/rview.hpp b/src/plugins/rview.hpp deleted file mode 100644 index 6f0652d5..00000000 --- a/src/plugins/rview.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/* ============================================================ - * The rekonq project - * ============================================================ - * SPDX-License-Identifier: GPL-3.0-only - * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net> - * ============================================================ - * Description: View Interface - * ============================================================ */ - -#pragma once - -#include <QUrl> -#include <QWidget> - -class rView : public QWidget { - Q_OBJECT - -public: - explicit rView(const QUrl &url = QUrl(), QWidget *parent = nullptr) : QWidget(parent) {} - - [[nodiscard]] virtual QString title() const = 0; - -signals: - void iconChanged(const QIcon &); - void urlChanged(const QUrl &); - void titleChanged(const QString &); -}; diff --git a/src/mainwindow/rekonqwindow.cpp b/src/rekonqwindow.cpp index d912bf2a..b1380154 100644 --- a/src/mainwindow/rekonqwindow.cpp +++ b/src/rekonqwindow.cpp @@ -10,10 +10,10 @@ * ============================================================ */ #include "rekonqwindow.h" -#include "../plugins/rview.hpp" #include "application.hpp" #include "taskmanager.h" #include "ui_rekonqwindow.h" +#include <rview.hpp> RekonqWindow::RekonqWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::RekonqWindow) { @@ -23,10 +23,10 @@ RekonqWindow::RekonqWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Re RekonqWindow::~RekonqWindow() { delete ui; } -void RekonqWindow::addView(rView *view) +void RekonqWindow::addView(RekonqView *view) { const auto tabId = ui->tabWidget->addTab(view, view->title()); - connect(view, &rView::titleChanged, this, + connect(view, &RekonqView::titleChanged, this, [this, tabId](const QString &title) { ui->tabWidget->setTabText(tabId, title); }); } @@ -158,4 +158,4 @@ SLOT(loadUrl(KUrl,Rekonq::OpenType))); _historyPanel.clear(); } } -*/
\ No newline at end of file +*/ diff --git a/src/mainwindow/rekonqwindow.h b/src/rekonqwindow.h index 73d58c04..e6316819 100644 --- a/src/mainwindow/rekonqwindow.h +++ b/src/rekonqwindow.h @@ -20,7 +20,7 @@ #include <QSplitter> // Forward Declarations -class rView; +class RekonqView; // class TabBar; // class WebPage; // class WebWindow; @@ -47,7 +47,7 @@ private: // void init(); public slots: - void addView(rView *view); + void addView(RekonqView *view); // void loadUrl(const KUrl &, Rekonq::OpenType type = Rekonq::CurrentTab, TabHistory *history = 0); private slots: diff --git a/src/mainwindow/rekonqwindow.ui b/src/rekonqwindow.ui index 9df36cf2..9df36cf2 100644 --- a/src/mainwindow/rekonqwindow.ui +++ b/src/rekonqwindow.ui diff --git a/src/mainwindow/taskmanager.cpp b/src/taskmanager.cpp index 9025f461..9025f461 100644 --- a/src/mainwindow/taskmanager.cpp +++ b/src/taskmanager.cpp diff --git a/src/mainwindow/taskmanager.h b/src/taskmanager.h index 073464b9..073464b9 100644 --- a/src/mainwindow/taskmanager.h +++ b/src/taskmanager.h diff --git a/src/mainwindow/taskmanager.ui b/src/taskmanager.ui index 8242e43c..8242e43c 100644 --- a/src/mainwindow/taskmanager.ui +++ b/src/taskmanager.ui |