KCoreAddons

klistopenfilesjob_win.cpp
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2019 David Hallas <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-only
7 */
8 
9 #include "klistopenfilesjob.h"
10 #include <QTimer>
11 
12 class KListOpenFilesJobPrivate
13 {
14 };
15 
16 KListOpenFilesJob::KListOpenFilesJob(const QString &)
17  : d(nullptr)
18 {
19 }
20 
21 KListOpenFilesJob::~KListOpenFilesJob() = default;
22 
24 {
25  QTimer::singleShot(0, [this]() {
26  setError(static_cast<int>(KListOpenFilesJob::Error::NotSupported));
27  setErrorText(QObject::tr("KListOpenFilesJob is not supported on Windows"));
28  emitResult();
29  });
30 }
31 
33 {
35 }
36 
37 #include "moc_klistopenfilesjob.cpp"
void setErrorText(const QString &errorText)
Sets the error text.
Definition: kjob.cpp:257
void start() override
Starts the job asynchronously.
KProcessList::KProcessInfoList processInfoList() const
Returns the list of processes with open files for the requested path.
void emitResult()
Utility function to emit the result signal, and suicide this job.
Definition: kjob.cpp:335
QString tr(const char *sourceText, const char *disambiguation, int n)
void setError(int errorCode)
Sets the error code.
Definition: kjob.cpp:251
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

KDE's Doxygen guidelines are available online.