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 emitResult()
Utility function to emit the result signal, and suicide this job.
Definition: kjob.cpp:304
void setError(int errorCode)
Sets the error code.
Definition: kjob.cpp:236
void start() override
Starts the job asynchronously.
QString tr(const char *sourceText, const char *disambiguation, int n)
void setErrorText(const QString &errorText)
Sets the error text.
Definition: kjob.cpp:242
KProcessList::KProcessInfoList processInfoList() const
Returns the list of processes with open files for the requested path.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Apr 22 2021 23:02:15 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.