Formats minimally release source files based on former clang-format

This commit is contained in:
torsten committed 2026-10-14 13:28:01 +00:00
1 parent b662e4daf9
commit 5644914fe3
387 files changed
+37323 -38074

No files matched your search

@@ -40,16 +40,18 @@ static void daemonize()
pid_t pid, sid;
/* already a daemon */
if ( getppid() == 1 )
if (getppid() == 1)
return;
/* Fork off the parent process */
pid = fork();
if (pid < 0) {
if (pid < 0)
{
exit(EXIT_FAILURE);
}
/* If we got a good PID, then we can exit the parent process. */
if (pid > 0) {
if (pid > 0)
{
exit(EXIT_SUCCESS);
}
@@ -60,20 +62,20 @@ static void daemonize()
/* Create a new SID for the child process */
sid = setsid();
if (sid < 0) {
if (sid < 0)
{
exit(EXIT_FAILURE);
}
/* Change the current working directory. This prevents the current
directory from being locked; hence not being able to remove it. */
if ((chdir("/")) < 0) {
if ((chdir("/")) < 0)
{
exit(EXIT_FAILURE);
}
if (freopen( "/dev/null", "r", stdin ) == nullptr
|| freopen( "/dev/null", "w", stdout ) == nullptr
|| freopen( "/dev/null", "w", stderr ) == nullptr)
if (freopen("/dev/null", "r", stdin) == nullptr || freopen("/dev/null", "w", stdout) == nullptr || freopen("/dev/null", "w", stderr) == nullptr)
{
exit(EXIT_FAILURE);
}
@@ -84,25 +86,17 @@ class CmdLineParser : public LtsCommandLineParser::LtsCommandLineParser
{
public:
CmdLineParser()
: LtsCommandLineParser(ProvideCommandLineParameterOptions(ExerciseId|CustomConfigFile))
: LtsCommandLineParser(ProvideCommandLineParameterOptions(ExerciseId | CustomConfigFile))
{
addOption( { QStringList() << QStringLiteral("d") << QStringLiteral("daemonize"),
QStringLiteral("Start in background") } );
addOption( { QStringList() << QStringLiteral("c") << QStringLiteral("cleandb"),
QStringLiteral("Start over with clean database") } );
addOption({QStringList() << QStringLiteral("d") << QStringLiteral("daemonize"), QStringLiteral("Start in background")});
addOption({QStringList() << QStringLiteral("c") << QStringLiteral("cleandb"), QStringLiteral("Start over with clean database")});
}
bool daemonize() const
{
return isSet(QStringLiteral("d"));
}
bool cleanDb() const
{
return isSet(QStringLiteral("c"));
}
bool daemonize() const { return isSet(QStringLiteral("d")); }
bool cleanDb() const { return isSet(QStringLiteral("c")); }
};
int main(int argc, char** argv)
int main(int argc, char **argv)
{
QNetworkProxy::setApplicationProxy(QNetworkProxy());
NGLCoreApplication app(argc, argv);