KIO

emptytrashjob.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2014 David Faure <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "emptytrashjob.h"
9 #include "job.h"
10 #include "job_p.h"
11 //#include <KNotification>
12 
13 using namespace KIO;
14 
15 class KIO::EmptyTrashJobPrivate : public SimpleJobPrivate
16 {
17 public:
18  EmptyTrashJobPrivate(int command, const QByteArray &packedArgs)
19  : SimpleJobPrivate(QUrl(QStringLiteral("trash:/")), command, packedArgs)
20  {
21  }
22 
23  Q_DECLARE_PUBLIC(EmptyTrashJob)
24 
25  static inline EmptyTrashJob *newJob(int command, const QByteArray &packedArgs)
26  {
27  EmptyTrashJob *job = new EmptyTrashJob(*new EmptyTrashJobPrivate(command, packedArgs));
29  return job;
30  }
31 };
32 
33 EmptyTrashJob::EmptyTrashJob(EmptyTrashJobPrivate &dd)
34  : SimpleJob(dd)
35 {
36 }
37 
38 EmptyTrashJob::~EmptyTrashJob()
39 {
40 }
41 
42 // TODO KF6: remove this
44 {
46 }
47 
49 {
50  KIO_ARGS << int(1);
51  return EmptyTrashJobPrivate::newJob(CMD_SPECIAL, packedArgs);
52 }
53 
54 #include "moc_emptytrashjob.cpp"
virtual void slotFinished()
Called when the slave marks the job as finished.
Definition: simplejob.cpp:200
KIOCORE_EXPORT EmptyTrashJob * emptyTrash()
Empties the trash.
KIOCORE_EXPORT KJobUiDelegate * createDefaultJobUiDelegate()
Convenience method: use default factory, if there's one, to create a delegate and return it.
void setUiDelegate(KJobUiDelegate *delegate)
A namespace for KIO globals.
void slotFinished() override
Called when the slave marks the job as finished.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 03:53:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.