]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
parse cmdline args BEFORE initing UI libs
authorgg <chown_tee@proton.me>
Tue, 13 Jan 2026 02:41:53 +0000 (21:41 -0500)
committergg <chown_tee@proton.me>
Tue, 13 Jan 2026 02:41:53 +0000 (21:41 -0500)
src/main.cpp

index 48aa561ce793f1784df7120e7e9c2aa6cc9f29f7..eccb4b4e28fabe6d79963d8132e7185c19db2885 100644 (file)
@@ -83,6 +83,13 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
     QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round);
 #endif
 
+    for (int i = 0; i < argc; i++) {
+        if (QString(argv[i]) == "--version" || QString(argv[i]) == "-v") {
+            qInfo() << QObject::tr("Feather Wallet") << FEATHER_VERSION;
+            return 0;
+        }
+    }
+
     Application app(argc, argv);
 
     QApplication::setApplicationName("FeatherWallet");