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'.
This commit is contained in:
Tom Dewey 2024-08-02 16:26:13 +01:00 committed by Tom Dewey
parent 7bc17004f4
commit 84c3b14ce9
3 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ Cli::~Cli()
delete _app; delete _app;
} }
int Cli::main() int Cli::run()
{ {
QCommandLineParser parser; QCommandLineParser parser;
parser.addOptions({ parser.addOptions({

View file

@ -13,7 +13,7 @@ class Cli : public QObject
public: public:
explicit Cli(int &argc, char *argv[]); explicit Cli(int &argc, char *argv[]);
virtual ~Cli(); virtual ~Cli();
int main(); int run();
protected: protected:
QCoreApplication *_app; QCoreApplication *_app;

View file

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
{ {
/* CLI mode */ /* CLI mode */
Cli cli(argc, argv); Cli cli(argc, argv);
return cli.main(); return cli.run();
} }
} }