QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
Platform.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4
5#include <QtCore/QtGlobal>
6
7namespace QGCCommandLineParser {
9}
10
11namespace Platform {
12
19std::optional<int> initialize(int argc, char* argv[],
21
24void setupPostApp();
25
26#ifdef Q_OS_ANDROID
29void skipStaticDestructorsAtExit(int exitCode);
30#endif
31
32#if (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)) && !defined(Q_OS_ANDROID)
35bool isRunningAsRoot();
36
39int showRootError(int argc, char *argv[]);
40#endif
41
42#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
45int showMultipleInstanceError(int argc, char *argv[]);
46
50bool checkSingleInstance(bool allowMultiple);
51#endif
52
53} // namespace Platform
bool checkSingleInstance(bool allowMultiple)
Check if another instance is already running (single instance guard).
Definition Platform.cc:470
void setupPostApp()
Complete platform setup after application exists.
Definition Platform.cc:408
std::optional< int > initialize(int argc, char *argv[], const QGCCommandLineParser::CommandLineParseResult &args)
Initialize platform: run safety checks and configure environment.
Definition Platform.cc:335
int showMultipleInstanceError(int argc, char *argv[])
Show error dialog when another instance is already running.
Definition Platform.cc:446
Result of parsing command-line arguments.