#include <QApplication>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QStandardPaths>
|
| bool | isPortableMode () |
| | Determines if the application should run in portable mode.
|
| QString | getConfigDir () |
| | Returns the directory for configuration files (settings.ini).
|
| QString | getDataDir () |
| | Returns the directory for application data files (profiles, etc.).
|
◆ getConfigDir()
Returns the directory for configuration files (settings.ini).
- Portable mode: Application directory (Windows) or parent directory (Linux)
- Installable mode:
- Linux: ~/.config/VirtualGamePad/
- Windows: APPDATA%/VirtualGamePad/
- Debug builds: Always use application directory
- Warning
- Instantiate the QApplication object first
◆ getDataDir()
Returns the directory for application data files (profiles, etc.).
- Portable mode: Same as config directory
- Installable mode:
- Linux: ~/.local/share/VirtualGamePad/
- Windows: APPDATA%/VirtualGamePad/ (same as config)
- Debug builds: Always use application directory
- Warning
- Instantiate the QApplication object first
◆ isPortableMode()
Determines if the application should run in portable mode.
Portable mode is determined by the build-time flag PORTABLE_BUILD.
In portable mode, settings and data are stored alongside the executable. In installable mode, standard OS locations are used (~/.config, APPDATA%, etc.).