KIO

emptytrashjob.cpp
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2014 David Faure <faure@kde.org>
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
13using namespace KIO;
14
15class KIO::EmptyTrashJobPrivate : public SimpleJobPrivate
16{
17public:
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
33EmptyTrashJob::EmptyTrashJob(EmptyTrashJobPrivate &dd)
34 : SimpleJob(dd)
35{
36}
37
38EmptyTrashJob::~EmptyTrashJob()
39{
40}
41
42// TODO KF6: remove this
47
49{
50 KIO_ARGS << int(1);
51 return EmptyTrashJobPrivate::newJob(CMD_SPECIAL, packedArgs);
52}
53
54#include "moc_emptytrashjob.cpp"
A KIO job for emptying the trash.
void slotFinished() override
Called when the worker marks the job as finished.
A simple job (one url and one command).
virtual void slotFinished()
Called when the worker marks the job as finished.
void setUiDelegate(KJobUiDelegate *delegate)
A namespace for KIO globals.
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.