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 {
8 struct CommandLineParseResult;
9}
10
11namespace Platform {
12
19std::optional<int> initialize(int argc, char* argv[],
21
24void setupPostApp();
25
26#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
29bool isRunningAsRoot();
30
33int showRootError(int argc, char *argv[]);
34#endif
35
36#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
39int showMultipleInstanceError(int argc, char *argv[]);
40
44bool checkSingleInstance(bool allowMultiple);
45#endif
46
47} // namespace Platform
bool checkSingleInstance(bool allowMultiple)
Check if another instance is already running (single instance guard)
Definition Platform.cc:243
void setupPostApp()
Complete platform setup after application exists.
Definition Platform.cc:200
std::optional< int > initialize(int argc, char *argv[], const QGCCommandLineParser::CommandLineParseResult &args)
Initialize platform: run safety checks and configure environment.
Definition Platform.cc:135
int showMultipleInstanceError(int argc, char *argv[])
Show error dialog when another instance is already running.
Definition Platform.cc:232
Result of parsing command-line arguments.