summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-23 21:48:12 -0400
committerbd <bdunahu@operationnull.com>2025-03-23 21:48:12 -0400
commite05f5306f50029b0f5f471b70cfe45749d0d21f6 (patch)
tree80edca6ac9dca277e0212ce78885c9d142942456 /src/main.cc
parentdedaa26c8068fd125a40a0261aeedd74c8d395e5 (diff)
Remove Python, combine main files
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc
index f5eecac..be0a6f0 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -1,6 +1,8 @@
#include "cli.h"
#include "definitions.h"
+#include "gui.h"
#include "logger.h"
+#include <QApplication>
#include <getopt.h>
#include <iostream>
@@ -36,8 +38,7 @@ static void err()
<< std::endl;
}
-static void
-parseArguments(int argc, char **argv, bool &memory_only)
+static void parseArguments(int argc, char **argv, bool &memory_only)
{
struct option long_options[] = {
{"debug", no_argument, 0, 'd'},
@@ -74,10 +75,13 @@ int main(int argc, char **argv)
if (memory_only) {
Cli cli;
cli.run();
+ } else {
+ QApplication a(argc, argv);
+ Gui w;
+ w.show();
+ return a.exec();
}
- // fork off python here
- global_log->log(INFO, "Python started.");
global_log->log(INFO, "Cleaning up...");
global_log->log(INFO, "Goodbye!");
return EXIT_SUCCESS;