Files
qt5-legatus-legacy/Lts/Tools/DateTimeSyncer/main.cpp
T
2026-08-13 18:33:10 +02:00

43 lines
1.1 KiB
C++
Executable File

/**
* @RDE_HEADER@
* DateTimeSyncer to set Time and Date
* $Id$
* $HeadURL$
* $Author$
* Created by Patric Karwat, NLE, 07-03-2019
*/
#include <LtsCommandLineParser/LtsCommandLineParser.h>
#include <NGLLogger/INGLLogger.h>
#include <nglapplication/nglapplication.h>
#include <QNetworkProxy>
#include "system_caller.h"
int main(int argc, char *argv[])
{
NGLApplication app(argc, argv);
QNetworkProxy::setApplicationProxy(QNetworkProxy());
LtsCommandLineParser::LtsCommandLineParser options(LtsCommandLineParser::LtsCommandLineParser::ProvideCommandLineParameterOptions::CustomConfigFile);
if (!options.init())
return -1;
app.createLogger("DateTimeSyncer", "log4cxx_dateTimeSyncer.props");
NGL::INGLLogger &logger = app.baseLogger();
QCoreApplication::setApplicationName(QLatin1String("Date Time Syncer"));
QCoreApplication::setOrganizationName(QLatin1String("RME"));
int retval = 0;
STARTUP_LOG(logger);
{
DateTimeSyncer::SystemCaller controller;
controller.init(13777);
retval = app.exec();
SHUTDOWN_LOG(logger);
}
return retval;
}