summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-08-15 17:30:11 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-08-15 17:30:11 +0300
commit5a9617e76e7c987016cb1f4189908f8430777f3e (patch)
treea997c4a6233d3ee02cb330e48d448f2e25bddd43 /src/application.cpp
parentRecord authors and contributors in src/data/about.html (diff)
downloadrekonq-5a9617e76e7c987016cb1f4189908f8430777f3e.tar.xz
Add third-party/SingleApplication
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp69
1 files changed, 20 insertions, 49 deletions
diff --git a/src/application.cpp b/src/application.cpp
index bec02687..41cf1dab 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -1,35 +1,16 @@
/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012-2013 by Andrea Diamantini <adjam7 at gmail dot com>
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License as
-* published by the Free Software Foundation; either version 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-* ============================================================ */
-
-
-// Self Includes
-#include "application.h"
-#include "application.moc"
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright (C) 2012-2013 by Andrea Diamantini <adjam7 at gmail dot com>
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: Application Entry Point
+ * ============================================================ */
-// Auto Includes
-#include "rekonq.h"
+#include "application.h"
+#include "rekonq.hpp"
// Ui Includes
#include "ui_webappcreation.h"
@@ -80,24 +61,20 @@
#include <QDir>
#include <QTimer>
+// ---------------------------------------------------------------------------------------------------------------
+// Ctor and Dtor
-Application::Application()
- : KUniqueApplication()
+Application::Application(int argc, char **argv) : SingleApplication(argc, argv)
{
-#ifdef HAVE_KACTIVITIES
- m_activityConsumer = new KActivities::Consumer();
-#endif
-
- // updating rekonq configuration
- updateConfiguration();
+ // updating rekonq configuration
+ updateConfiguration();
- setWindowIcon(KIcon("rekonq"));
+ setWindowIcon(KIcon("rekonq"));
- // just create History Manager...
- HistoryManager::self();
+ // just create History Manager...
+ HistoryManager::self();
}
-
Application::~Application()
{
// ok, we are closing well: don't recover on next load..
@@ -124,6 +101,7 @@ Application::~Application()
kDebug() << "Bye bye (k)baby...";
}
+// ---------------------------------------------------------------------------------------------------------------
int Application::newInstance()
{
@@ -367,13 +345,6 @@ int Application::newInstance()
return 0;
}
-
-Application *Application::instance()
-{
- return (qobject_cast<Application *>(QCoreApplication::instance()));
-}
-
-
void Application::saveConfiguration() const
{
ReKonfig::self()->writeConfig();