Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140108
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/main.cpp b/src/main.cpp
index 7bf52bd..86da8a3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,42 +1,58 @@
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2021-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include <libkazv-config.hpp>
#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QtQml>
#include <QUrl>
+#include <QIcon>
+#include <QCommandLineParser>
#include "register-types.hpp"
#include "meta-types.hpp"
#include "kazv-platform.hpp"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QCoreApplication::setOrganizationName("project-kazv");
QCoreApplication::setOrganizationDomain("mxc.kazv.moe");
QCoreApplication::setApplicationName("kazv");
QGuiApplication::setDesktopFileName("moe.kazv.mxc.kazv.desktop");
QQmlApplicationEngine engine;
+ QString iconThemeToSet;
+#if KAZV_IS_WINDOWS
+ iconThemeToSet = QStringLiteral("breeze");
+#endif
+ QCommandLineParser parser;
+ QCommandLineOption iconThemeOption("i", "Icon theme", "theme");
+ parser.addOption(iconThemeOption);
+ parser.process(app);
+ if (!parser.value(iconThemeOption).isEmpty()) {
+ iconThemeToSet = parser.value(iconThemeOption);
+ }
registerKazvQmlTypes();
#if KAZV_IS_WINDOWS
qRegisterMetaType<Kazv::KazvEvent>();
#endif
+ if (!iconThemeToSet.isEmpty()) {
+ QIcon::setThemeName(iconThemeToSet);
+ }
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
if (engine.rootObjects().isEmpty()) {
return -1;
}
return app.exec();
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 12:46 PM (5 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55177
Default Alt Text
(1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment