File indexing completed on 2024-06-16 10:04:58

0001 /*
0002     This file is part of KDE
0003     SPDX-FileCopyrightText: 2006, 2008 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef FILEUNDOMANAGERTEST_H
0009 #define FILEUNDOMANAGERTEST_H
0010 
0011 #include <QObject>
0012 class TestUiInterface;
0013 
0014 class FileUndoManagerTest : public QObject
0015 {
0016     Q_OBJECT
0017 private Q_SLOTS:
0018     void initTestCase();
0019     void cleanupTestCase();
0020     void testCopyFiles();
0021     void testMoveFiles();
0022     void testCopyDirectory();
0023     void testCopyEmptyDirectory();
0024     void testMoveDirectory();
0025     void testRenameFile();
0026     void testRenameDir();
0027     void testTrashFiles();
0028     void testRestoreTrashedFiles();
0029     void testModifyFileBeforeUndo(); // #20532
0030     void testCreateSymlink();
0031     void testCreateDir();
0032     void testMkpath();
0033     void testPasteClipboardUndo(); // #318757
0034     void testBatchRename();
0035     void testUndoCopyOfDeletedFile();
0036     void testErrorDuringMoveUndo();
0037     void testNoUndoForSkipAll();
0038 
0039     // TODO test renaming during a CopyJob.
0040     // Doesn't seem possible though, requires user interaction...
0041 
0042     // TODO: add test for undoing after a partial move (http://bugs.kde.org/show_bug.cgi?id=91579)
0043     // Difficult too.
0044 
0045 private:
0046     void doUndo();
0047     TestUiInterface *m_uiInterface;
0048 };
0049 
0050 #endif