KSandbox

KSandbox Namespace Reference

Classes

struct  ProcessContext
 

Functions

KCOREADDONS_EXPORT bool isFlatpak ()
 
KCOREADDONS_EXPORT bool isInside ()
 
KCOREADDONS_EXPORT bool isSnap ()
 
KCOREADDONS_EXPORT KSandbox::ProcessContext makeHostContext (const QProcess &process)
 
KCOREADDONS_EXPORT void startHostProcess (QProcess &process, QProcess::OpenMode mode=QProcess::ReadWrite)
 

Detailed Description

Utility functions for use inside application sandboxes such as flatpak or snap.

Since
5.95

Function Documentation

◆ isFlatpak()

bool KSandbox::isFlatpak ( )
Returns
whether the application is inside a flatpak sandbox

Definition at line 15 of file ksandbox.cpp.

◆ isInside()

bool KSandbox::isInside ( )
Returns
whether the application is inside one of the supported sandboxes

Definition at line 9 of file ksandbox.cpp.

◆ isSnap()

bool KSandbox::isSnap ( )
Returns
whether the application is inside a snap sandbox

Definition at line 21 of file ksandbox.cpp.

◆ makeHostContext()

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)
Since
5.97

Definition at line 27 of file ksandbox.cpp.

◆ startHostProcess()

KCOREADDONS_EXPORT 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)

Since
5.97

Definition at line 52 of file ksandbox.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Dec 9 2022 04:06:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.