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 17 of file ksandbox.cpp.

◆ isInside()

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

Definition at line 11 of file ksandbox.cpp.

◆ isSnap()

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

Definition at line 23 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 39 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 70 of file ksandbox.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.