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)
Detailed Description
Classes
struct KSandbox::ProcessContext
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, QProcess::OpenMode mode = QProcess::ReadWrite)
Starts the QProcess on the host (if the current context is inside a sandbox, otherwise it simply runs QProcess::start)