KSandbox Namespace
Utility functions for use inside application sandboxes such as flatpak or snap. More...
| Header: | #include <KSandbox> |
| CMake: | find_package(KF6 REQUIRED COMPONENTS CoreAddons)target_link_libraries(mytarget PRIVATE KF6::CoreAddons) |
Classes
| struct | ProcessContext |
Functions
| bool | isFlatpak() |
| bool | isInside() |
| bool | isSnap() |
| KSandbox::ProcessContext | makeHostContext(const QProcess &process) |
| void | startHostProcess(QProcess &process, QIODeviceBase::OpenMode mode = QProcess::ReadWrite) |
Detailed Description
Function Documentation
bool KSandbox::isFlatpak()
Returns whether the application is inside a flatpak sandbox
bool KSandbox::isInside()
Returns whether the application is inside one of the supported sandboxes
bool KSandbox::isSnap()
Returns whether the application is inside a snap sandbox
KSandbox::ProcessContext KSandbox::makeHostContext(const QProcess &process)
Returns the actual program and arguments for running the QProcess on the host (e.g. a flatpak-spawn-wrapped argument list)
void KSandbox::startHostProcess(QProcess &process, QIODeviceBase::OpenMode mode = QProcess::ReadWrite)
Starts the QProcess on the host (if the current context is inside a sandbox, otherwise it simply runs QProcess::start)