• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kio
fileundomanager.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
3 Copyright (C) 2006, 2008 David Faure <faure@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "fileundomanager.h"
22#include "fileundomanager_p.h"
23#include "clipboardupdater_p.h"
24#include "fileundomanager_adaptor.h"
25
26#include <kdatetime.h>
27#include <kdebug.h>
28#include <kdirnotify.h>
29#include <kglobal.h>
30#include <kio/copyjob.h>
31#include <kio/job.h>
32#include <kio/jobuidelegate.h>
33#include <klocale.h>
34#include <kmessagebox.h>
35#include <kjobtrackerinterface.h>
36
37#include <QtDBus/QtDBus>
38
39#include <assert.h>
40
41using namespace KIO;
42
43static const char* undoStateToString(UndoState state) {
44 static const char* const s_undoStateToString[] = { "MAKINGDIRS", "MOVINGFILES", "STATINGFILE", "REMOVINGDIRS", "REMOVINGLINKS" };
45 return s_undoStateToString[state];
46}
47
48static QDataStream &operator<<(QDataStream &stream, const KIO::BasicOperation &op)
49{
50 stream << op.m_valid << (qint8)op.m_type << op.m_renamed
51 << op.m_src << op.m_dst << op.m_target << (qint64)op.m_mtime;
52 return stream;
53}
54static QDataStream &operator>>(QDataStream &stream, BasicOperation &op)
55{
56 qint8 type;
57 qint64 mtime;
58 stream >> op.m_valid >> type >> op.m_renamed
59 >> op.m_src >> op.m_dst >> op.m_target >> mtime;
60 op.m_type = static_cast<BasicOperation::Type>(type);
61 op.m_mtime = mtime;
62 return stream;
63}
64
65static QDataStream &operator<<(QDataStream &stream, const UndoCommand &cmd)
66{
67 stream << cmd.m_valid << (qint8)cmd.m_type << cmd.m_opStack << cmd.m_src << cmd.m_dst;
68 return stream;
69}
70
71static QDataStream &operator>>(QDataStream &stream, UndoCommand &cmd)
72{
73 qint8 type;
74 stream >> cmd.m_valid >> type >> cmd.m_opStack >> cmd.m_src >> cmd.m_dst;
75 cmd.m_type = static_cast<FileUndoManager::CommandType>(type);
76 return stream;
77}
78
102class KIO::UndoJob : public KIO::Job
103{
104public:
105 UndoJob(bool showProgressInfo) : KIO::Job() {
106 if (showProgressInfo)
107 KIO::getJobTracker()->registerJob(this);
108 }
109 virtual ~UndoJob() {}
110
111 virtual void kill(bool) {
112 FileUndoManager::self()->d->stopUndo(true);
113 KIO::Job::doKill();
114 }
115
116 void emitCreatingDir(const KUrl &dir)
117 { emit description(this, i18n("Creating directory"),
118 qMakePair(i18n("Directory"), dir.prettyUrl())); }
119 void emitMoving(const KUrl &src, const KUrl &dest)
120 { emit description(this, i18n("Moving"),
121 qMakePair(i18nc("The source of a file operation", "Source"), src.prettyUrl()),
122 qMakePair(i18nc("The destination of a file operation", "Destination"), dest.prettyUrl())); }
123 void emitDeleting(const KUrl &url)
124 { emit description(this, i18n("Deleting"),
125 qMakePair(i18n("File"), url.prettyUrl())); }
126 void emitResult() { KIO::Job::emitResult(); }
127};
128
129CommandRecorder::CommandRecorder(FileUndoManager::CommandType op, const KUrl::List &src, const KUrl &dst, KIO::Job *job)
130 : QObject(job)
131{
132 m_cmd.m_type = op;
133 m_cmd.m_valid = true;
134 m_cmd.m_serialNumber = FileUndoManager::self()->newCommandSerialNumber();
135 m_cmd.m_src = src;
136 m_cmd.m_dst = dst;
137 connect(job, SIGNAL(result(KJob*)),
138 this, SLOT(slotResult(KJob*)));
139
140 // TODO whitelist, instead
141 if (op != FileUndoManager::Mkdir && op != FileUndoManager::Put) {
142 connect(job, SIGNAL(copyingDone(KIO::Job*,KUrl,KUrl,time_t,bool,bool)),
143 this, SLOT(slotCopyingDone(KIO::Job*,KUrl,KUrl,time_t,bool,bool)));
144 connect(job, SIGNAL(copyingLinkDone(KIO::Job*,KUrl,QString,KUrl)),
145 this, SLOT(slotCopyingLinkDone(KIO::Job*,KUrl,QString,KUrl)));
146 }
147}
148
149CommandRecorder::~CommandRecorder()
150{
151}
152
153void CommandRecorder::slotResult(KJob *job)
154{
155 if (job->error())
156 return;
157
158 FileUndoManager::self()->d->addCommand(m_cmd);
159}
160
161void CommandRecorder::slotCopyingDone(KIO::Job *job, const KUrl &from, const KUrl &to, time_t mtime, bool directory, bool renamed)
162{
163 BasicOperation op;
164 op.m_valid = true;
165 op.m_type = directory ? BasicOperation::Directory : BasicOperation::File;
166 op.m_renamed = renamed;
167 op.m_src = from;
168 op.m_dst = to;
169 op.m_mtime = mtime;
170
171 if (m_cmd.m_type == FileUndoManager::Trash)
172 {
173 Q_ASSERT(to.protocol() == "trash");
174 const QMap<QString, QString> metaData = job->metaData();
175 QMap<QString, QString>::ConstIterator it = metaData.find("trashURL-" + from.path());
176 if (it != metaData.constEnd()) {
177 // Update URL
178 op.m_dst = it.value();
179 }
180 }
181
182 m_cmd.m_opStack.prepend(op);
183}
184
185// TODO merge the signals?
186void CommandRecorder::slotCopyingLinkDone(KIO::Job *, const KUrl &from, const QString &target, const KUrl &to)
187{
188 BasicOperation op;
189 op.m_valid = true;
190 op.m_type = BasicOperation::Link;
191 op.m_renamed = false;
192 op.m_src = from;
193 op.m_target = target;
194 op.m_dst = to;
195 op.m_mtime = -1;
196 m_cmd.m_opStack.prepend(op);
197}
198
200
201class KIO::FileUndoManagerSingleton
202{
203public:
204 FileUndoManager self;
205};
206K_GLOBAL_STATIC(KIO::FileUndoManagerSingleton, globalFileUndoManager)
207
208FileUndoManager *FileUndoManager::self()
209{
210 return &globalFileUndoManager->self;
211}
212
213
214// m_nextCommandIndex is initialized to a high number so that konqueror can
215// assign low numbers to closed items loaded "on-demand" from a config file
216// in KonqClosedWindowsManager::readConfig and thus maintaining the real
217// order of the undo items.
218FileUndoManagerPrivate::FileUndoManagerPrivate(FileUndoManager* qq)
219 : m_uiInterface(new FileUndoManager::UiInterface()),
220 m_undoJob(0), m_nextCommandIndex(1000), q(qq)
221{
222 m_syncronized = initializeFromKDesky();
223 (void) new KIOFileUndoManagerAdaptor(this);
224 const QString dbusPath = "/FileUndoManager";
225 const QString dbusInterface = "org.kde.kio.FileUndoManager";
226
227 QDBusConnection dbus = QDBusConnection::sessionBus();
228 dbus.registerObject(dbusPath, this);
229 dbus.connect(QString(), dbusPath, dbusInterface, "lock", this, SLOT(slotLock()));
230 dbus.connect(QString(), dbusPath, dbusInterface, "pop", this, SLOT(slotPop()));
231 dbus.connect(QString(), dbusPath, dbusInterface, "push", this, SLOT(slotPush(QByteArray)));
232 dbus.connect(QString(), dbusPath, dbusInterface, "unlock", this, SLOT(slotUnlock()));
233}
234
235FileUndoManager::FileUndoManager()
236{
237 d = new FileUndoManagerPrivate(this);
238 d->m_lock = false;
239 d->m_currentJob = 0;
240}
241
242FileUndoManager::~FileUndoManager()
243{
244 delete d;
245}
246
247void FileUndoManager::recordJob(CommandType op, const KUrl::List &src, const KUrl &dst, KIO::Job *job)
248{
249 // This records what the job does and calls addCommand when done
250 (void) new CommandRecorder(op, src, dst, job);
251 emit jobRecordingStarted(op);
252}
253
254void FileUndoManager::recordCopyJob(KIO::CopyJob* copyJob)
255{
256 CommandType commandType;
257 switch (copyJob->operationMode()) {
258 case CopyJob::Copy:
259 commandType = Copy;
260 break;
261 case CopyJob::Move:
262 commandType = Move;
263 break;
264 case CopyJob::Link:
265 default: // prevent "wrong" compiler warning because of possibly uninitialized variable
266 commandType = Link;
267 break;
268 }
269 recordJob(commandType, copyJob->srcUrls(), copyJob->destUrl(), copyJob);
270}
271
272void FileUndoManagerPrivate::addCommand(const UndoCommand &cmd)
273{
274 broadcastPush(cmd);
275 emit q->jobRecordingFinished(cmd.m_type);
276}
277
278bool FileUndoManager::undoAvailable() const
279{
280 return (d->m_commands.count() > 0) && !d->m_lock;
281}
282
283QString FileUndoManager::undoText() const
284{
285 if (d->m_commands.isEmpty())
286 return i18n("Und&o");
287
288 FileUndoManager::CommandType t = d->m_commands.last().m_type;
289 switch(t) {
290 case FileUndoManager::Copy:
291 return i18n("Und&o: Copy");
292 case FileUndoManager::Link:
293 return i18n("Und&o: Link");
294 case FileUndoManager::Move:
295 return i18n("Und&o: Move");
296 case FileUndoManager::Rename:
297 return i18n("Und&o: Rename");
298 case FileUndoManager::Trash:
299 return i18n("Und&o: Trash");
300 case FileUndoManager::Mkdir:
301 return i18n("Und&o: Create Folder");
302 case FileUndoManager::Put:
303 return i18n("Und&o: Create File");
304 }
305 /* NOTREACHED */
306 return QString();
307}
308
309quint64 FileUndoManager::newCommandSerialNumber()
310{
311 return ++(d->m_nextCommandIndex);
312}
313
314quint64 FileUndoManager::currentCommandSerialNumber() const
315{
316 if(!d->m_commands.isEmpty())
317 {
318 const UndoCommand& cmd = d->m_commands.last();
319 assert(cmd.m_valid);
320 return cmd.m_serialNumber;
321 } else
322 return 0;
323}
324
325void FileUndoManager::undo()
326{
327 if (d->m_commands.isEmpty()) {
328 return;
329 }
330
331 // Make a copy of the command to undo before broadcastPop() pops it.
332 UndoCommand cmd = d->m_commands.last();
333 assert(cmd.m_valid);
334 d->m_current = cmd;
335
336 BasicOperation::Stack& opStack = d->m_current.m_opStack;
337 // Note that opStack is empty for simple operations like Mkdir.
338
339 // Let's first ask for confirmation if we need to delete any file (#99898)
340 KUrl::List fileCleanupStack;
341 BasicOperation::Stack::Iterator it = opStack.begin();
342 for (; it != opStack.end() ; ++it) {
343 BasicOperation::Type type = (*it).m_type;
344 if (type == BasicOperation::File && d->m_current.m_type == FileUndoManager::Copy) {
345 fileCleanupStack.append((*it).m_dst);
346 }
347 }
348 if (d->m_current.m_type == FileUndoManager::Mkdir || d->m_current.m_type == FileUndoManager::Put) {
349 fileCleanupStack.append(d->m_current.m_dst);
350 }
351 if (!fileCleanupStack.isEmpty()) {
352 if (!d->m_uiInterface->confirmDeletion(fileCleanupStack)) {
353 return;
354 }
355 }
356
357 d->broadcastPop();
358 d->broadcastLock();
359
360 d->m_dirCleanupStack.clear();
361 d->m_dirStack.clear();
362 d->m_dirsToUpdate.clear();
363
364 d->m_undoState = MOVINGFILES;
365
366 // Let's have a look at the basic operations we need to undo.
367 // While we're at it, collect all links that should be deleted.
368
369 it = opStack.begin();
370 while (it != opStack.end()) // don't cache end() here, erase modifies it
371 {
372 bool removeBasicOperation = false;
373 BasicOperation::Type type = (*it).m_type;
374 if (type == BasicOperation::Directory && !(*it).m_renamed)
375 {
376 // If any directory has to be created/deleted, we'll start with that
377 d->m_undoState = MAKINGDIRS;
378 // Collect all the dirs that have to be created in case of a move undo.
379 if (d->m_current.isMoveCommand())
380 d->m_dirStack.push((*it).m_src);
381 // Collect all dirs that have to be deleted
382 // from the destination in both cases (copy and move).
383 d->m_dirCleanupStack.prepend((*it).m_dst);
384 removeBasicOperation = true;
385 }
386 else if (type == BasicOperation::Link)
387 {
388 d->m_fileCleanupStack.prepend((*it).m_dst);
389
390 removeBasicOperation = !d->m_current.isMoveCommand();
391 }
392
393 if (removeBasicOperation)
394 it = opStack.erase(it);
395 else
396 ++it;
397 }
398
399 if (d->m_current.m_type == FileUndoManager::Put) {
400 d->m_fileCleanupStack.append(d->m_current.m_dst);
401 }
402
403 kDebug(1203) << "starting with" << undoStateToString(d->m_undoState);
404 d->m_undoJob = new UndoJob(d->m_uiInterface->showProgressInfo());
405 d->undoStep();
406}
407
408void FileUndoManagerPrivate::stopUndo(bool step)
409{
410 m_current.m_opStack.clear();
411 m_dirCleanupStack.clear();
412 m_fileCleanupStack.clear();
413 m_undoState = REMOVINGDIRS;
414 m_undoJob = 0;
415
416 if (m_currentJob)
417 m_currentJob->kill();
418
419 m_currentJob = 0;
420
421 if (step)
422 undoStep();
423}
424
425void FileUndoManagerPrivate::slotResult(KJob *job)
426{
427 m_currentJob = 0;
428 if (job->error())
429 {
430 m_uiInterface->jobError(static_cast<KIO::Job*>(job));
431 delete m_undoJob;
432 stopUndo(false);
433 }
434 else if (m_undoState == STATINGFILE)
435 {
436 BasicOperation op = m_current.m_opStack.last();
437 //kDebug(1203) << "stat result for " << op.m_dst;
438 KIO::StatJob* statJob = static_cast<KIO::StatJob*>(job);
439 time_t mtime = statJob->statResult().numberValue(KIO::UDSEntry::UDS_MODIFICATION_TIME, -1);
440 if (mtime != op.m_mtime) {
441 kDebug(1203) << op.m_dst << " was modified after being copied!";
442 KDateTime srcTime; srcTime.setTime_t(op.m_mtime); srcTime = srcTime.toLocalZone();
443 KDateTime destTime; destTime.setTime_t(mtime); destTime = destTime.toLocalZone();
444 if (!m_uiInterface->copiedFileWasModified(op.m_src, op.m_dst, srcTime, destTime)) {
445 stopUndo(false);
446 }
447 }
448 }
449
450 undoStep();
451}
452
453
454void FileUndoManagerPrivate::addDirToUpdate(const KUrl& url)
455{
456 if (!m_dirsToUpdate.contains(url))
457 m_dirsToUpdate.prepend(url);
458}
459
460void FileUndoManagerPrivate::undoStep()
461{
462 m_currentJob = 0;
463
464 if (m_undoState == MAKINGDIRS)
465 stepMakingDirectories();
466
467 if (m_undoState == MOVINGFILES || m_undoState == STATINGFILE)
468 stepMovingFiles();
469
470 if (m_undoState == REMOVINGLINKS)
471 stepRemovingLinks();
472
473 if (m_undoState == REMOVINGDIRS)
474 stepRemovingDirectories();
475
476 if (m_currentJob) {
477 if (m_uiInterface)
478 m_currentJob->ui()->setWindow(m_uiInterface->parentWidget());
479 QObject::connect(m_currentJob, SIGNAL(result(KJob*)),
480 this, SLOT(slotResult(KJob*)));
481 }
482}
483
484void FileUndoManagerPrivate::stepMakingDirectories()
485{
486 if (!m_dirStack.isEmpty()) {
487 KUrl dir = m_dirStack.pop();
488 kDebug(1203) << "creatingDir" << dir;
489 m_currentJob = KIO::mkdir(dir);
490 m_undoJob->emitCreatingDir(dir);
491 }
492 else
493 m_undoState = MOVINGFILES;
494}
495
496// Misnamed method: It moves files back, but it also
497// renames directories back, recreates symlinks,
498// deletes copied files, and restores trashed files.
499void FileUndoManagerPrivate::stepMovingFiles()
500{
501 if (!m_current.m_opStack.isEmpty())
502 {
503 BasicOperation op = m_current.m_opStack.last();
504 BasicOperation::Type type = op.m_type;
505
506 assert(op.m_valid);
507 if (type == BasicOperation::Directory)
508 {
509 if (op.m_renamed)
510 {
511 kDebug(1203) << "rename" << op.m_dst << op.m_src;
512 m_currentJob = KIO::rename(op.m_dst, op.m_src, KIO::HideProgressInfo);
513 m_undoJob->emitMoving(op.m_dst, op.m_src);
514 }
515 else
516 assert(0); // this should not happen!
517 }
518 else if (type == BasicOperation::Link)
519 {
520 kDebug(1203) << "symlink" << op.m_target << op.m_src;
521 m_currentJob = KIO::symlink(op.m_target, op.m_src, KIO::Overwrite | KIO::HideProgressInfo);
522 }
523 else if (m_current.m_type == FileUndoManager::Copy)
524 {
525 if (m_undoState == MOVINGFILES) // dest not stat'ed yet
526 {
527 // Before we delete op.m_dst, let's check if it was modified (#20532)
528 kDebug(1203) << "stat" << op.m_dst;
529 m_currentJob = KIO::stat(op.m_dst, KIO::HideProgressInfo);
530 m_undoState = STATINGFILE; // temporarily
531 return; // no pop() yet, we'll finish the work in slotResult
532 }
533 else // dest was stat'ed, and the deletion was approved in slotResult
534 {
535 m_currentJob = KIO::file_delete(op.m_dst, KIO::HideProgressInfo);
536 m_undoJob->emitDeleting(op.m_dst);
537 m_undoState = MOVINGFILES;
538 }
539 }
540 else if (m_current.isMoveCommand()
541 || m_current.m_type == FileUndoManager::Trash)
542 {
543 kDebug(1203) << "file_move" << op.m_dst << op.m_src;
544 m_currentJob = KIO::file_move(op.m_dst, op.m_src, -1, KIO::Overwrite | KIO::HideProgressInfo);
545 KIO::ClipboardUpdater::create(m_currentJob, KIO::ClipboardUpdater::UpdateContent);
546 m_undoJob->emitMoving(op.m_dst, op.m_src);
547 }
548
549 m_current.m_opStack.removeLast();
550 // The above KIO jobs are lowlevel, they don't trigger KDirNotify notification
551 // So we need to do it ourselves (but schedule it to the end of the undo, to compress them)
552 KUrl url(op.m_dst);
553 url.setPath(url.directory());
554 addDirToUpdate(url);
555
556 url = op.m_src;
557 url.setPath(url.directory());
558 addDirToUpdate(url);
559 }
560 else
561 m_undoState = REMOVINGLINKS;
562}
563
564void FileUndoManagerPrivate::stepRemovingLinks()
565{
566 kDebug(1203) << "REMOVINGLINKS";
567 if (!m_fileCleanupStack.isEmpty())
568 {
569 KUrl file = m_fileCleanupStack.pop();
570 kDebug(1203) << "file_delete" << file;
571 m_currentJob = KIO::file_delete(file, KIO::HideProgressInfo);
572 m_undoJob->emitDeleting(file);
573
574 KUrl url(file);
575 url.setPath(url.directory());
576 addDirToUpdate(url);
577 }
578 else
579 {
580 m_undoState = REMOVINGDIRS;
581
582 if (m_dirCleanupStack.isEmpty() && m_current.m_type == FileUndoManager::Mkdir)
583 m_dirCleanupStack << m_current.m_dst;
584 }
585}
586
587void FileUndoManagerPrivate::stepRemovingDirectories()
588{
589 if (!m_dirCleanupStack.isEmpty())
590 {
591 KUrl dir = m_dirCleanupStack.pop();
592 kDebug(1203) << "rmdir" << dir;
593 m_currentJob = KIO::rmdir(dir);
594 m_undoJob->emitDeleting(dir);
595 addDirToUpdate(dir);
596 }
597 else
598 {
599 m_current.m_valid = false;
600 m_currentJob = 0;
601 if (m_undoJob)
602 {
603 kDebug(1203) << "deleting undojob";
604 m_undoJob->emitResult();
605 m_undoJob = 0;
606 }
607 QList<KUrl>::ConstIterator it = m_dirsToUpdate.constBegin();
608 for(; it != m_dirsToUpdate.constEnd(); ++it) {
609 kDebug() << "Notifying FilesAdded for " << *it;
610 org::kde::KDirNotify::emitFilesAdded((*it).url());
611 }
612 emit q->undoJobFinished();
613 broadcastUnlock();
614 }
615}
616
617// const ref doesn't work due to QDataStream
618void FileUndoManagerPrivate::slotPush(QByteArray data)
619{
620 QDataStream strm(&data, QIODevice::ReadOnly);
621 UndoCommand cmd;
622 strm >> cmd;
623 pushCommand(cmd);
624}
625
626void FileUndoManagerPrivate::pushCommand(const UndoCommand& cmd)
627{
628 m_commands.append(cmd);
629 emit q->undoAvailable(true);
630 emit q->undoTextChanged(q->undoText());
631}
632
633void FileUndoManagerPrivate::slotPop()
634{
635 m_commands.removeLast();
636 emit q->undoAvailable(q->undoAvailable());
637 emit q->undoTextChanged(q->undoText());
638}
639
640void FileUndoManagerPrivate::slotLock()
641{
642// assert(!m_lock);
643 m_lock = true;
644 emit q->undoAvailable(q->undoAvailable());
645}
646
647void FileUndoManagerPrivate::slotUnlock()
648{
649// assert(m_lock);
650 m_lock = false;
651 emit q->undoAvailable(q->undoAvailable());
652}
653
654QByteArray FileUndoManagerPrivate::get() const
655{
656 QByteArray data;
657 QDataStream stream(&data, QIODevice::WriteOnly);
658 stream << m_commands;
659 return data;
660}
661
662void FileUndoManagerPrivate::broadcastPush(const UndoCommand &cmd)
663{
664 if (!m_syncronized) {
665 pushCommand(cmd);
666 return;
667 }
668
669 QByteArray data;
670 QDataStream stream(&data, QIODevice::WriteOnly);
671 stream << cmd;
672 emit push(data); // DBUS signal
673}
674
675void FileUndoManagerPrivate::broadcastPop()
676{
677 if (!m_syncronized) {
678 slotPop();
679 return;
680 }
681
682 emit pop(); // DBUS signal
683}
684
685void FileUndoManagerPrivate::broadcastLock()
686{
687// assert(!m_lock);
688
689 if (!m_syncronized) {
690 slotLock();
691 return;
692 }
693 emit lock(); // DBUS signal
694}
695
696void FileUndoManagerPrivate::broadcastUnlock()
697{
698// assert(m_lock);
699
700 if (!m_syncronized) {
701 slotUnlock();
702 return;
703 }
704 emit unlock(); // DBUS signal
705}
706
707bool FileUndoManagerPrivate::initializeFromKDesky()
708{
709 // ### workaround for dcop problem and upcoming 2.1 release:
710 // in case of huge io operations the amount of data sent over
711 // dcop (containing undo information broadcasted for global undo
712 // to all konqueror instances) can easily exceed the 64kb limit
713 // of dcop. In order not to run into trouble we disable global
714 // undo for now! (Simon)
715 // ### FIXME: post 2.1
716 // TODO KDE4: port to DBUS and test
717 return false;
718#if 0
719 DCOPClient *client = kapp->dcopClient();
720
721 if (client->appId() == "kdesktop") // we are master :)
722 return true;
723
724 if (!client->isApplicationRegistered("kdesktop"))
725 return false;
726
727 d->m_commands = DCOPRef("kdesktop", "FileUndoManager").call("get");
728 return true;
729#endif
730}
731
732void FileUndoManager::setUiInterface(UiInterface* ui)
733{
734 delete d->m_uiInterface;
735 d->m_uiInterface = ui;
736}
737
738FileUndoManager::UiInterface* FileUndoManager::uiInterface() const
739{
740 return d->m_uiInterface;
741}
742
744
745class FileUndoManager::UiInterface::UiInterfacePrivate
746{
747public:
748 UiInterfacePrivate()
749 : m_parentWidget(0), m_showProgressInfo(true)
750 {}
751 QWidget* m_parentWidget;
752 bool m_showProgressInfo;
753};
754
755FileUndoManager::UiInterface::UiInterface()
756 : d(new UiInterfacePrivate)
757{
758}
759
760FileUndoManager::UiInterface::~UiInterface()
761{
762 delete d;
763}
764
765void FileUndoManager::UiInterface::jobError(KIO::Job* job)
766{
767 job->ui()->showErrorMessage();
768}
769
770bool FileUndoManager::UiInterface::copiedFileWasModified(const KUrl& src, const KUrl& dest, const KDateTime& srcTime, const KDateTime& destTime)
771{
772 Q_UNUSED(srcTime); // not sure it should appear in the msgbox
773 // Possible improvement: only show the time if date is today
774 const QString timeStr = KGlobal::locale()->formatDateTime(destTime, KLocale::ShortDate);
775 return KMessageBox::warningContinueCancel(
776 d->m_parentWidget,
777 i18n("The file %1 was copied from %2, but since then it has apparently been modified at %3.\n"
778 "Undoing the copy will delete the file, and all modifications will be lost.\n"
779 "Are you sure you want to delete %4?", dest.pathOrUrl(), src.pathOrUrl(), timeStr, dest.pathOrUrl()),
780 i18n("Undo File Copy Confirmation"),
781 KStandardGuiItem::cont(),
782 KStandardGuiItem::cancel(),
783 QString(),
784 KMessageBox::Notify | KMessageBox::Dangerous) == KMessageBox::Continue;
785}
786
787bool FileUndoManager::UiInterface::confirmDeletion(const KUrl::List& files)
788{
789 KIO::JobUiDelegate uiDelegate;
790 uiDelegate.setWindow(d->m_parentWidget);
791 // Because undo can happen with an accidental Ctrl-Z, we want to always confirm.
792 return uiDelegate.askDeleteConfirmation(files, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::ForceConfirmation);
793}
794
795QWidget* FileUndoManager::UiInterface::parentWidget() const
796{
797 return d->m_parentWidget;
798}
799
800void FileUndoManager::UiInterface::setParentWidget(QWidget* parentWidget)
801{
802 d->m_parentWidget = parentWidget;
803}
804
805void FileUndoManager::UiInterface::setShowProgressInfo(bool b)
806{
807 d->m_showProgressInfo = b;
808}
809
810bool FileUndoManager::UiInterface::showProgressInfo() const
811{
812 return d->m_showProgressInfo;
813}
814
815void FileUndoManager::UiInterface::virtual_hook(int, void*)
816{
817}
818
819#include "fileundomanager_p.moc"
820#include "fileundomanager.moc"
KDateTime
KDateTime::setTime_t
void setTime_t(qint64 seconds)
KDateTime::toLocalZone
KDateTime toLocalZone() const
KDialogJobUiDelegate::showErrorMessage
virtual void showErrorMessage()
KIO::ClipboardUpdater::UpdateContent
@ UpdateContent
Definition: clipboardupdater_p.h:55
KIO::ClipboardUpdater::create
static ClipboardUpdater * create(Job *job, Mode mode)
Returns an instance of clipboard updater if QApplication::type() does not return a tty.
Definition: clipboardupdater.cpp:162
KIO::CommandRecorder::~CommandRecorder
virtual ~CommandRecorder()
Definition: fileundomanager.cpp:149
KIO::CommandRecorder::CommandRecorder
CommandRecorder(FileUndoManager::CommandType op, const KUrl::List &src, const KUrl &dst, KIO::Job *job)
Definition: fileundomanager.cpp:129
KIO::CopyJob
CopyJob is used to move, copy or symlink files and directories.
Definition: copyjob.h:65
KIO::CopyJob::srcUrls
KUrl::List srcUrls() const
Returns the list of source URLs.
Definition: copyjob.cpp:267
KIO::CopyJob::Move
@ Move
Definition: copyjob.h:73
KIO::CopyJob::Copy
@ Copy
Definition: copyjob.h:73
KIO::CopyJob::Link
@ Link
Definition: copyjob.h:73
KIO::CopyJob::operationMode
CopyMode operationMode() const
Returns the mode of the operation (copy, move, or link), depending on whether KIO::copy(),...
Definition: copyjob.cpp:2142
KIO::CopyJob::destUrl
KUrl destUrl() const
Returns the destination URL.
Definition: copyjob.cpp:272
KIO::FileUndoManagerPrivate::m_undoState
UndoState m_undoState
Definition: fileundomanager_p.h:147
KIO::FileUndoManagerPrivate::stopUndo
void stopUndo(bool step)
called by UndoJob
Definition: fileundomanager.cpp:408
KIO::FileUndoManagerPrivate::get
QByteArray get() const
called by FileUndoManagerAdaptor
Definition: fileundomanager.cpp:654
KIO::FileUndoManagerPrivate::m_dirsToUpdate
QList< KUrl > m_dirsToUpdate
Definition: fileundomanager_p.h:151
KIO::FileUndoManagerPrivate::m_uiInterface
FileUndoManager::UiInterface * m_uiInterface
Definition: fileundomanager_p.h:152
KIO::FileUndoManagerPrivate::broadcastPush
void broadcastPush(const UndoCommand &cmd)
Definition: fileundomanager.cpp:662
KIO::FileUndoManagerPrivate::slotUnlock
void slotUnlock()
Definition: fileundomanager.cpp:647
KIO::FileUndoManagerPrivate::FileUndoManagerPrivate
FileUndoManagerPrivate(FileUndoManager *qq)
Definition: fileundomanager.cpp:218
KIO::FileUndoManagerPrivate::addDirToUpdate
void addDirToUpdate(const KUrl &url)
Definition: fileundomanager.cpp:454
KIO::FileUndoManagerPrivate::slotLock
void slotLock()
Definition: fileundomanager.cpp:640
KIO::FileUndoManagerPrivate::initializeFromKDesky
bool initializeFromKDesky()
Definition: fileundomanager.cpp:707
KIO::FileUndoManagerPrivate::stepRemovingDirectories
void stepRemovingDirectories()
Definition: fileundomanager.cpp:587
KIO::FileUndoManagerPrivate::m_syncronized
bool m_syncronized
Definition: fileundomanager_p.h:140
KIO::FileUndoManagerPrivate::undoStep
void undoStep()
Definition: fileundomanager.cpp:460
KIO::FileUndoManagerPrivate::lock
void lock()
DBUS signal.
KIO::FileUndoManagerPrivate::push
void push(const QByteArray &command)
DBUS signal.
KIO::FileUndoManagerPrivate::q
FileUndoManager * q
Definition: fileundomanager_p.h:157
KIO::FileUndoManagerPrivate::broadcastLock
void broadcastLock()
Definition: fileundomanager.cpp:685
KIO::FileUndoManagerPrivate::slotResult
void slotResult(KJob *)
Definition: fileundomanager.cpp:425
KIO::FileUndoManagerPrivate::m_dirStack
QStack< KUrl > m_dirStack
Definition: fileundomanager_p.h:148
KIO::FileUndoManagerPrivate::pushCommand
void pushCommand(const UndoCommand &cmd)
Definition: fileundomanager.cpp:626
KIO::FileUndoManagerPrivate::stepRemovingLinks
void stepRemovingLinks()
Definition: fileundomanager.cpp:564
KIO::FileUndoManagerPrivate::stepMakingDirectories
void stepMakingDirectories()
Definition: fileundomanager.cpp:484
KIO::FileUndoManagerPrivate::m_dirCleanupStack
QStack< KUrl > m_dirCleanupStack
Definition: fileundomanager_p.h:149
KIO::FileUndoManagerPrivate::m_currentJob
KIO::Job * m_currentJob
Definition: fileundomanager_p.h:146
KIO::FileUndoManagerPrivate::broadcastUnlock
void broadcastUnlock()
Definition: fileundomanager.cpp:696
KIO::FileUndoManagerPrivate::slotPush
void slotPush(QByteArray)
Definition: fileundomanager.cpp:618
KIO::FileUndoManagerPrivate::m_fileCleanupStack
QStack< KUrl > m_fileCleanupStack
Definition: fileundomanager_p.h:150
KIO::FileUndoManagerPrivate::slotPop
void slotPop()
Definition: fileundomanager.cpp:633
KIO::FileUndoManagerPrivate::addCommand
void addCommand(const UndoCommand &cmd)
called by UndoCommandRecorder
Definition: fileundomanager.cpp:272
KIO::FileUndoManagerPrivate::m_commands
UndoCommand::Stack m_commands
Definition: fileundomanager_p.h:143
KIO::FileUndoManagerPrivate::m_undoJob
UndoJob * m_undoJob
Definition: fileundomanager_p.h:154
KIO::FileUndoManagerPrivate::broadcastPop
void broadcastPop()
Definition: fileundomanager.cpp:675
KIO::FileUndoManagerPrivate::m_nextCommandIndex
quint64 m_nextCommandIndex
Definition: fileundomanager_p.h:155
KIO::FileUndoManagerPrivate::stepMovingFiles
void stepMovingFiles()
Definition: fileundomanager.cpp:499
KIO::FileUndoManagerPrivate::m_current
UndoCommand m_current
Definition: fileundomanager_p.h:145
KIO::FileUndoManagerPrivate::m_lock
bool m_lock
Definition: fileundomanager_p.h:141
KIO::FileUndoManagerPrivate::unlock
void unlock()
DBUS signal.
KIO::FileUndoManagerPrivate::pop
void pop()
DBUS signal.
KIO::FileUndoManager::UiInterface
Interface for the gui handling of FileUndoManager.
Definition: fileundomanager.h:64
KIO::FileUndoManager::UiInterface::parentWidget
QWidget * parentWidget() const
Definition: fileundomanager.cpp:795
KIO::FileUndoManager::UiInterface::setShowProgressInfo
void setShowProgressInfo(bool b)
Sets whether to show progress info when running the KIO jobs for undoing.
Definition: fileundomanager.cpp:805
KIO::FileUndoManager::UiInterface::confirmDeletion
virtual bool confirmDeletion(const KUrl::List &files)
Called when we are about to remove those files.
Definition: fileundomanager.cpp:787
KIO::FileUndoManager::UiInterface::~UiInterface
virtual ~UiInterface()
Definition: fileundomanager.cpp:760
KIO::FileUndoManager::UiInterface::copiedFileWasModified
virtual bool copiedFileWasModified(const KUrl &src, const KUrl &dest, const KDateTime &srcTime, const KDateTime &destTime)
Called when dest was modified since it was copied from src.
Definition: fileundomanager.cpp:770
KIO::FileUndoManager::UiInterface::jobError
virtual void jobError(KIO::Job *job)
Called when an undo job errors; default implementation displays a message box.
Definition: fileundomanager.cpp:765
KIO::FileUndoManager::UiInterface::UiInterface
UiInterface()
Definition: fileundomanager.cpp:755
KIO::FileUndoManager::UiInterface::virtual_hook
virtual void virtual_hook(int id, void *data)
Definition: fileundomanager.cpp:815
KIO::FileUndoManager::UiInterface::setParentWidget
void setParentWidget(QWidget *parentWidget)
Sets the parent widget to use for message boxes.
Definition: fileundomanager.cpp:800
KIO::FileUndoManager::UiInterface::showProgressInfo
bool showProgressInfo() const
Definition: fileundomanager.cpp:810
KIO::FileUndoManager
FileUndoManager: makes it possible to undo kio jobs.
Definition: fileundomanager.h:45
KIO::FileUndoManager::CommandRecorder
friend class CommandRecorder
Definition: fileundomanager.h:211
KIO::FileUndoManager::recordCopyJob
void recordCopyJob(KIO::CopyJob *copyJob)
Record this CopyJob while it's happening and add a command for it so that the user can undo it.
Definition: fileundomanager.cpp:254
KIO::FileUndoManager::undoJobFinished
void undoJobFinished()
Emitted when an undo job finishes. Used for unit testing.
KIO::FileUndoManager::FileUndoManagerPrivate
friend class FileUndoManagerPrivate
Definition: fileundomanager.h:213
KIO::FileUndoManager::jobRecordingFinished
void jobRecordingFinished(CommandType op)
Emitted when a job that has been recorded by FileUndoManager::recordJob() or FileUndoManager::recordC...
KIO::FileUndoManager::self
static FileUndoManager * self()
Definition: fileundomanager.cpp:208
KIO::FileUndoManager::recordJob
void recordJob(CommandType op, const KUrl::List &src, const KUrl &dst, KIO::Job *job)
Record this job while it's happening and add a command for it so that the user can undo it.
Definition: fileundomanager.cpp:247
KIO::FileUndoManager::undoAvailable
bool undoAvailable() const
Definition: fileundomanager.cpp:278
KIO::FileUndoManager::newCommandSerialNumber
quint64 newCommandSerialNumber()
These two functions are useful when wrapping FileUndoManager and adding custom commands.
Definition: fileundomanager.cpp:309
KIO::FileUndoManager::setUiInterface
void setUiInterface(UiInterface *ui)
Set a new UiInterface implementation.
Definition: fileundomanager.cpp:732
KIO::FileUndoManager::UndoJob
friend class UndoJob
Definition: fileundomanager.h:210
KIO::FileUndoManager::undoText
QString undoText() const
Definition: fileundomanager.cpp:283
KIO::FileUndoManager::jobRecordingStarted
void jobRecordingStarted(CommandType op)
Emitted when a job recording has been started by FileUndoManager::recordJob() or FileUndoManager::rec...
KIO::FileUndoManager::undoTextChanged
void undoTextChanged(const QString &text)
Emitted when the value of undoText() changes.
KIO::FileUndoManager::uiInterface
UiInterface * uiInterface() const
Definition: fileundomanager.cpp:738
KIO::FileUndoManager::undo
void undo()
Undoes the last command Remember to call uiInterface()->setParentWidget(parentWidget) first,...
Definition: fileundomanager.cpp:325
KIO::FileUndoManager::currentCommandSerialNumber
quint64 currentCommandSerialNumber() const
Definition: fileundomanager.cpp:314
KIO::FileUndoManager::CommandType
CommandType
The type of job.
Definition: fileundomanager.h:135
KIO::FileUndoManager::Move
@ Move
Definition: fileundomanager.h:135
KIO::FileUndoManager::Mkdir
@ Mkdir
Definition: fileundomanager.h:135
KIO::FileUndoManager::Put
@ Put
Definition: fileundomanager.h:135
KIO::FileUndoManager::Rename
@ Rename
Definition: fileundomanager.h:135
KIO::FileUndoManager::Copy
@ Copy
Definition: fileundomanager.h:135
KIO::FileUndoManager::Trash
@ Trash
Definition: fileundomanager.h:135
KIO::FileUndoManager::Link
@ Link
Definition: fileundomanager.h:135
KIO::JobUiDelegate
A UI delegate tuned to be used with KIO Jobs.
Definition: jobuidelegate.h:40
KIO::JobUiDelegate::askDeleteConfirmation
bool askDeleteConfirmation(const KUrl::List &urls, DeletionType deletionType, ConfirmationType confirmationType)
Ask for confirmation before deleting/trashing urls.
Definition: jobuidelegate.cpp:108
KIO::JobUiDelegate::ForceConfirmation
@ ForceConfirmation
Definition: jobuidelegate.h:116
KIO::JobUiDelegate::Delete
@ Delete
Definition: jobuidelegate.h:109
KIO::JobUiDelegate::setWindow
virtual void setWindow(QWidget *window)
Associate this job with a window given by window.
Definition: jobuidelegate.cpp:58
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KIO::Job::doKill
virtual bool doKill()
Abort this job.
Definition: job.cpp:175
KIO::Job::ui
JobUiDelegate * ui() const
Retrieves the UI delegate of this job.
Definition: job.cpp:90
KIO::Job::metaData
MetaData metaData() const
Get meta data received from the slave.
Definition: job.cpp:248
KIO::StatJob
A KIO job that retrieves information about a file or directory.
Definition: jobclasses.h:440
KIO::StatJob::statResult
const UDSEntry & statResult() const
Result of the stat operation.
Definition: job.cpp:839
KIO::UDSEntry::numberValue
long long numberValue(uint field, long long defaultValue=0) const
Definition: udsentry.cpp:78
KIO::UDSEntry::UDS_MODIFICATION_TIME
@ UDS_MODIFICATION_TIME
The last time the file was modified.
Definition: udsentry.h:173
KIO::UndoCommand
Definition: fileundomanager_p.h:56
KIO::UndoCommand::m_valid
bool m_valid
Definition: fileundomanager_p.h:68
KIO::UndoCommand::m_serialNumber
quint64 m_serialNumber
Definition: fileundomanager_p.h:74
KIO::UndoCommand::m_type
FileUndoManager::CommandType m_type
Definition: fileundomanager_p.h:70
KIO::UndoCommand::m_dst
KUrl m_dst
Definition: fileundomanager_p.h:73
KIO::UndoCommand::isMoveCommand
bool isMoveCommand() const
Definition: fileundomanager_p.h:66
KIO::UndoCommand::m_opStack
BasicOperation::Stack m_opStack
Definition: fileundomanager_p.h:71
KIO::UndoCommand::m_src
KUrl::List m_src
Definition: fileundomanager_p.h:72
KJobTrackerInterface::registerJob
virtual void registerJob(KJob *job)
KJob
KJob::emitResult
void emitResult()
KJob::error
int error() const
KJob::description
void description(KJob *job, const QString &title, const QPair< QString, QString > &field1=qMakePair(QString(), QString()), const QPair< QString, QString > &field2=qMakePair(QString(), QString()))
KJob::kill
bool kill(KillVerbosity verbosity=Quietly)
KLocale::formatDateTime
QString formatDateTime(const KDateTime &dateTime, DateFormat format=ShortDate, DateTimeFormatOptions options=0) const
KLocale::ShortDate
ShortDate
KMessageBox::warningContinueCancel
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
KMessageBox::Continue
Continue
KMessageBox::Notify
Notify
KMessageBox::Dangerous
Dangerous
KUrl::List
KUrl
KUrl::pathOrUrl
QString pathOrUrl() const
KUrl::prettyUrl
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
KUrl::path
QString path(AdjustPathOption trailing=LeaveTrailingSlash) const
KUrl::directory
QString directory(const DirectoryOptions &options=IgnoreTrailingSlash) const
KUrl::setPath
void setPath(const QString &path)
KUrl::protocol
QString protocol() const
OrgKdeKDirNotifyInterface::emitFilesAdded
static void emitFilesAdded(const QString &directory)
Definition: kdirnotify.cpp:47
QList< BasicOperation >
QMap
QObject
QWidget
clipboardupdater_p.h
copyjob.h
operator>>
static QDataStream & operator>>(QDataStream &stream, BasicOperation &op)
Definition: fileundomanager.cpp:54
operator<<
static QDataStream & operator<<(QDataStream &stream, const KIO::BasicOperation &op)
Definition: fileundomanager.cpp:48
undoStateToString
static const char * undoStateToString(UndoState state)
Definition: fileundomanager.cpp:43
fileundomanager.h
fileundomanager_p.h
K_GLOBAL_STATIC
#define K_GLOBAL_STATIC(TYPE, NAME)
kDebug
#define kDebug
job.h
jobuidelegate.h
kapp
#define kapp
kdatetime.h
kdebug.h
kdirnotify.h
kglobal.h
kjobtrackerinterface.h
klocale.h
i18n
QString i18n(const char *text)
i18nc
QString i18nc(const char *ctxt, const char *text)
kmessagebox.h
KGlobal::locale
KLocale * locale()
KIO
A namespace for KIO globals.
Definition: kbookmarkmenu.h:55
KIO::rmdir
SimpleJob * rmdir(const KUrl &url)
Removes a single directory.
Definition: job.cpp:704
KIO::UndoState
UndoState
Definition: fileundomanager_p.h:97
KIO::MAKINGDIRS
@ MAKINGDIRS
Definition: fileundomanager_p.h:97
KIO::REMOVINGDIRS
@ REMOVINGDIRS
Definition: fileundomanager_p.h:97
KIO::MOVINGFILES
@ MOVINGFILES
Definition: fileundomanager_p.h:97
KIO::STATINGFILE
@ STATINGFILE
Definition: fileundomanager_p.h:97
KIO::REMOVINGLINKS
@ REMOVINGLINKS
Definition: fileundomanager_p.h:97
KIO::stat
StatJob * stat(const KUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
Definition: job.cpp:924
KIO::file_move
FileCopyJob * file_move(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
Move a single file.
Definition: job.cpp:2479
KIO::mkdir
SimpleJob * mkdir(const KUrl &url, int permissions=-1)
Creates a single directory.
Definition: job.cpp:697
KIO::rename
SimpleJob * rename(const KUrl &src, const KUrl &dest, JobFlags flags=DefaultFlags)
Rename a file or directory.
Definition: job.cpp:731
KIO::file_delete
SimpleJob * file_delete(const KUrl &src, JobFlags flags=DefaultFlags)
Delete a single file.
Definition: job.cpp:2487
KIO::HideProgressInfo
@ HideProgressInfo
Hide progress information dialog, i.e.
Definition: jobclasses.h:51
KIO::Overwrite
@ Overwrite
When set, automatically overwrite the destination if it exists already.
Definition: jobclasses.h:67
KIO::getJobTracker
KJobTrackerInterface * getJobTracker()
Definition: global.cpp:1246
KIO::symlink
SimpleJob * symlink(const QString &target, const KUrl &dest, JobFlags flags=DefaultFlags)
Create or move a symlink.
Definition: job.cpp:738
KRecentDirs::dir
QString dir(const QString &fileClass)
Returns the most recently used directory accociated with this file-class.
Definition: krecentdirs.cpp:68
KStandardGuiItem::cont
KGuiItem cont()
KStandardGuiItem::cancel
KGuiItem cancel()
KIO::BasicOperation
Definition: fileundomanager_p.h:37
KIO::BasicOperation::m_type
Type m_type
Definition: fileundomanager_p.h:47
KIO::BasicOperation::m_src
KUrl m_src
Definition: fileundomanager_p.h:49
KIO::BasicOperation::m_dst
KUrl m_dst
Definition: fileundomanager_p.h:50
KIO::BasicOperation::m_renamed
bool m_renamed
Definition: fileundomanager_p.h:44
KIO::BasicOperation::m_target
QString m_target
Definition: fileundomanager_p.h:51
KIO::BasicOperation::m_mtime
time_t m_mtime
Definition: fileundomanager_p.h:52
KIO::BasicOperation::Type
Type
Definition: fileundomanager_p.h:46
KIO::BasicOperation::Directory
@ Directory
Definition: fileundomanager_p.h:46
KIO::BasicOperation::Link
@ Link
Definition: fileundomanager_p.h:46
KIO::BasicOperation::File
@ File
Definition: fileundomanager_p.h:46
KIO::BasicOperation::m_valid
bool m_valid
Definition: fileundomanager_p.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal