blob: 51e687162a2f13ad7541821e4601f3a332029eff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* ============================================================
* The rekonq project
* ============================================================
* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright (C) 2008-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
* ============================================================ */
#include "application.hpp"
#include <spdlog/spdlog.h>
int main(int argc, char **argv)
{
#ifdef QT_DEBUG
spdlog::set_level(spdlog::level::debug);
#endif
// When loading QtWebEngine from a plugin, set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
Application app(argc, argv);
// Set application data
QCoreApplication::setApplicationName(QL1S("rekonq"));
QCoreApplication::setApplicationVersion(REKONQ_VERSION);
if (app.isSecondary()) {
app.sendMessage(Application::arguments().join('\n').toUtf8());
return 0;
}
else
app.parseCommandLine(app.instanceId(), {});
/*
if (app.isSessionRestored())
{
for (int i = 1; RekonqWindow::canBeRestored(i); i++)
{
RekonqWindow * newRekonqWindow = app.newWindow(false);
if (newRekonqWindow->restore(i))
SessionManager::self()->restoreWindow(newRekonqWindow);
}
}
*/
return Application::exec();
}
|