Mod documentation + wrap code for better readability

This commit is contained in:
Simon De Backer
2020-07-16 22:09:59 +02:00
parent 26fd1a497c
commit d3b237d06c

View File

@@ -22,12 +22,14 @@
#include <QStyleFactory> #include <QStyleFactory>
/** /**
* @brief main @brief main
* Main function of QElectroTech Main function of QElectroTech
* @param argc : number of paramètres @param argc : number of parameters
* @param argv : paramètres \~French number of paramètres
* @return \~ @param argv : parameters
*/ \~French paramètres
\~ @return exit code
*/
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
//Some setup, notably to use with QSetting. //Some setup, notably to use with QSetting.
@@ -56,14 +58,16 @@ int main(int argc, char **argv)
//Remove the first argument, it's the binary file //Remove the first argument, it's the binary file
arg_list.takeFirst(); arg_list.takeFirst();
QETArguments qetarg(arg_list); QETArguments qetarg(arg_list);
QString message = "launched-with-args: " + QET::joinWithSpaces(QStringList(qetarg.arguments())); QString message = "launched-with-args: " + QET::joinWithSpaces(
QStringList(qetarg.arguments()));
app.sendMessage(message.toUtf8()); app.sendMessage(message.toUtf8());
return 0; return 0;
} }
QETApp qetapp; QETApp qetapp;
QETApp::instance()->installEventFilter(&qetapp); QETApp::instance()->installEventFilter(&qetapp);
QObject::connect(&app, &SingleApplication::receivedMessage, &qetapp, &QETApp::receiveMessage); QObject::connect(&app, &SingleApplication::receivedMessage,
&qetapp, &QETApp::receiveMessage);
return app.exec(); return app.exec();
} }