From 400c385a5c309ce468c746c1e52e66e0d380f276 Mon Sep 17 00:00:00 2001 From: pazos Date: Wed, 25 Apr 2018 15:26:54 +0200 Subject: [PATCH] add minimal cmdline parser --- main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 73a149a7..3f656042 100644 --- a/main.cpp +++ b/main.cpp @@ -90,6 +90,8 @@ int main(int argc, char *argv[]) bool isWindows = true; #endif + // disable "QApplication: invalid style override passed" warning + if (isDesktop) putenv((char*)"QT_STYLE_OVERRIDE=fusion"); Monero::Utils::onStartup(); // // Enable high DPI scaling on windows & linux @@ -104,8 +106,6 @@ int main(int argc, char *argv[]) MainApp app(argc, argv); - qDebug() << "app startd"; - app.setApplicationName("monero-gui"); app.setOrganizationDomain("getmonero.org"); app.setOrganizationName("monero-project"); @@ -117,6 +117,12 @@ int main(int argc, char *argv[]) filter *eventFilter = new filter; app.installEventFilter(eventFilter); + QCommandLineParser parser; + parser.addHelpOption(); + parser.process(app); + + qDebug() << "app startd"; + // registering types for QML qmlRegisterType("moneroComponents.Clipboard", 1, 0, "Clipboard");