KCoreAddons
klistopenfilesjob_unix.cpp
27 QObject::connect(&lsofProcess, &QProcess::errorOccurred, job, [this](QProcess::ProcessError error) {
31 QObject::connect(&lsofProcess, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), job, [this](int exitCode, QProcess::ExitStatus exitStatus) {
39 emitResult(static_cast<int>(KListOpenFilesJob::Error::DoesNotExist), QObject::tr("Path %1 doesn't exist").arg(path.path()));
46 emitResult(static_cast<int>(KListOpenFilesJob::Error::InternalError), QObject::tr("Could not find lsof executable in PATH:").arg(envPath));
55 emitResult(static_cast<int>(KListOpenFilesJob::Error::InternalError), QObject::tr("Failed to execute `lsof'. Error code %1").arg(processError));
76 auto it = std::find_if(allProcesses.cbegin(), allProcesses.cend(), [pid](const KProcessList::KProcessInfo &info) {
Q_SCRIPTABLE Q_NOREPLY void start()
KProcessList::KProcessInfoList processInfoList() const
Returns the list of processes with open files for the requested path.
Definition: klistopenfilesjob_unix.cpp:133
ProcessError
void finished(int exitCode)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString findExecutable(const QString &executableName, const QStringList &paths)
QString fromLocal8Bit(const char *str, int size)
ExitStatus
SkipEmptyParts
bool isEmpty() const const
QString path(const QString &relativePath)
Absolute libexec path resolved in relative relation to the current shared object.
Definition: klibexec.h:48
void errorOccurred(QProcess::ProcessError error)
QString tr(const char *sourceText, const char *disambiguation, int n)
Provides information about processes that have open files in a given path or subdirectory of path.
Definition: klistopenfilesjob.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:04:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:04:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.