From 84c3b14ce97caaa5a860570a3983a5931bbc8db0 Mon Sep 17 00:00:00 2001 From: Tom Dewey Date: Fri, 2 Aug 2024 16:26:13 +0100 Subject: [PATCH] cli: s/main/run The MinGW64 build of Qt6 renames 'main' to 'qMain' to ensure its runtime is executed first. This unfortunately fouls anything else called 'main', so rename the symbol to 'run'. --- src/cli.cpp | 2 +- src/cli.h | 2 +- src/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.cpp b/src/cli.cpp index 8eacb29..ed5aa06 100644 --- a/src/cli.cpp +++ b/src/cli.cpp @@ -46,7 +46,7 @@ Cli::~Cli() delete _app; } -int Cli::main() +int Cli::run() { QCommandLineParser parser; parser.addOptions({ diff --git a/src/cli.h b/src/cli.h index 09e2b97..cc891db 100644 --- a/src/cli.h +++ b/src/cli.h @@ -13,7 +13,7 @@ class Cli : public QObject public: explicit Cli(int &argc, char *argv[]); virtual ~Cli(); - int main(); + int run(); protected: QCoreApplication *_app; diff --git a/src/main.cpp b/src/main.cpp index 4f43d4a..0f57a42 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) { /* CLI mode */ Cli cli(argc, argv); - return cli.main(); + return cli.run(); } }