summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-11 10:34:30 (GMT)
committerElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-11 15:02:06 (GMT)
commit75703351bac6170b5a51535a9f1b70abcbfb02af (patch)
tree70e33dd148fef4a4c55dbcdef99a8b47feec6d39
parent6b5739b698f711fca4428bd1ca663cb0c0fbed38 (diff)
Switch to QVector for list of entries
We never prepend to QList, so there is no reason for not using the more efficient QVector.
-rw-r--r--autotests/kerfuffle/addtest.cpp20
-rw-r--r--autotests/kerfuffle/copytest.cpp30
-rw-r--r--autotests/kerfuffle/extracttest.cpp80
-rw-r--r--autotests/kerfuffle/jobstest.cpp60
-rw-r--r--autotests/kerfuffle/jsonarchiveinterface.cpp10
-rw-r--r--autotests/kerfuffle/jsonarchiveinterface.h10
-rw-r--r--autotests/kerfuffle/movetest.cpp26
-rw-r--r--autotests/plugins/cli7zplugin/cli7ztest.cpp12
-rw-r--r--autotests/plugins/clirarplugin/clirartest.cpp12
-rw-r--r--autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp24
-rw-r--r--autotests/plugins/clizipplugin/cliziptest.cpp12
-rw-r--r--autotests/testhelper/testhelper.cpp18
-rw-r--r--autotests/testhelper/testhelper.h16
-rw-r--r--kerfuffle/addtoarchive.cpp2
-rw-r--r--kerfuffle/addtoarchive.h4
-rw-r--r--kerfuffle/archive_kerfuffle.cpp12
-rw-r--r--kerfuffle/archive_kerfuffle.h12
-rw-r--r--kerfuffle/archiveentry.cpp2
-rw-r--r--kerfuffle/archiveentry.h2
-rw-r--r--kerfuffle/archiveinterface.cpp6
-rw-r--r--kerfuffle/archiveinterface.h14
-rw-r--r--kerfuffle/cliinterface.cpp30
-rw-r--r--kerfuffle/cliinterface.h36
-rw-r--r--kerfuffle/jobs.cpp12
-rw-r--r--kerfuffle/jobs.h26
-rw-r--r--part/archivemodel.cpp16
-rw-r--r--part/archivemodel.h12
-rw-r--r--part/part.cpp20
-rw-r--r--part/part.h8
-rw-r--r--plugins/cliunarchiverplugin/cliplugin.cpp2
-rw-r--r--plugins/cliunarchiverplugin/cliplugin.h2
-rw-r--r--plugins/clizipplugin/cliplugin.cpp2
-rw-r--r--plugins/clizipplugin/cliplugin.h2
-rw-r--r--plugins/libarchive/libarchiveplugin.cpp10
-rw-r--r--plugins/libarchive/libarchiveplugin.h10
-rw-r--r--plugins/libarchive/readwritelibarchiveplugin.cpp8
-rw-r--r--plugins/libarchive/readwritelibarchiveplugin.h8
-rw-r--r--plugins/libsinglefileplugin/singlefileplugin.cpp2
-rw-r--r--plugins/libsinglefileplugin/singlefileplugin.h2
39 files changed, 296 insertions, 296 deletions
diff --git a/autotests/kerfuffle/addtest.cpp b/autotests/kerfuffle/addtest.cpp
index b96ff40..0dad849 100644
--- a/autotests/kerfuffle/addtest.cpp
+++ b/autotests/kerfuffle/addtest.cpp
@@ -32,7 +32,7 @@ class AddTest : public QObject
Q_OBJECT
private:
-void addAllFormatsRows(const QString &testName, const QString &archiveName, const QList<Archive::Entry*> &entries, Archive::Entry *destination) {
+void addAllFormatsRows(const QString &testName, const QString &archiveName, const QVector<Archive::Entry*> &entries, Archive::Entry *destination) {
QStringList formats = QStringList()
<< QStringLiteral("7z")
<< QStringLiteral("rar")
@@ -58,12 +58,12 @@ QTEST_GUILESS_MAIN(AddTest)
void AddTest::testAdding_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<Archive::Entry*>("destination");
addAllFormatsRows(QStringLiteral("without destination"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("textfile1.txt")),
new Archive::Entry(this, QStringLiteral("textfile2.txt")),
},
@@ -71,7 +71,7 @@ void AddTest::testAdding_data()
addAllFormatsRows(QStringLiteral("with destination, files"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("textfile1.txt")),
new Archive::Entry(this, QStringLiteral("textfile2.txt")),
},
@@ -79,21 +79,21 @@ void AddTest::testAdding_data()
addAllFormatsRows(QStringLiteral("with destination, directory"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("testdir/")),
},
new Archive::Entry(this, QStringLiteral("empty_dir/")));
addAllFormatsRows(QStringLiteral("without destination, directory 2"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("testdir2/")),
},
new Archive::Entry(this));
addAllFormatsRows(QStringLiteral("with destination, directory 2"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("testdir2/")),
},
new Archive::Entry(this, QStringLiteral("empty_dir/")));
@@ -119,17 +119,17 @@ void AddTest::testAdding()
QSKIP("Could not find a plugin to handle the archive. Skipping test.", SkipSingle);
}
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(Archive::Entry*, destination);
- QList<Archive::Entry*> oldEntries = TestHelper::getEntryList(archive);
+ QVector<Archive::Entry*> oldEntries = TestHelper::getEntryList(archive);
CompressionOptions options = CompressionOptions();
options.insert(QStringLiteral("GlobalWorkDir"), QFINDTESTDATA("data"));
AddJob *addJob = archive->addFiles(files, destination, options);
TestHelper::startAndWaitForResult(addJob);
- QList<Archive::Entry*> resultedEntries = TestHelper::getEntryList(archive);
+ QVector<Archive::Entry*> resultedEntries = TestHelper::getEntryList(archive);
TestHelper::verifyAddedEntriesWithDestination(files, destination, oldEntries, resultedEntries);
loadJob->deleteLater();
diff --git a/autotests/kerfuffle/copytest.cpp b/autotests/kerfuffle/copytest.cpp
index 224ff97..103c375 100644
--- a/autotests/kerfuffle/copytest.cpp
+++ b/autotests/kerfuffle/copytest.cpp
@@ -32,7 +32,7 @@ class CopyTest : public QObject
Q_OBJECT
private:
- void addAllFormatsRows(const QString &testName, const QString &archiveName, const QList<Archive::Entry*> &entries, Archive::Entry *destination) {
+ void addAllFormatsRows(const QString &testName, const QString &archiveName, const QVector<Archive::Entry*> &entries, Archive::Entry *destination) {
QStringList formats = QStringList()
<< QStringLiteral("7z")
<< QStringLiteral("rar")
@@ -58,19 +58,19 @@ QTEST_GUILESS_MAIN(CopyTest)
void CopyTest::testCopying_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<Archive::Entry*>("destination");
addAllFormatsRows(QStringLiteral("copy a single file"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
},
new Archive::Entry(this, QStringLiteral("empty_dir/")));
addAllFormatsRows(QStringLiteral("copy several files"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("b.txt")),
},
@@ -78,7 +78,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy a root directory"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
@@ -90,7 +90,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy a root directory 2"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir2/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/a.txt")),
@@ -100,7 +100,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy a root directory 3"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir2/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/a.txt")),
@@ -110,7 +110,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy a directory"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
@@ -119,7 +119,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy several directories"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
@@ -135,7 +135,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy several entries"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
@@ -146,7 +146,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy a directory inside itself"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
@@ -158,7 +158,7 @@ void CopyTest::testCopying_data()
addAllFormatsRows(QStringLiteral("copy a directory to the root"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
@@ -188,17 +188,17 @@ void CopyTest::testCopying()
QSKIP("Could not find a plugin to handle the archive. Skipping test.", SkipSingle);
}
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(Archive::Entry*, destination);
- const QList<Archive::Entry*> oldEntries = TestHelper::getEntryList(archive);
+ const QVector<Archive::Entry*> oldEntries = TestHelper::getEntryList(archive);
CompressionOptions options = CompressionOptions();
options.insert(QStringLiteral("GlobalWorkDir"), QFINDTESTDATA("data"));
CopyJob *copyJob = archive->copyFiles(files, destination, options);
TestHelper::startAndWaitForResult(copyJob);
- QList<Archive::Entry*> resultedEntries = TestHelper::getEntryList(archive);
+ QVector<Archive::Entry*> resultedEntries = TestHelper::getEntryList(archive);
TestHelper::verifyCopiedEntriesWithDestination(files, destination, oldEntries, resultedEntries);
archive->deleteLater();
diff --git a/autotests/kerfuffle/extracttest.cpp b/autotests/kerfuffle/extracttest.cpp
index 52d6bb4..0827fc0 100644
--- a/autotests/kerfuffle/extracttest.cpp
+++ b/autotests/kerfuffle/extracttest.cpp
@@ -244,7 +244,7 @@ void ExtractTest::testProperties()
void ExtractTest::testExtraction_data()
{
QTest::addColumn<QString>("archivePath");
- QTest::addColumn<QList<Archive::Entry*>>("entriesToExtract");
+ QTest::addColumn<QVector<Archive::Entry*>>("entriesToExtract");
QTest::addColumn<ExtractionOptions>("extractionOptions");
QTest::addColumn<int>("expectedExtractedEntriesCount");
@@ -258,14 +258,14 @@ void ExtractTest::testExtraction_data()
QString archivePath = QFINDTESTDATA("data/simplearchive.tar.gz");
QTest::newRow("extract the whole simplearchive.tar.gz")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 4;
archivePath = QFINDTESTDATA("data/simplearchive.tar.gz");
QTest::newRow("extract selected entries from a tar.gz, without paths")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/b.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -275,7 +275,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.gz");
QTest::newRow("extract selected entries from a tar.gz, preserve paths")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/b.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -285,7 +285,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.gz");
QTest::newRow("extract selected entries from a tar.gz, drag-and-drop")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("c.txt"), QString()),
new Archive::Entry(this, QStringLiteral("aDir/b.txt"), QStringLiteral("aDir/"))
}
@@ -295,14 +295,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/one_toplevel_folder.zip");
QTest::newRow("extract the whole one_toplevel_folder.zip")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 9;
archivePath = QFINDTESTDATA("data/one_toplevel_folder.zip");
QTest::newRow("extract selected entries from a zip, without paths")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A")),
new Archive::Entry(this, QStringLiteral("A/B/test1.txt"), QStringLiteral("A/B"))
}
@@ -312,7 +312,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/one_toplevel_folder.zip");
QTest::newRow("extract selected entries from a zip, preserve paths")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A")),
new Archive::Entry(this, QStringLiteral("A/B/test1.txt"), QStringLiteral("A/B"))
}
@@ -322,7 +322,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/one_toplevel_folder.zip");
QTest::newRow("extract selected entries from a zip, drag-and-drop")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A/")),
new Archive::Entry(this, QStringLiteral("A/B/C/"), QStringLiteral("A/B/")),
new Archive::Entry(this, QStringLiteral("A/B/C/test1.txt"), QStringLiteral("A/B/")),
@@ -334,14 +334,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/one_toplevel_folder.7z");
QTest::newRow("extract the whole one_toplevel_folder.7z")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 9;
archivePath = QFINDTESTDATA("data/one_toplevel_folder.7z");
QTest::newRow("extract selected entries from a 7z, without paths")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A")),
new Archive::Entry(this, QStringLiteral("A/B/test1.txt"), QStringLiteral("A/B"))
}
@@ -351,7 +351,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/one_toplevel_folder.7z");
QTest::newRow("extract selected entries from a 7z, preserve paths")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A")),
new Archive::Entry(this, QStringLiteral("A/B/test1.txt"), QStringLiteral("A/B"))
}
@@ -361,28 +361,28 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/one_toplevel_folder.7z");
QTest::newRow("extract selected entries from a 7z, drag-and-drop")
<< archivePath
- << QList<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("A/B/test2.txt"), QStringLiteral("A/B/"))}
+ << QVector<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("A/B/test2.txt"), QStringLiteral("A/B/"))}
<< dragAndDropOptions
<< 1;
archivePath = QFINDTESTDATA("data/empty_folders.zip");
QTest::newRow("zip with empty folders")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 5;
archivePath = QFINDTESTDATA("data/empty_folders.tar.gz");
QTest::newRow("tar with empty folders")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 5;
archivePath = QFINDTESTDATA("data/simplearchive.tar.bz2");
QTest::newRow("extract selected entries from a bzip2-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -392,14 +392,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.bz2");
QTest::newRow("extract all entries from a bzip2-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
archivePath = QFINDTESTDATA("data/simplearchive.tar.xz");
QTest::newRow("extract selected entries from a xz-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -409,14 +409,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.xz");
QTest::newRow("extract all entries from a xz-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
archivePath = QFINDTESTDATA("data/simplearchive.tar.lzma");
QTest::newRow("extract selected entries from a lzma-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -426,14 +426,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lzma");
QTest::newRow("extract all entries from a lzma-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
archivePath = QFINDTESTDATA("data/simplearchive.tar.Z");
QTest::newRow("extract selected entries from a compress (.Z)-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -443,14 +443,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.Z");
QTest::newRow("extract all entries from a compress (.Z)-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
archivePath = QFINDTESTDATA("data/simplearchive.tar.lz");
QTest::newRow("extract selected entries from a lzipped tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -460,14 +460,14 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lz");
QTest::newRow("extract all entries from a lzipped tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
archivePath = QFINDTESTDATA("data/simplearchive.tar.lzo");
QTest::newRow("extract selected entries from a lzop-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -477,7 +477,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lzo");
QTest::newRow("extract all entries from a lzop-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
@@ -486,7 +486,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lrz");
QTest::newRow("extract selected entries from a lrzip-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -496,7 +496,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lrz");
QTest::newRow("extract all entries from a lrzip-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
} else {
@@ -508,7 +508,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lz4");
QTest::newRow("extract selected entries from a lz4-compressed tarball without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("file3.txt"), QString()),
new Archive::Entry(this, QStringLiteral("dir2/file22.txt"), QString())
}
@@ -518,7 +518,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.tar.lz4");
QTest::newRow("extract all entries from a lz4-compressed tarball with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
} else {
@@ -528,7 +528,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.xar");
QTest::newRow("extract selected entries from a xar archive without path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/file11.txt"), QString()),
new Archive::Entry(this, QStringLiteral("file4.txt"), QString())
}
@@ -538,21 +538,21 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/simplearchive.xar");
QTest::newRow("extract all entries from a xar archive with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 6;
archivePath = QFINDTESTDATA("data/hello-1.0-x86_64.AppImage");
QTest::newRow("extract all entries from an AppImage with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 7;
archivePath = QFINDTESTDATA("data/hello-1.0-x86_64.AppImage");
QTest::newRow("extract selected entries from an AppImage with path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("usr/bin/hello"), QString())
}
<< optionsPreservePaths
@@ -561,21 +561,21 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/archive-multivolume.7z.001");
QTest::newRow("extract all entries from a multivolume 7z archive with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 3;
archivePath = QFINDTESTDATA("data/archive-multivolume.part1.rar");
QTest::newRow("extract all entries from a multivolume rar archive with path")
<< archivePath
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 3;
archivePath = QFINDTESTDATA("data/firmware-pine64-20160329-6.1.aarch64.rpm");
QTest::newRow("extract selected entries from rpm with path")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("boot/sunxi-spl.bin"), QString())
}
<< optionsPreservePaths
@@ -584,7 +584,7 @@ void ExtractTest::testExtraction_data()
archivePath = QFINDTESTDATA("data/firmware-pine64-20160329-6.1.aarch64.rpm");
QTest::newRow("#369535: broken drag-and-drop from rpm")
<< archivePath
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("boot/sunxi-spl.bin"), QStringLiteral("boot/")),
new Archive::Entry(this, QStringLiteral("boot/u-boot.img"), QStringLiteral("boot/"))
}
@@ -613,7 +613,7 @@ void ExtractTest::testExtraction()
QSKIP("Could not create a temporary directory for extraction. Skipping test.", SkipSingle);
}
- QFETCH(QList<Archive::Entry*>, entriesToExtract);
+ QFETCH(QVector<Archive::Entry*>, entriesToExtract);
QFETCH(ExtractionOptions, extractionOptions);
auto extractionJob = archive->extractFiles(entriesToExtract, destDir.path(), extractionOptions);
QVERIFY(extractionJob);
diff --git a/autotests/kerfuffle/jobstest.cpp b/autotests/kerfuffle/jobstest.cpp
index c975b42..bee53ab 100644
--- a/autotests/kerfuffle/jobstest.cpp
+++ b/autotests/kerfuffle/jobstest.cpp
@@ -64,10 +64,10 @@ private Q_SLOTS:
private:
JSONArchiveInterface *createArchiveInterface(const QString& filePath);
- QList<Archive::Entry*> listEntries(JSONArchiveInterface *iface);
+ QVector<Archive::Entry*> listEntries(JSONArchiveInterface *iface);
void startAndWaitForResult(KJob *job);
- QList<Archive::Entry*> m_entries;
+ QVector<Archive::Entry*> m_entries;
QEventLoop m_eventLoop;
};
@@ -100,7 +100,7 @@ JSONArchiveInterface *JobsTest::createArchiveInterface(const QString& filePath)
return iface;
}
-QList<Archive::Entry*> JobsTest::listEntries(JSONArchiveInterface *iface)
+QVector<Archive::Entry*> JobsTest::listEntries(JSONArchiveInterface *iface)
{
m_entries.clear();
@@ -218,7 +218,7 @@ void JobsTest::testLoadJob()
void JobsTest::testExtractJobAccessors()
{
JSONArchiveInterface *iface = createArchiveInterface(QFINDTESTDATA("data/archive001.json"));
- ExtractJob *job = new ExtractJob(QList<Archive::Entry*>(), QStringLiteral("/tmp/some-dir"), ExtractionOptions(), iface);
+ ExtractJob *job = new ExtractJob(QVector<Archive::Entry*>(), QStringLiteral("/tmp/some-dir"), ExtractionOptions(), iface);
ExtractionOptions defaultOptions;
defaultOptions[QStringLiteral("PreservePaths")] = false;
@@ -237,7 +237,7 @@ void JobsTest::testExtractJobAccessors()
options[QStringLiteral("foo")] = QLatin1String("bar");
options[QStringLiteral("pi")] = 3.14f;
- job = new ExtractJob(QList<Archive::Entry*>(), QStringLiteral("/root"), options, iface);
+ job = new ExtractJob(QVector<Archive::Entry*>(), QStringLiteral("/root"), options, iface);
QCOMPARE(job->destinationDirectory(), QLatin1String("/root"));
QCOMPARE(job->extractionOptions(), options);
@@ -275,39 +275,39 @@ void JobsTest::testTempExtractJob()
void JobsTest::testRemoveEntries_data()
{
QTest::addColumn<QString>("jsonArchive");
- QTest::addColumn<QList<Archive::Entry*>>("entries");
- QTest::addColumn<QList<Archive::Entry*>>("entriesToDelete");
+ QTest::addColumn<QVector<Archive::Entry*>>("entries");
+ QTest::addColumn<QVector<Archive::Entry*>>("entriesToDelete");
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("c.txt"))};
+ << QVector<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("c.txt"))};
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
};
// Error test: if we delete non-existent entries, the archive must not change.
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("foo.txt"))};
+ << QVector<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("foo.txt"))};
}
void JobsTest::testRemoveEntries()
@@ -316,11 +316,11 @@ void JobsTest::testRemoveEntries()
JSONArchiveInterface *iface = createArchiveInterface(jsonArchive);
QVERIFY(iface);
- QFETCH(QList<Archive::Entry*>, entries);
- QFETCH(QList<Archive::Entry*>, entriesToDelete);
+ QFETCH(QVector<Archive::Entry*>, entries);
+ QFETCH(QVector<Archive::Entry*>, entriesToDelete);
QStringList fullPathsToDelete = iface->entryFullPaths(entriesToDelete);
- QList<Archive::Entry*> expectedRemainingEntries;
+ QVector<Archive::Entry*> expectedRemainingEntries;
Q_FOREACH (Archive::Entry *entry, entries) {
if (!fullPathsToDelete.contains(entry->fullPath())) {
expectedRemainingEntries.append(entry);
@@ -343,67 +343,67 @@ void JobsTest::testRemoveEntries()
void JobsTest::testAddEntries_data()
{
QTest::addColumn<QString>("jsonArchive");
- QTest::addColumn<QList<Archive::Entry*>>("originalEntries");
- QTest::addColumn<QList<Archive::Entry*>>("entriesToAdd");
+ QTest::addColumn<QVector<Archive::Entry*>>("originalEntries");
+ QTest::addColumn<QVector<Archive::Entry*>>("entriesToAdd");
QTest::addColumn<Archive::Entry*>("destinationEntry");
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("foo.txt"))
}
<< new Archive::Entry(this);
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("foo.txt")),
new Archive::Entry(this, QStringLiteral("bar.txt"))
}
<< new Archive::Entry(this);
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("foo.txt")),
new Archive::Entry(this, QStringLiteral("bar.txt"))
}
<< new Archive::Entry(this, QStringLiteral("aDir/"));
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("c.txt"))}
+ << QVector<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("c.txt"))}
<< new Archive::Entry(this, QStringLiteral("aDir/"));
// Error test: if we add an already existent entry, the archive must not change.
QTest::newRow("archive001.json") << QFINDTESTDATA("data/archive001.json")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("aDir/")),
new Archive::Entry(this, QStringLiteral("aDir/b.txt")),
new Archive::Entry(this, QStringLiteral("c.txt"))
}
- << QList<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("c.txt"))}
+ << QVector<Archive::Entry*> {new Archive::Entry(this, QStringLiteral("c.txt"))}
<< new Archive::Entry(this);
}
@@ -413,7 +413,7 @@ void JobsTest::testAddEntries()
JSONArchiveInterface *iface = createArchiveInterface(jsonArchive);
QVERIFY(iface);
- QFETCH(QList<Archive::Entry*>, originalEntries);
+ QFETCH(QVector<Archive::Entry*>, originalEntries);
QStringList originalFullPaths = QStringList();
Q_FOREACH (const Archive::Entry *entry, originalEntries) {
originalFullPaths.append(entry->fullPath());
@@ -421,7 +421,7 @@ void JobsTest::testAddEntries()
auto currentEntries = listEntries(iface);
QCOMPARE(currentEntries.size(), originalEntries.size());
- QFETCH(QList<Archive::Entry*>, entriesToAdd);
+ QFETCH(QVector<Archive::Entry*>, entriesToAdd);
QFETCH(Archive::Entry*, destinationEntry);
AddJob *addJob = new AddJob(entriesToAdd, destinationEntry, CompressionOptions(), iface);
startAndWaitForResult(addJob);
diff --git a/autotests/kerfuffle/jsonarchiveinterface.cpp b/autotests/kerfuffle/jsonarchiveinterface.cpp
index af6f8c2..89ae6da 100644
--- a/autotests/kerfuffle/jsonarchiveinterface.cpp
+++ b/autotests/kerfuffle/jsonarchiveinterface.cpp
@@ -64,7 +64,7 @@ bool JSONArchiveInterface::open()
return !m_archive.isEmpty();
}
-bool JSONArchiveInterface::addFiles(const QList<Kerfuffle::Archive::Entry*>& files, const Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options)
+bool JSONArchiveInterface::addFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options)
{
Q_UNUSED(options)
@@ -83,7 +83,7 @@ bool JSONArchiveInterface::addFiles(const QList<Kerfuffle::Archive::Entry*>& fil
return true;
}
-bool JSONArchiveInterface::moveFiles(const QList<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::ExtractionOptions& options)
+bool JSONArchiveInterface::moveFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::ExtractionOptions& options)
{
Q_UNUSED(files)
Q_UNUSED(destination)
@@ -92,7 +92,7 @@ bool JSONArchiveInterface::moveFiles(const QList<Kerfuffle::Archive::Entry*>& fi
return true;
}
-bool JSONArchiveInterface::copyFiles(const QList<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options)
+bool JSONArchiveInterface::copyFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options)
{
Q_UNUSED(files)
Q_UNUSED(destination)
@@ -101,7 +101,7 @@ bool JSONArchiveInterface::copyFiles(const QList<Kerfuffle::Archive::Entry*>& fi
return false;
}
-bool JSONArchiveInterface::extractFiles(const QList<Kerfuffle::Archive::Entry*>& files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions& options)
+bool JSONArchiveInterface::extractFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions& options)
{
Q_UNUSED(files)
Q_UNUSED(destinationDirectory)
@@ -110,7 +110,7 @@ bool JSONArchiveInterface::extractFiles(const QList<Kerfuffle::Archive::Entry*>&
return true;
}
-bool JSONArchiveInterface::deleteFiles(const QList<Kerfuffle::Archive::Entry*>& files)
+bool JSONArchiveInterface::deleteFiles(const QVector<Kerfuffle::Archive::Entry*>& files)
{
foreach (const Kerfuffle::Archive::Entry *file, files) {
const QString &fileName = file->fullPath();
diff --git a/autotests/kerfuffle/jsonarchiveinterface.h b/autotests/kerfuffle/jsonarchiveinterface.h
index fb6aac9..752559f 100644
--- a/autotests/kerfuffle/jsonarchiveinterface.h
+++ b/autotests/kerfuffle/jsonarchiveinterface.h
@@ -55,11 +55,11 @@ public:
virtual bool list() Q_DECL_OVERRIDE;
virtual bool open() Q_DECL_OVERRIDE;
- virtual bool addFiles(const QList<Kerfuffle::Archive::Entry*>& files, const Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
- virtual bool moveFiles(const QList<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
- virtual bool copyFiles(const QList<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
- virtual bool extractFiles(const QList<Kerfuffle::Archive::Entry*>& files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions& options) Q_DECL_OVERRIDE;
- virtual bool deleteFiles(const QList<Kerfuffle::Archive::Entry*>& files) Q_DECL_OVERRIDE;
+ virtual bool addFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool moveFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool copyFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool extractFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool deleteFiles(const QVector<Kerfuffle::Archive::Entry*>& files) Q_DECL_OVERRIDE;
virtual bool addComment(const QString& comment) Q_DECL_OVERRIDE;
virtual bool testArchive() Q_DECL_OVERRIDE;
diff --git a/autotests/kerfuffle/movetest.cpp b/autotests/kerfuffle/movetest.cpp
index 07d6763..676409a 100644
--- a/autotests/kerfuffle/movetest.cpp
+++ b/autotests/kerfuffle/movetest.cpp
@@ -32,7 +32,7 @@ class MoveTest : public QObject
Q_OBJECT
private:
- void addAllFormatsRows(const QString &testName, const QString &archiveName, const QList<Archive::Entry*> &entries, Archive::Entry *destination) {
+ void addAllFormatsRows(const QString &testName, const QString &archiveName, const QVector<Archive::Entry*> &entries, Archive::Entry *destination) {
QStringList formats = QStringList()
<< QStringLiteral("7z")
<< QStringLiteral("rar")
@@ -58,19 +58,19 @@ QTEST_GUILESS_MAIN(MoveTest)
void MoveTest::testMoving_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<Archive::Entry*>("destination");
addAllFormatsRows(QStringLiteral("replace a single file"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
},
new Archive::Entry(this, QStringLiteral("empty_dir/a.txt")));
addAllFormatsRows(QStringLiteral("replace several files"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("a.txt")),
new Archive::Entry(this, QStringLiteral("b.txt")),
},
@@ -78,7 +78,7 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace a root directory"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
@@ -90,7 +90,7 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace a root directory 2"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir2/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/a.txt")),
@@ -100,7 +100,7 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace a directory"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
@@ -109,7 +109,7 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace several directories"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
@@ -125,7 +125,7 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace several entries"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
@@ -136,7 +136,7 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("move a directory to the root"),
QStringLiteral("test"),
- QList<Archive::Entry*> {
+ QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
@@ -164,17 +164,17 @@ void MoveTest::testMoving()
QSKIP("Could not find a plugin to handle the archive. Skipping test.", SkipSingle);
}
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(Archive::Entry*, destination);
- QList<Archive::Entry*> oldEntries = TestHelper::getEntryList(archive);
+ QVector<Archive::Entry*> oldEntries = TestHelper::getEntryList(archive);
CompressionOptions options = CompressionOptions();
options.insert(QStringLiteral("GlobalWorkDir"), QFINDTESTDATA("data"));
MoveJob *moveJob = archive->moveFiles(files, destination, options);
TestHelper::startAndWaitForResult(moveJob);
- QList<Archive::Entry*> resultedEntries = TestHelper::getEntryList(archive);
+ QVector<Archive::Entry*> resultedEntries = TestHelper::getEntryList(archive);
TestHelper::verifyMovedEntriesWithDestination(files, destination, oldEntries, resultedEntries);
loadJob->deleteLater();
diff --git a/autotests/plugins/cli7zplugin/cli7ztest.cpp b/autotests/plugins/cli7zplugin/cli7ztest.cpp
index 4625d60..769b988 100644
--- a/autotests/plugins/cli7zplugin/cli7ztest.cpp
+++ b/autotests/plugins/cli7zplugin/cli7ztest.cpp
@@ -356,14 +356,14 @@ void Cli7zTest::testAddArgs()
void Cli7zTest::testExtractArgs_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<bool>("preservePaths");
QTest::addColumn<QString>("password");
QTest::addColumn<QStringList>("expectedArgs");
QTest::newRow("preserve paths, encrypted")
<< QStringLiteral("/tmp/foo.7z")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -378,7 +378,7 @@ void Cli7zTest::testExtractArgs_data()
QTest::newRow("preserve paths, unencrypted")
<< QStringLiteral("/tmp/foo.7z")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -392,7 +392,7 @@ void Cli7zTest::testExtractArgs_data()
QTest::newRow("without paths, encrypted")
<< QStringLiteral("/tmp/foo.7z")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -407,7 +407,7 @@ void Cli7zTest::testExtractArgs_data()
QTest::newRow("without paths, unencrypted")
<< QStringLiteral("/tmp/foo.7z")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -431,7 +431,7 @@ void Cli7zTest::testExtractArgs()
QStringLiteral("$Archive"),
QStringLiteral("$Files") };
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(bool, preservePaths);
QFETCH(QString, password);
diff --git a/autotests/plugins/clirarplugin/clirartest.cpp b/autotests/plugins/clirarplugin/clirartest.cpp
index 93c750c..b629b05 100644
--- a/autotests/plugins/clirarplugin/clirartest.cpp
+++ b/autotests/plugins/clirarplugin/clirartest.cpp
@@ -409,14 +409,14 @@ void CliRarTest::testAddArgs()
void CliRarTest::testExtractArgs_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<bool>("preservePaths");
QTest::addColumn<QString>("password");
QTest::addColumn<QStringList>("expectedArgs");
QTest::newRow("preserve paths, encrypted")
<< QStringLiteral("/tmp/foo.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -433,7 +433,7 @@ void CliRarTest::testExtractArgs_data()
QTest::newRow("preserve paths, unencrypted")
<< QStringLiteral("/tmp/foo.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -449,7 +449,7 @@ void CliRarTest::testExtractArgs_data()
QTest::newRow("without paths, encrypted")
<< QStringLiteral("/tmp/foo.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -466,7 +466,7 @@ void CliRarTest::testExtractArgs_data()
QTest::newRow("without paths, unencrypted")
<< QStringLiteral("/tmp/foo.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -494,7 +494,7 @@ void CliRarTest::testExtractArgs()
QStringLiteral("$Archive"),
QStringLiteral("$Files") };
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(bool, preservePaths);
QFETCH(QString, password);
diff --git a/autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp b/autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp
index e9d7447..2d6ed56 100644
--- a/autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp
+++ b/autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp
@@ -226,7 +226,7 @@ void CliUnarchiverTest::testListArgs()
void CliUnarchiverTest::testExtraction_data()
{
QTest::addColumn<QString>("archivePath");
- QTest::addColumn<QList<Archive::Entry*>>("entriesToExtract");
+ QTest::addColumn<QVector<Archive::Entry*>>("entriesToExtract");
QTest::addColumn<ExtractionOptions>("extractionOptions");
QTest::addColumn<int>("expectedExtractedEntriesCount");
@@ -241,13 +241,13 @@ void CliUnarchiverTest::testExtraction_data()
QTest::newRow("extract the whole multiple_toplevel_entries.rar")
<< QFINDTESTDATA("data/multiple_toplevel_entries.rar")
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 12;
QTest::newRow("extract selected entries from a rar, without paths")
<< QFINDTESTDATA("data/one_toplevel_folder.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A")),
new Archive::Entry(this, QStringLiteral("A/B/test1.txt"), QStringLiteral("A/B"))
}
@@ -256,7 +256,7 @@ void CliUnarchiverTest::testExtraction_data()
QTest::newRow("extract selected entries from a rar, preserve paths")
<< QFINDTESTDATA("data/one_toplevel_folder.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A")),
new Archive::Entry(this, QStringLiteral("A/B/test1.txt"), QStringLiteral("A/B"))
}
@@ -265,7 +265,7 @@ void CliUnarchiverTest::testExtraction_data()
QTest::newRow("extract selected entries from a rar, drag-and-drop")
<< QFINDTESTDATA("data/one_toplevel_folder.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("A/B/C/"), QStringLiteral("A/B/")),
new Archive::Entry(this, QStringLiteral("A/test2.txt"), QStringLiteral("A/")),
new Archive::Entry(this, QStringLiteral("A/B/C/test1.txt"), QStringLiteral("A/B/")),
@@ -276,13 +276,13 @@ void CliUnarchiverTest::testExtraction_data()
QTest::newRow("rar with empty folders")
<< QFINDTESTDATA("data/empty_folders.rar")
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 5;
QTest::newRow("rar with hidden folder and files")
<< QFINDTESTDATA("data/hidden_files.rar")
- << QList<Archive::Entry*>()
+ << QVector<Archive::Entry*>()
<< optionsPreservePaths
<< 4;
}
@@ -312,7 +312,7 @@ void CliUnarchiverTest::testExtraction()
QSKIP("Could not create a temporary directory for extraction. Skipping test.", SkipSingle);
}
- QFETCH(QList<Archive::Entry*>, entriesToExtract);
+ QFETCH(QVector<Archive::Entry*>, entriesToExtract);
QFETCH(ExtractionOptions, extractionOptions);
auto extractionJob = archive->extractFiles(entriesToExtract, destDir.path(), extractionOptions);
@@ -338,13 +338,13 @@ void CliUnarchiverTest::testExtraction()
void CliUnarchiverTest::testExtractArgs_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<QString>("password");
QTest::addColumn<QStringList>("expectedArgs");
QTest::newRow("encrypted, multiple files")
<< QStringLiteral("/tmp/foo.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/b.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -360,7 +360,7 @@ void CliUnarchiverTest::testExtractArgs_data()
QTest::newRow("unencrypted, multiple files")
<< QStringLiteral("/tmp/foo.rar")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/b.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -384,7 +384,7 @@ void CliUnarchiverTest::testExtractArgs()
QStringLiteral("$Files"),
QStringLiteral("$PasswordSwitch") };
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(QString, password);
QStringList replacedArgs = plugin->substituteExtractVariables(extractArgs, files, false, password);
diff --git a/autotests/plugins/clizipplugin/cliziptest.cpp b/autotests/plugins/clizipplugin/cliziptest.cpp
index 2e59ce3..d77a6b0 100644
--- a/autotests/plugins/clizipplugin/cliziptest.cpp
+++ b/autotests/plugins/clizipplugin/cliziptest.cpp
@@ -131,14 +131,14 @@ void CliZipTest::testAddArgs()
void CliZipTest::testExtractArgs_data()
{
QTest::addColumn<QString>("archiveName");
- QTest::addColumn<QList<Archive::Entry*>>("files");
+ QTest::addColumn<QVector<Archive::Entry*>>("files");
QTest::addColumn<bool>("preservePaths");
QTest::addColumn<QString>("password");
QTest::addColumn<QStringList>("expectedArgs");
QTest::newRow("preserve paths, encrypted")
<< QStringLiteral("/tmp/foo.zip")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -152,7 +152,7 @@ void CliZipTest::testExtractArgs_data()
QTest::newRow("preserve paths, unencrypted")
<< QStringLiteral("/tmp/foo.zip")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -165,7 +165,7 @@ void CliZipTest::testExtractArgs_data()
QTest::newRow("without paths, encrypted")
<< QStringLiteral("/tmp/foo.zip")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -180,7 +180,7 @@ void CliZipTest::testExtractArgs_data()
QTest::newRow("without paths, unencrypted")
<< QStringLiteral("/tmp/foo.zip")
- << QList<Archive::Entry*> {
+ << QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("aDir/textfile2.txt"), QStringLiteral("aDir")),
new Archive::Entry(this, QStringLiteral("c.txt"), QString())
}
@@ -204,7 +204,7 @@ void CliZipTest::testExtractArgs()
QStringLiteral("$Archive"),
QStringLiteral("$Files") };
- QFETCH(QList<Archive::Entry*>, files);
+ QFETCH(QVector<Archive::Entry*>, files);
QFETCH(bool, preservePaths);
QFETCH(QString, password);
diff --git a/autotests/testhelper/testhelper.cpp b/autotests/testhelper/testhelper.cpp
index b45c809..6f99698 100644
--- a/autotests/testhelper/testhelper.cpp
+++ b/autotests/testhelper/testhelper.cpp
@@ -34,16 +34,16 @@ void TestHelper::startAndWaitForResult(KJob *job)
m_eventLoop.exec(); // krazy:exclude=crashy
}
-QList<Archive::Entry*> TestHelper::getEntryList(Archive *archive)
+QVector<Archive::Entry*> TestHelper::getEntryList(Archive *archive)
{
- QList<Archive::Entry*> list = QList<Archive::Entry*>();
+ QVector<Archive::Entry*> list = QVector<Archive::Entry*>();
auto loadJob = Archive::load(archive->fileName());
QObject::connect(loadJob, &Job::newEntry, [&list](Archive::Entry* entry) { list << entry; });
startAndWaitForResult(loadJob);
return list;
}
-void TestHelper::verifyAddedEntriesWithDestination(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QList<Archive::Entry*> &oldEntries, const QList<Archive::Entry*> &newEntries)
+void TestHelper::verifyAddedEntriesWithDestination(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QVector<Archive::Entry*> &oldEntries, const QVector<Archive::Entry*> &newEntries)
{
QStringList expectedPaths = getExpectedNewEntryPaths(argumentEntries, destination);
QStringList actualPaths = ReadOnlyArchiveInterface::entryFullPaths(newEntries);
@@ -56,7 +56,7 @@ void TestHelper::verifyAddedEntriesWithDestination(const QList<Archive::Entry*>
}
}
-void TestHelper::verifyMovedEntriesWithDestination(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QList<Archive::Entry*> &oldEntries, const QList<Archive::Entry*> &newEntries)
+void TestHelper::verifyMovedEntriesWithDestination(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QVector<Archive::Entry*> &oldEntries, const QVector<Archive::Entry*> &newEntries)
{
QStringList expectedPaths = getExpectedMovedEntryPaths(oldEntries, argumentEntries, destination);
QStringList actualPaths = ReadOnlyArchiveInterface::entryFullPaths(newEntries);
@@ -72,7 +72,7 @@ void TestHelper::verifyMovedEntriesWithDestination(const QList<Archive::Entry*>
}
}
-void TestHelper::verifyCopiedEntriesWithDestination(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QList<Archive::Entry*> &oldEntries, const QList<Archive::Entry*> &newEntries)
+void TestHelper::verifyCopiedEntriesWithDestination(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QVector<Archive::Entry*> &oldEntries, const QVector<Archive::Entry*> &newEntries)
{
QStringList expectedPaths = getExpectedCopiedEntryPaths(oldEntries, argumentEntries, destination);
QStringList actualPaths = ReadOnlyArchiveInterface::entryFullPaths(newEntries);
@@ -84,7 +84,7 @@ void TestHelper::verifyCopiedEntriesWithDestination(const QList<Archive::Entry*>
}
}
-QStringList TestHelper::getExpectedNewEntryPaths(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination)
+QStringList TestHelper::getExpectedNewEntryPaths(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination)
{
QStringList expectedPaths = QStringList();
const QString testDataPath = QFINDTESTDATA("data") + QLatin1Char('/');
@@ -109,7 +109,7 @@ QStringList TestHelper::getExpectedNewEntryPaths(const QList<Archive::Entry*> &a
return expectedPaths;
}
-QStringList TestHelper::getExpectedMovedEntryPaths(const QList<Archive::Entry*> &entryList, const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination)
+QStringList TestHelper::getExpectedMovedEntryPaths(const QVector<Archive::Entry*> &entryList, const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination)
{
QStringList expectedPaths = QStringList();
QMap<QString, Archive::Entry*> entryMap = getEntryMap(entryList);
@@ -167,7 +167,7 @@ QStringList TestHelper::getExpectedMovedEntryPaths(const QList<Archive::Entry*>
return expectedPaths;
}
-QStringList TestHelper::getExpectedCopiedEntryPaths(const QList<Archive::Entry*> &entryList, const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination)
+QStringList TestHelper::getExpectedCopiedEntryPaths(const QVector<Archive::Entry*> &entryList, const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination)
{
QStringList expectedPaths = QStringList();
QMap<QString, Archive::Entry*> entryMap = getEntryMap(entryList);
@@ -203,7 +203,7 @@ QStringList TestHelper::getExpectedCopiedEntryPaths(const QList<Archive::Entry*>
return expectedPaths;
}
-QMap<QString, Archive::Entry*> TestHelper::getEntryMap(const QList<Archive::Entry *> &entries)
+QMap<QString, Archive::Entry*> TestHelper::getEntryMap(const QVector<Archive::Entry*> &entries)
{
QMap<QString, Archive::Entry*> map;
foreach (Archive::Entry* entry, entries) {
diff --git a/autotests/testhelper/testhelper.h b/autotests/testhelper/testhelper.h
index a4beb5f..a5c5343 100644
--- a/autotests/testhelper/testhelper.h
+++ b/autotests/testhelper/testhelper.h
@@ -40,24 +40,24 @@ class TestHelper
public:
static void startAndWaitForResult(KJob *job);
- static QList<Archive::Entry*> getEntryList(Archive *archive);
- static void verifyAddedEntriesWithDestination(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QList<Archive::Entry*> &oldEntries, const QList<Archive::Entry*> &newEntries);
- static void verifyMovedEntriesWithDestination(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QList<Archive::Entry*> &oldEntries, const QList<Archive::Entry*> &newEntries);
- static void verifyCopiedEntriesWithDestination(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QList<Archive::Entry*> &oldEntries, const QList<Archive::Entry*> &newEntries);
+ static QVector<Archive::Entry*> getEntryList(Archive *archive);
+ static void verifyAddedEntriesWithDestination(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QVector<Archive::Entry*> &oldEntries, const QVector<Archive::Entry*> &newEntries);
+ static void verifyMovedEntriesWithDestination(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QVector<Archive::Entry*> &oldEntries, const QVector<Archive::Entry*> &newEntries);
+ static void verifyCopiedEntriesWithDestination(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination, const QVector<Archive::Entry*> &oldEntries, const QVector<Archive::Entry*> &newEntries);
private:
TestHelper() {}
- static QStringList getExpectedNewEntryPaths(const QList<Archive::Entry*> &argumentEntries, const Archive::Entry *destination);
- static QStringList getExpectedMovedEntryPaths(const QList<Archive::Entry*> &entryList, const QList<Archive::Entry*> &argumentEntries, const Archive::Entry* destination);
- static QStringList getExpectedCopiedEntryPaths(const QList<Archive::Entry*> &entryList, const QList<Archive::Entry*> &argumentEntries, const Archive::Entry* destination);
+ static QStringList getExpectedNewEntryPaths(const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry *destination);
+ static QStringList getExpectedMovedEntryPaths(const QVector<Archive::Entry*> &entryList, const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry* destination);
+ static QStringList getExpectedCopiedEntryPaths(const QVector<Archive::Entry*> &entryList, const QVector<Archive::Entry*> &argumentEntries, const Archive::Entry* destination);
/**
* Returns map of entries.
*
* It's useful when we need a sorted list of entries.
*/
- static QMap<QString, Archive::Entry*> getEntryMap(const QList<Archive::Entry*> &entries);
+ static QMap<QString, Archive::Entry*> getEntryMap(const QVector<Archive::Entry*> &entries);
static QEventLoop m_eventLoop;
};
diff --git a/kerfuffle/addtoarchive.cpp b/kerfuffle/addtoarchive.cpp
index 4b41ec5..cb724dc 100644
--- a/kerfuffle/addtoarchive.cpp
+++ b/kerfuffle/addtoarchive.cpp
@@ -212,7 +212,7 @@ void AddToArchive::slotFinished(KJob *job)
emitResult();
}
-QString AddToArchive::detectBaseName(const QList<Archive::Entry*> &entries) const
+QString AddToArchive::detectBaseName(const QVector<Archive::Entry*> &entries) const
{
QFileInfo fileInfo = QFileInfo(entries.first()->fullPath());
QDir parentDir = fileInfo.dir();
diff --git a/kerfuffle/addtoarchive.h b/kerfuffle/addtoarchive.h
index 460e9f8..5463e69 100644
--- a/kerfuffle/addtoarchive.h
+++ b/kerfuffle/addtoarchive.h
@@ -61,7 +61,7 @@ public:
bool showAddDialog();
void setPreservePaths(bool value);
void setChangeToFirstPath(bool value);
- QString detectBaseName(const QList<Archive::Entry*> &entries) const;
+ QString detectBaseName(const QVector<Archive::Entry*> &entries) const;
public slots:
bool addInput(const QUrl &url);
@@ -83,7 +83,7 @@ private:
QString m_firstPath;
QString m_mimeType;
QString m_password;
- QList<Archive::Entry*> m_entries;
+ QVector<Archive::Entry*> m_entries;
bool m_changeToFirstPath;
bool m_enableHeaderEncryption;
};
diff --git a/kerfuffle/archive_kerfuffle.cpp b/kerfuffle/archive_kerfuffle.cpp
index b105869..31ef831 100644
--- a/kerfuffle/archive_kerfuffle.cpp
+++ b/kerfuffle/archive_kerfuffle.cpp
@@ -109,7 +109,7 @@ BatchExtractJob *Archive::batchExtract(const QString &fileName, const QString &d
return batchJob;
}
-CreateJob *Archive::create(const QString &fileName, const QString &mimeType, const QList<Archive::Entry *> &entries, const CompressionOptions &options, QObject *parent)
+CreateJob *Archive::create(const QString &fileName, const QString &mimeType, const QVector<Archive::Entry*> &entries, const CompressionOptions &options, QObject *parent)
{
auto archive = create(fileName, mimeType, parent);
auto createJob = new CreateJob(archive, entries, options);
@@ -376,7 +376,7 @@ ArchiveError Archive::error() const
return m_error;
}
-DeleteJob* Archive::deleteFiles(QList<Archive::Entry*> &entries)
+DeleteJob* Archive::deleteFiles(QVector<Archive::Entry*> &entries)
{
if (!isValid()) {
return Q_NULLPTR;
@@ -392,7 +392,7 @@ DeleteJob* Archive::deleteFiles(QList<Archive::Entry*> &entries)
return newJob;
}
-AddJob* Archive::addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options)
+AddJob* Archive::addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options)
{
if (!isValid()) {
return Q_NULLPTR;
@@ -411,7 +411,7 @@ AddJob* Archive::addFiles(const QList<Archive::Entry*> &files, const Archive::En
return newJob;
}
-MoveJob* Archive::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options)
+MoveJob* Archive::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options)
{
if (!isValid()) {
return Q_NULLPTR;
@@ -429,7 +429,7 @@ MoveJob* Archive::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry
return newJob;
}
-CopyJob* Archive::copyFiles(const QList<Archive::Entry *> &files, Archive::Entry *destination, const CompressionOptions &options)
+CopyJob* Archive::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
if (!isValid()) {
return Q_NULLPTR;
@@ -447,7 +447,7 @@ CopyJob* Archive::copyFiles(const QList<Archive::Entry *> &files, Archive::Entry
return newJob;
}
-ExtractJob* Archive::extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDir, const ExtractionOptions &options)
+ExtractJob* Archive::extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDir, const ExtractionOptions &options)
{
if (!isValid()) {
return Q_NULLPTR;
diff --git a/kerfuffle/archive_kerfuffle.h b/kerfuffle/archive_kerfuffle.h
index 8ec2d1e..dd2816c 100644
--- a/kerfuffle/archive_kerfuffle.h
+++ b/kerfuffle/archive_kerfuffle.h
@@ -143,7 +143,7 @@ public:
* @param fileName The name of the new archive.
* @param mimeType The mimetype of the new archive.
*/
- static CreateJob* create(const QString &fileName, const QString &mimeType, const QList<Archive::Entry*> &entries, const CompressionOptions& options, QObject *parent = Q_NULLPTR);
+ static CreateJob* create(const QString &fileName, const QString &mimeType, const QVector<Archive::Entry*> &entries, const CompressionOptions& options, QObject *parent = Q_NULLPTR);
/**
* @return An empty archive with name @p fileName, mimetype @p mimeType and @p parent as parent.
@@ -173,7 +173,7 @@ public:
ArchiveError error() const;
bool isValid() const;
- DeleteJob* deleteFiles(QList<Archive::Entry*> &entries);
+ DeleteJob* deleteFiles(QVector<Archive::Entry*> &entries);
CommentJob* addComment(const QString &comment);
TestJob* testArchive();
@@ -183,7 +183,7 @@ public:
* GlobalWorkDir - Change to this dir before adding the new files.
* The path names should then be added relative to this directory.
*/
- AddJob* addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options = CompressionOptions());
+ AddJob* addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options = CompressionOptions());
/**
* Renames or moves entries within the archive.
@@ -195,7 +195,7 @@ public:
* Otherwise (if count is more than 1) it's moving, so destination must conatin only targeted folder path
* or be empty, if moving to the root.
*/
- MoveJob* moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options = CompressionOptions());
+ MoveJob* moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options = CompressionOptions());
/**
* Copies entries within the archive.
@@ -204,9 +204,9 @@ public:
* @param destination Destination path. It must conatin only targeted folder path or be empty,
* if copying to the root.
*/
- CopyJob* copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options = CompressionOptions());
+ CopyJob* copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options = CompressionOptions());
- ExtractJob* extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDir, const ExtractionOptions &options = ExtractionOptions());
+ ExtractJob* extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDir, const ExtractionOptions &options = ExtractionOptions());
PreviewJob* preview(Archive::Entry *entry);
OpenJob* open(Archive::Entry *entry);
diff --git a/kerfuffle/archiveentry.cpp b/kerfuffle/archiveentry.cpp
index 97a2ac4..7ffc011 100644
--- a/kerfuffle/archiveentry.cpp
+++ b/kerfuffle/archiveentry.cpp
@@ -169,7 +169,7 @@ Archive::Entry *Archive::Entry::findByPath(const QStringList &pieces, int index)
return Q_NULLPTR;
}
-void Archive::Entry::returnDirEntries(QList<Entry*> *store)
+void Archive::Entry::returnDirEntries(QVector<Entry*> *store)
{
foreach(Entry *entry, m_entries) {
if (entry->isDir()) {
diff --git a/kerfuffle/archiveentry.h b/kerfuffle/archiveentry.h
index edb7c1e..bf2b4f2 100644
--- a/kerfuffle/archiveentry.h
+++ b/kerfuffle/archiveentry.h
@@ -89,7 +89,7 @@ public:
int row() const;
Entry *find(const QString &name) const;
Entry *findByPath(const QStringList & pieces, int index = 0) const;
- void returnDirEntries(QList<Entry*> *store);
+ void returnDirEntries(QVector<Entry*> *store);
void clear();
bool operator==(const Archive::Entry &right) const;
diff --git a/kerfuffle/archiveinterface.cpp b/kerfuffle/archiveinterface.cpp
index 0020d24..c001e30 100644
--- a/kerfuffle/archiveinterface.cpp
+++ b/kerfuffle/archiveinterface.cpp
@@ -165,7 +165,7 @@ void ReadOnlyArchiveInterface::setWaitForFinishedSignal(bool value)
m_waitForFinishedSignal = value;
}
-QStringList ReadOnlyArchiveInterface::entryFullPaths(const QList<Archive::Entry*> &entries, const bool withoutTrailingSlashes)
+QStringList ReadOnlyArchiveInterface::entryFullPaths(const QVector<Archive::Entry*> &entries, const bool withoutTrailingSlashes)
{
QStringList filesList;
foreach (const Archive::Entry *file, entries) {
@@ -174,7 +174,7 @@ QStringList ReadOnlyArchiveInterface::entryFullPaths(const QList<Archive::Entry*
return filesList;
}
-QList<Archive::Entry*> ReadOnlyArchiveInterface::entriesWithoutChildren(const QList<Archive::Entry*> &entries)
+QVector<Archive::Entry*> ReadOnlyArchiveInterface::entriesWithoutChildren(const QVector<Archive::Entry*> &entries)
{
// QMap is easy way to get entries sorted by their fullPath.
QMap<QString, Archive::Entry*> sortedEntries;
@@ -182,7 +182,7 @@ QList<Archive::Entry*> ReadOnlyArchiveInterface::entriesWithoutChildren(const QL
sortedEntries.insert(entry->fullPath(), entry);
}
- QList<Archive::Entry*> filteredEntries;
+ QVector<Archive::Entry*> filteredEntries;
QString lastFolder;
foreach (Archive::Entry *entry, sortedEntries) {
if (lastFolder.count() > 0 && entry->fullPath().startsWith(lastFolder)) {
diff --git a/kerfuffle/archiveinterface.h b/kerfuffle/archiveinterface.h
index f67f6bd..660022b 100644
--- a/kerfuffle/archiveinterface.h
+++ b/kerfuffle/archiveinterface.h
@@ -101,7 +101,7 @@ public:
* @note If returning false, make sure to emit the error() signal beforewards to notify
* the user of the error condition.
*/
- virtual bool extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) = 0;
+ virtual bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) = 0;
bool waitForFinishedSignal();
/**
@@ -117,14 +117,14 @@ public:
/**
* Returns the list of filenames retrieved from the list of entries.
*/
- static QStringList entryFullPaths(const QList<Archive::Entry*> &entries, const bool withoutTrailingSlashes = false);
+ static QStringList entryFullPaths(const QVector<Archive::Entry*> &entries, const bool withoutTrailingSlashes = false);
/**
* Returns the list of the entries, excluding their children.
*
* This method relies on entries paths so doesn't require parents to be set.
*/
- static QList<Archive::Entry*> entriesWithoutChildren(const QList<Archive::Entry*> &entries);
+ static QVector<Archive::Entry*> entriesWithoutChildren(const QVector<Archive::Entry*> &entries);
/**
* Returns the string list of entry paths, which will be a result of adding/moving/copying entries.
@@ -206,10 +206,10 @@ public:
//see archive.h for a list of what the compressionoptions might
//contain
- virtual bool addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options) = 0;
- virtual bool moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) = 0;
- virtual bool copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) = 0;
- virtual bool deleteFiles(const QList<Archive::Entry*> &files) = 0;
+ virtual bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options) = 0;
+ virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) = 0;
+ virtual bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) = 0;
+ virtual bool deleteFiles(const QVector<Archive::Entry*> &files) = 0;
virtual bool addComment(const QString &comment) = 0;
};
diff --git a/kerfuffle/cliinterface.cpp b/kerfuffle/cliinterface.cpp
index 8749037..2e2530c 100644
--- a/kerfuffle/cliinterface.cpp
+++ b/kerfuffle/cliinterface.cpp
@@ -116,7 +116,7 @@ bool CliInterface::list()
return true;
}
-bool CliInterface::extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
+bool CliInterface::extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
{
qCDebug(ARK) << Q_FUNC_INFO << "to" << destinationDirectory;
@@ -171,7 +171,7 @@ bool CliInterface::extractFiles(const QList<Archive::Entry*> &files, const QStri
return true;
}
-bool CliInterface::addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options)
+bool CliInterface::addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options)
{
cacheParameterList();
@@ -179,7 +179,7 @@ bool CliInterface::addFiles(const QList<Archive::Entry*> &files, const Archive::
const QStringList addArgs = m_param.value(AddArgs).toStringList();
- QList<Archive::Entry*> filesToPass = QList<Archive::Entry*>();
+ QVector<Archive::Entry*> filesToPass = QVector<Archive::Entry*>();
// If destination path is specified, we have recreate its structure inside the temp directory
// and then place symlinks of targeted files there.
const QString destinationPath = (destination == Q_NULLPTR)
@@ -246,7 +246,7 @@ bool CliInterface::addFiles(const QList<Archive::Entry*> &files, const Archive::
return runProcess(m_param.value(AddProgram).toStringList(), args);
}
-bool CliInterface::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool CliInterface::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(options);
@@ -254,7 +254,7 @@ bool CliInterface::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry
m_operationMode = Move;
m_removedFiles = files;
- QList<Archive::Entry*> withoutChildren = entriesWithoutChildren(files);
+ QVector<Archive::Entry*> withoutChildren = entriesWithoutChildren(files);
setNewMovedFiles(files, destination, withoutChildren.count());
const auto moveArgs = m_param.value(MoveArgs).toStringList();
@@ -264,7 +264,7 @@ bool CliInterface::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry
return runProcess(m_param.value(MoveProgram).toStringList(), args);
}
-bool CliInterface::copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool CliInterface::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
m_oldWorkingDir = QDir::currentPath();
m_tempExtractDir = new QTemporaryDir();
@@ -281,7 +281,7 @@ bool CliInterface::copyFiles(const QList<Archive::Entry*> &files, Archive::Entry
return extractFiles(files, QDir::currentPath(), m_passedOptions);
}
-bool CliInterface::deleteFiles(const QList<Archive::Entry*> &files)
+bool CliInterface::deleteFiles(const QVector<Archive::Entry*> &files)
{
cacheParameterList();
m_operationMode = Delete;
@@ -500,7 +500,7 @@ void CliInterface::continueCopying(bool result)
}
}
-bool CliInterface::moveDroppedFilesToDest(const QList<Archive::Entry*> &files, const QString &finalDest)
+bool CliInterface::moveDroppedFilesToDest(const QVector<Archive::Entry*> &files, const QString &finalDest)
{
// Move extracted files from a QTemporaryDir to the final destination.
@@ -717,7 +717,7 @@ QStringList CliInterface::substituteListVariables(const QStringList &listArgs, c
return args;
}
-QStringList CliInterface::substituteExtractVariables(const QStringList &extractArgs, const QList<Archive::Entry*> &entries, bool preservePaths, const QString &password)
+QStringList CliInterface::substituteExtractVariables(const QStringList &extractArgs, const QVector<Archive::Entry*> &entries, bool preservePaths, const QString &password)
{
// Required if we call this function from unit tests.
cacheParameterList();
@@ -756,7 +756,7 @@ QStringList CliInterface::substituteExtractVariables(const QStringList &extractA
return args;
}
-QStringList CliInterface::substituteAddVariables(const QStringList &addArgs, const QList<Archive::Entry*> &entries, const QString &password, bool encryptHeader, int compLevel, ulong volumeSize, QString compMethod)
+QStringList CliInterface::substituteAddVariables(const QStringList &addArgs, const QVector<Archive::Entry*> &entries, const QString &password, bool encryptHeader, int compLevel, ulong volumeSize, QString compMethod)
{
// Required if we call this function from unit tests.
cacheParameterList();
@@ -805,7 +805,7 @@ QStringList CliInterface::substituteAddVariables(const QStringList &addArgs, con
return args;
}
-QStringList CliInterface::substituteMoveVariables(const QStringList &moveArgs, const QList<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination, const QString &password)
+QStringList CliInterface::substituteMoveVariables(const QStringList &moveArgs, const QVector<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination, const QString &password)
{
// Required if we call this function from unit tests.
cacheParameterList();
@@ -839,7 +839,7 @@ QStringList CliInterface::substituteMoveVariables(const QStringList &moveArgs, c
return args;
}
-QStringList CliInterface::substituteDeleteVariables(const QStringList &deleteArgs, const QList<Archive::Entry*> &entries, const QString &password)
+QStringList CliInterface::substituteDeleteVariables(const QStringList &deleteArgs, const QVector<Archive::Entry*> &entries, const QString &password)
{
cacheParameterList();
@@ -932,7 +932,7 @@ QStringList CliInterface::substituteTestVariables(const QStringList &testArgs, c
return args;
}
-void CliInterface::setNewMovedFiles(const QList<Archive::Entry*> &entries, const Archive::Entry *destination, int entriesWithoutChildren)
+void CliInterface::setNewMovedFiles(const QVector<Archive::Entry*> &entries, const Archive::Entry *destination, int entriesWithoutChildren)
{
m_newMovedFiles.clear();
QMap<QString, const Archive::Entry*> entryMap;
@@ -1077,7 +1077,7 @@ QString CliInterface::multiVolumeSwitch(ulong volumeSize) const
return multiVolumeSwitch;
}
-QStringList CliInterface::extractFilesList(const QList<Archive::Entry*> &entries) const
+QStringList CliInterface::extractFilesList(const QVector<Archive::Entry*> &entries) const
{
QStringList filesList;
foreach (const Archive::Entry *e, entries) {
@@ -1487,7 +1487,7 @@ QString CliInterface::escapeFileName(const QString& fileName) const
return fileName;
}
-QStringList CliInterface::entryPathDestinationPairs(const QList<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination)
+QStringList CliInterface::entryPathDestinationPairs(const QVector<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination)
{
QStringList pairList;
if (entriesWithoutChildren.count() > 1) {
diff --git a/kerfuffle/cliinterface.h b/kerfuffle/cliinterface.h
index d3e41c0..e207968 100644
--- a/kerfuffle/cliinterface.h
+++ b/kerfuffle/cliinterface.h
@@ -306,11 +306,11 @@ public:
virtual int copyRequiredSignals() const Q_DECL_OVERRIDE;
virtual bool list() Q_DECL_OVERRIDE;
- virtual bool extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) Q_DECL_OVERRIDE;
- virtual bool addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
- virtual bool moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
- virtual bool copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
- virtual bool deleteFiles(const QList<Archive::Entry*> &files) Q_DECL_OVERRIDE;
+ virtual bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool deleteFiles(const QVector<Archive::Entry*> &files) Q_DECL_OVERRIDE;
virtual bool addComment(const QString &comment) Q_DECL_OVERRIDE;
virtual bool testArchive() Q_DECL_OVERRIDE;
@@ -335,17 +335,17 @@ public:
bool moveToDestination(const QDir &tempDir, const QDir &destDir, bool preservePaths);
QStringList substituteListVariables(const QStringList &listArgs, const QString &password);
- QStringList substituteExtractVariables(const QStringList &extractArgs, const QList<Archive::Entry*> &entries, bool preservePaths, const QString &password);
- QStringList substituteAddVariables(const QStringList &addArgs, const QList<Archive::Entry*> &entries, const QString &password, bool encryptHeader, int compLevel, ulong volumeSize, QString compMethod);
- QStringList substituteMoveVariables(const QStringList &moveArgs, const QList<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination, const QString &password);
- QStringList substituteDeleteVariables(const QStringList &deleteArgs, const QList<Archive::Entry*> &entries, const QString &password);
+ QStringList substituteExtractVariables(const QStringList &extractArgs, const QVector<Archive::Entry*> &entries, bool preservePaths, const QString &password);
+ QStringList substituteAddVariables(const QStringList &addArgs, const QVector<Archive::Entry*> &entries, const QString &password, bool encryptHeader, int compLevel, ulong volumeSize, QString compMethod);
+ QStringList substituteMoveVariables(const QStringList &moveArgs, const QVector<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination, const QString &password);
+ QStringList substituteDeleteVariables(const QStringList &deleteArgs, const QVector<Archive::Entry*> &entries, const QString &password);
QStringList substituteCommentVariables(const QStringList &commentArgs, const QString &commentFile);
QStringList substituteTestVariables(const QStringList &testArgs, const QString &password);
/**
* @see ArchiveModel::entryPathsFromDestination
*/
- void setNewMovedFiles(const QList<Archive::Entry*> &entries, const Archive::Entry *destination, int entriesWithoutChildren);
+ void setNewMovedFiles(const QVector<Archive::Entry*> &entries, const Archive::Entry *destination, int entriesWithoutChildren);
/**
* @return The preserve path switch, according to the @p preservePaths extraction option.
@@ -373,7 +373,7 @@ public:
/**
* @return The list of selected files to extract.
*/
- QStringList extractFilesList(const QList<Archive::Entry*> &files) const;
+ QStringList extractFilesList(const QVector<Archive::Entry*> &files) const;
QString multiVolumeName() const Q_DECL_OVERRIDE;
@@ -433,8 +433,8 @@ protected:
QTemporaryDir *m_tempExtractDir;
QTemporaryDir *m_tempAddDir;
OperationMode m_subOperation;
- QList<Archive::Entry*> m_passedFiles;
- QList<Archive::Entry*> m_tempAddedFiles;
+ QVector<Archive::Entry*> m_passedFiles;
+ QVector<Archive::Entry*> m_tempAddedFiles;
Archive::Entry *m_passedDestination;
CompressionOptions m_passedOptions;
@@ -474,7 +474,7 @@ private:
* @param entriesWithoutChildren List of archive entries
* @param destination Must be a directory entry if QList contains more that one entry
*/
- QStringList entryPathDestinationPairs(const QList<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination);
+ QStringList entryPathDestinationPairs(const QVector<Archive::Entry*> &entriesWithoutChildren, const Archive::Entry *destination);
/**
* Wrapper around KProcess::write() or KPtyDevice::write(), depending on
@@ -482,7 +482,7 @@ private:
*/
void writeToProcess(const QByteArray& data);
- bool moveDroppedFilesToDest(const QList<Archive::Entry*> &files, const QString &finalDest);
+ bool moveDroppedFilesToDest(const QVector<Archive::Entry*> &files, const QString &finalDest);
/**
* @return Whether @p dir is an empty directory.
@@ -497,8 +497,8 @@ private:
QRegularExpression m_passwordPromptPattern;
QHash<int, QList<QRegularExpression> > m_patternCache;
- QList<Archive::Entry*> m_removedFiles;
- QList<Archive::Entry*> m_newMovedFiles;
+ QVector<Archive::Entry*> m_removedFiles;
+ QVector<Archive::Entry*> m_newMovedFiles;
int m_exitCode;
bool m_listEmptyLines;
QString m_storedFileName;
@@ -507,7 +507,7 @@ private:
QString m_extractDestDir;
QTemporaryDir *m_extractTempDir;
QTemporaryFile *m_commentTempFile;
- QList<Archive::Entry*> m_extractedFiles;
+ QVector<Archive::Entry*> m_extractedFiles;
protected slots:
virtual void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp
index b742adf..6734b71 100644
--- a/kerfuffle/jobs.cpp
+++ b/kerfuffle/jobs.cpp
@@ -400,7 +400,7 @@ void BatchExtractJob::setupDestination()
}
}
-CreateJob::CreateJob(Archive *archive, const QList<Archive::Entry *> &entries, const CompressionOptions &options)
+CreateJob::CreateJob(Archive *archive, const QVector<Archive::Entry*> &entries, const CompressionOptions &options)
: Job(archive)
, m_entries(entries)
, m_options(options)
@@ -430,7 +430,7 @@ void CreateJob::doWork()
}
}
-ExtractJob::ExtractJob(const QList<Archive::Entry*> &entries, const QString &destinationDir, const ExtractionOptions &options, ReadOnlyArchiveInterface *interface)
+ExtractJob::ExtractJob(const QVector<Archive::Entry*> &entries, const QString &destinationDir, const ExtractionOptions &options, ReadOnlyArchiveInterface *interface)
: Job(interface)
, m_entries(entries)
, m_destinationDir(destinationDir)
@@ -570,7 +570,7 @@ OpenWithJob::OpenWithJob(Archive::Entry *entry, bool passwordProtectedHint, Read
qCDebug(ARK) << "OpenWithJob started";
}
-AddJob::AddJob(const QList<Archive::Entry*> &entries, const Archive::Entry *destination, const CompressionOptions& options , ReadWriteArchiveInterface *interface)
+AddJob::AddJob(const QVector<Archive::Entry*> &entries, const Archive::Entry *destination, const CompressionOptions& options , ReadWriteArchiveInterface *interface)
: Job(interface)
, m_entries(entries)
, m_destination(destination)
@@ -649,7 +649,7 @@ void AddJob::onFinished(bool result)
Job::onFinished(result);
}
-MoveJob::MoveJob(const QList<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions& options , ReadWriteArchiveInterface *interface)
+MoveJob::MoveJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions& options , ReadWriteArchiveInterface *interface)
: Job(interface)
, m_finishedSignalsCount(0)
, m_entries(entries)
@@ -687,7 +687,7 @@ void MoveJob::onFinished(bool result)
}
}
-CopyJob::CopyJob(const QList<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions &options, ReadWriteArchiveInterface *interface)
+CopyJob::CopyJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions &options, ReadWriteArchiveInterface *interface)
: Job(interface)
, m_finishedSignalsCount(0)
, m_entries(entries)
@@ -725,7 +725,7 @@ void CopyJob::onFinished(bool result)
}
}
-DeleteJob::DeleteJob(const QList<Archive::Entry*> &entries, ReadWriteArchiveInterface *interface)
+DeleteJob::DeleteJob(const QVector<Archive::Entry*> &entries, ReadWriteArchiveInterface *interface)
: Job(interface)
, m_entries(entries)
{
diff --git a/kerfuffle/jobs.h b/kerfuffle/jobs.h
index 82fbbaa..11ab026 100644
--- a/kerfuffle/jobs.h
+++ b/kerfuffle/jobs.h
@@ -65,7 +65,7 @@ protected:
virtual bool doKill() Q_DECL_OVERRIDE;
ReadOnlyArchiveInterface *archiveInterface();
- QList<Archive::Entry*> m_archiveEntries;
+ QVector<Archive::Entry*> m_archiveEntries;
void connectToArchiveInterfaceSignals();
@@ -186,7 +186,7 @@ class KERFUFFLE_EXPORT CreateJob : public Job
Q_OBJECT
public:
- explicit CreateJob(Archive *archive, const QList<Archive::Entry*> &entries, const CompressionOptions& options);
+ explicit CreateJob(Archive *archive, const QVector<Archive::Entry*> &entries, const CompressionOptions& options);
/**
* @param password The password to encrypt the archive with.
@@ -203,7 +203,7 @@ public slots:
virtual void doWork() Q_DECL_OVERRIDE;
private:
- QList<Archive::Entry*> m_entries;
+ QVector<Archive::Entry*> m_entries;
CompressionOptions m_options;
};
@@ -212,7 +212,7 @@ class KERFUFFLE_EXPORT ExtractJob : public Job
Q_OBJECT
public:
- ExtractJob(const QList<Archive::Entry*> &entries, const QString& destinationDir, const ExtractionOptions& options, ReadOnlyArchiveInterface *interface);
+ ExtractJob(const QVector<Archive::Entry*> &entries, const QString& destinationDir, const ExtractionOptions& options, ReadOnlyArchiveInterface *interface);
QString destinationDirectory() const;
ExtractionOptions extractionOptions() const;
@@ -224,7 +224,7 @@ private:
// TODO: Maybe this should be a method if ExtractionOptions were a class?
void setDefaultOptions();
- QList<Archive::Entry*> m_entries;
+ QVector<Archive::Entry*> m_entries;
QString m_destinationDir;
ExtractionOptions m_options;
};
@@ -303,7 +303,7 @@ class KERFUFFLE_EXPORT AddJob : public Job
Q_OBJECT
public:
- AddJob(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
+ AddJob(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() Q_DECL_OVERRIDE;
@@ -313,7 +313,7 @@ protected slots:
private:
QString m_oldWorkingDir;
- const QList<Archive::Entry*> m_entries;
+ const QVector<Archive::Entry*> m_entries;
const Archive::Entry *m_destination;
CompressionOptions m_options;
};
@@ -327,7 +327,7 @@ class KERFUFFLE_EXPORT MoveJob : public Job
Q_OBJECT
public:
- MoveJob(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
+ MoveJob(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() Q_DECL_OVERRIDE;
@@ -337,7 +337,7 @@ protected slots:
private:
int m_finishedSignalsCount;
- const QList<Archive::Entry*> m_entries;
+ const QVector<Archive::Entry*> m_entries;
Archive::Entry *m_destination;
CompressionOptions m_options;
};
@@ -351,7 +351,7 @@ class KERFUFFLE_EXPORT CopyJob : public Job
Q_OBJECT
public:
- CopyJob(const QList<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
+ CopyJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() Q_DECL_OVERRIDE;
@@ -361,7 +361,7 @@ protected slots:
private:
int m_finishedSignalsCount;
- const QList<Archive::Entry*> m_entries;
+ const QVector<Archive::Entry*> m_entries;
Archive::Entry *m_destination;
CompressionOptions m_options;
};
@@ -371,13 +371,13 @@ class KERFUFFLE_EXPORT DeleteJob : public Job
Q_OBJECT
public:
- DeleteJob(const QList<Archive::Entry*> &files, ReadWriteArchiveInterface *interface);
+ DeleteJob(const QVector<Archive::Entry*> &files, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() Q_DECL_OVERRIDE;
private:
- QList<Archive::Entry*> m_entries;
+ QVector<Archive::Entry*> m_entries;
};
class KERFUFFLE_EXPORT CommentJob : public Job
diff --git a/part/archivemodel.cpp b/part/archivemodel.cpp
index d26ee08..9be3c1a 100644
--- a/part/archivemodel.cpp
+++ b/part/archivemodel.cpp
@@ -378,7 +378,7 @@ void ArchiveModel::sort(int column, Qt::SortOrder order)
emit layoutAboutToBeChanged();
- QList<Archive::Entry*> dirEntries;
+ QVector<Archive::Entry*> dirEntries;
m_rootEntry.returnDirEntries(&dirEntries);
dirEntries.append(&m_rootEntry);
@@ -761,11 +761,11 @@ KJob *ArchiveModel::loadArchive(const QString &path, const QString &mimeType, QO
ExtractJob* ArchiveModel::extractFile(Archive::Entry *file, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options) const
{
- QList<Archive::Entry*> files({file});
+ QVector<Archive::Entry*> files({file});
return extractFiles(files, destinationDir, options);
}
-ExtractJob* ArchiveModel::extractFiles(const QList<Archive::Entry*>& files, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options) const
+ExtractJob* ArchiveModel::extractFiles(const QVector<Archive::Entry*>& files, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options) const
{
Q_ASSERT(m_archive);
ExtractJob *newJob = m_archive->extractFiles(files, destinationDir, options);
@@ -797,7 +797,7 @@ OpenWithJob *ArchiveModel::openWith(Archive::Entry *file) const
return job;
}
-AddJob* ArchiveModel::addFiles(QList<Archive::Entry*> &entries, const Archive::Entry *destination, const CompressionOptions& options)
+AddJob* ArchiveModel::addFiles(QVector<Archive::Entry*> &entries, const Archive::Entry *destination, const CompressionOptions& options)
{
if (!m_archive) {
return Q_NULLPTR;
@@ -814,7 +814,7 @@ AddJob* ArchiveModel::addFiles(QList<Archive::Entry*> &entries, const Archive::E
return Q_NULLPTR;
}
-Kerfuffle::MoveJob *ArchiveModel::moveFiles(QList<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions &options)
+Kerfuffle::MoveJob *ArchiveModel::moveFiles(QVector<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions &options)
{
if (!m_archive) {
return Q_NULLPTR;
@@ -832,7 +832,7 @@ Kerfuffle::MoveJob *ArchiveModel::moveFiles(QList<Archive::Entry*> &entries, Arc
}
return Q_NULLPTR;
}
-Kerfuffle::CopyJob *ArchiveModel::copyFiles(QList<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions &options)
+Kerfuffle::CopyJob *ArchiveModel::copyFiles(QVector<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions &options)
{
if (!m_archive) {
return Q_NULLPTR;
@@ -849,7 +849,7 @@ Kerfuffle::CopyJob *ArchiveModel::copyFiles(QList<Archive::Entry*> &entries, Arc
return Q_NULLPTR;
}
-DeleteJob* ArchiveModel::deleteFiles(QList<Archive::Entry*> entries)
+DeleteJob* ArchiveModel::deleteFiles(QVector<Archive::Entry*> entries)
{
Q_ASSERT(m_archive);
if (!m_archive->isReadOnly()) {
@@ -948,7 +948,7 @@ bool ArchiveModel::hasDuplicatedEntries(const QStringList &entries)
return false;
}
-QMap<QString, Archive::Entry*> ArchiveModel::entryMap(const QList<Archive::Entry*> &entries)
+QMap<QString, Archive::Entry*> ArchiveModel::entryMap(const QVector<Archive::Entry*> &entries)
{
QMap<QString, Archive::Entry*> map;
foreach (Archive::Entry *entry, entries) {
diff --git a/part/archivemodel.h b/part/archivemodel.h
index 1a671df..58b3cff 100644
--- a/part/archivemodel.h
+++ b/part/archivemodel.h
@@ -71,16 +71,16 @@ public:
int childCount(const QModelIndex &index, int &dirs, int &files) const;
Kerfuffle::ExtractJob* extractFile(Archive::Entry *file, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options = Kerfuffle::ExtractionOptions()) const;
- Kerfuffle::ExtractJob* extractFiles(const QList<Archive::Entry*>& files, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options = Kerfuffle::ExtractionOptions()) const;
+ Kerfuffle::ExtractJob* extractFiles(const QVector<Archive::Entry*>& files, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options = Kerfuffle::ExtractionOptions()) const;
Kerfuffle::PreviewJob* preview(Archive::Entry *file) const;
Kerfuffle::OpenJob* open(Archive::Entry *file) const;
Kerfuffle::OpenWithJob* openWith(Archive::Entry *file) const;
- Kerfuffle::AddJob* addFiles(QList<Archive::Entry*> &entries, const Archive::Entry *destination, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
- Kerfuffle::MoveJob* moveFiles(QList<Archive::Entry*> &entries, Archive::Entry *destination, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
- Kerfuffle::CopyJob* copyFiles(QList<Archive::Entry*> &entries, Archive::Entry *destination, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
- Kerfuffle::DeleteJob* deleteFiles(QList<Archive::Entry*> entries);
+ Kerfuffle::AddJob* addFiles(QVector<Archive::Entry*> &entries, const Archive::Entry *destination, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
+ Kerfuffle::MoveJob* moveFiles(QVector<Archive::Entry*> &entries, Archive::Entry *destination, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
+ Kerfuffle::CopyJob* copyFiles(QVector<Archive::Entry*> &entries, Archive::Entry *destination, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
+ Kerfuffle::DeleteJob* deleteFiles(QVector<Archive::Entry*> entries);
/**
* @param password The password to encrypt the archive with.
@@ -111,7 +111,7 @@ public:
static bool hasDuplicatedEntries(const QStringList &entries);
- static QMap<QString, Archive::Entry*> entryMap(const QList<Archive::Entry*> &entries);
+ static QMap<QString, Archive::Entry*> entryMap(const QVector<Archive::Entry*> &entries);
const QHash<QString, QIcon> entryIcons() const;
diff --git a/part/part.cpp b/part/part.cpp
index 2ebcc31..21eb53e 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -1109,7 +1109,7 @@ void Part::slotShowExtractionDialog()
updateQuickExtractMenu(m_extractArchiveAction);
updateQuickExtractMenu(m_extractAction);
- QList<Archive::Entry*> files;
+ QVector<Archive::Entry*> files;
// If the user has chosen to extract only selected entries, fetch these
// from the QTreeView.
@@ -1160,9 +1160,9 @@ QModelIndexList Part::addChildren(const QModelIndexList &list) const
return ret;
}
-QList<Archive::Entry*> Part::filesForIndexes(const QModelIndexList& list) const
+QVector<Archive::Entry*> Part::filesForIndexes(const QModelIndexList& list) const
{
- QList<Archive::Entry*> ret;
+ QVector<Archive::Entry*> ret;
foreach(const QModelIndex& index, list) {
ret << m_model->entryForIndex(index);
@@ -1171,9 +1171,9 @@ QList<Archive::Entry*> Part::filesForIndexes(const QModelIndexList& list) const
return ret;
}
-QList<Kerfuffle::Archive::Entry*> Part::filesAndRootNodesForIndexes(const QModelIndexList& list) const
+QVector<Kerfuffle::Archive::Entry*> Part::filesAndRootNodesForIndexes(const QModelIndexList& list) const
{
- QList<Kerfuffle::Archive::Entry*> fileList;
+ QVector<Kerfuffle::Archive::Entry*> fileList;
QStringList fullPathsList;
foreach (const QModelIndex& index, list) {
@@ -1437,7 +1437,7 @@ void Part::slotRenameFile(const QString &name)
return;
}
const Archive::Entry *entry = m_model->entryForIndex(m_view->selectionModel()->currentIndex());
- QList<Archive::Entry*> entriesToMove = filesForIndexes(addChildren(m_view->selectionModel()->selectedRows()));
+ QVector<Archive::Entry*> entriesToMove = filesForIndexes(addChildren(m_view->selectionModel()->selectedRows()));
m_destination = new Archive::Entry();
const QString &entryPath = entry->fullPath(true);
@@ -1461,7 +1461,7 @@ void Part::slotPasteFiles()
if (m_model->filesToMove.count() > 0) {
// Changing destination to include new entry path if pasting only 1 entry.
- QList<Archive::Entry*> entriesWithoutChildren = ReadOnlyArchiveInterface::entriesWithoutChildren(m_model->filesToMove.values());
+ QVector<Archive::Entry*> entriesWithoutChildren = ReadOnlyArchiveInterface::entriesWithoutChildren(QVector<Archive::Entry*>::fromList(m_model->filesToMove.values()));
if (entriesWithoutChildren.count() == 1) {
const Archive::Entry *entry = entriesWithoutChildren.first();
const QString nameWithSlash = entry->name() + ((entry->isDir()) ? QLatin1Char('/') : QChar());
@@ -1479,12 +1479,12 @@ void Part::slotPasteFiles()
return;
}
}
- QList<Archive::Entry*> entryList = m_model->filesToMove.values();
+ auto entryList = QVector<Archive::Entry*>::fromList(m_model->filesToMove.values());
slotPasteFiles(entryList, m_destination, entriesWithoutChildren.count());
m_model->filesToMove.clear();
}
else {
- QList<Archive::Entry*> entryList = m_model->filesToCopy.values();
+ auto entryList = QVector<Archive::Entry*>::fromList(m_model->filesToCopy.values());
slotPasteFiles(entryList, m_destination, 0);
m_model->filesToCopy.clear();
}
@@ -1492,7 +1492,7 @@ void Part::slotPasteFiles()
updateActions();
}
-void Part::slotPasteFiles(QList<Kerfuffle::Archive::Entry*> &files, Kerfuffle::Archive::Entry *destination, int entriesWithoutChildren)
+void Part::slotPasteFiles(QVector<Kerfuffle::Archive::Entry*> &files, Kerfuffle::Archive::Entry *destination, int entriesWithoutChildren)
{
if (files.isEmpty()) {
delete m_destination;
diff --git a/part/part.h b/part/part.h
index b7996ca..4a7e8f5 100644
--- a/part/part.h
+++ b/part/part.h
@@ -126,7 +126,7 @@ private slots:
* the path has to contain a new filename too.
* @param entriesWithoutChildren Entries count, excluding their children. For CopyJob 0 MUST be passed.
*/
- void slotPasteFiles(QList<Kerfuffle::Archive::Entry*> &files, Kerfuffle::Archive::Entry *destination, int entriesWithoutChildren);
+ void slotPasteFiles(QVector<Kerfuffle::Archive::Entry*> &files, Kerfuffle::Archive::Entry *destination, int entriesWithoutChildren);
void slotAddFiles();
void slotEditFileName();
@@ -171,8 +171,8 @@ private:
void setupActions();
bool isSingleFolderArchive() const;
QString detectSubfolder() const;
- QList<Kerfuffle::Archive::Entry*> filesForIndexes(const QModelIndexList& list) const;
- QList<Kerfuffle::Archive::Entry*> filesAndRootNodesForIndexes(const QModelIndexList& list) const;
+ QVector<Kerfuffle::Archive::Entry*> filesForIndexes(const QModelIndexList& list) const;
+ QVector<Kerfuffle::Archive::Entry*> filesAndRootNodesForIndexes(const QModelIndexList& list) const;
QModelIndexList addChildren(const QModelIndexList &list) const;
void registerJob(KJob *job);
@@ -201,7 +201,7 @@ private:
OpenFileMode m_openFileMode;
QUrl m_lastUsedAddPath;
- QList<Kerfuffle::Archive::Entry*> m_jobTempEntries;
+ QVector<Kerfuffle::Archive::Entry*> m_jobTempEntries;
Kerfuffle::Archive::Entry *m_destination;
QModelIndexList m_cutIndexes;
diff --git a/plugins/cliunarchiverplugin/cliplugin.cpp b/plugins/cliunarchiverplugin/cliplugin.cpp
index a64c391..b7d2482 100644
--- a/plugins/cliunarchiverplugin/cliplugin.cpp
+++ b/plugins/cliunarchiverplugin/cliplugin.cpp
@@ -54,7 +54,7 @@ bool CliPlugin::list()
return runProcess(m_param.value(ListProgram).toStringList(), args);
}
-bool CliPlugin::extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
+bool CliPlugin::extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
{
ExtractionOptions newOptions = options;
diff --git a/plugins/cliunarchiverplugin/cliplugin.h b/plugins/cliunarchiverplugin/cliplugin.h
index 26b0da1..e703d8b 100644
--- a/plugins/cliunarchiverplugin/cliplugin.h
+++ b/plugins/cliunarchiverplugin/cliplugin.h
@@ -35,7 +35,7 @@ public:
virtual ~CliPlugin();
virtual bool list() Q_DECL_OVERRIDE;
- virtual bool extractFiles(const QList<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool extractFiles(const QVector<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options) Q_DECL_OVERRIDE;
virtual void resetParsing() Q_DECL_OVERRIDE;
virtual Kerfuffle::ParameterList parameterList() const Q_DECL_OVERRIDE;
virtual bool readListLine(const QString &line) Q_DECL_OVERRIDE;
diff --git a/plugins/clizipplugin/cliplugin.cpp b/plugins/clizipplugin/cliplugin.cpp
index 0a8f381..50d3957 100644
--- a/plugins/clizipplugin/cliplugin.cpp
+++ b/plugins/clizipplugin/cliplugin.cpp
@@ -200,7 +200,7 @@ bool CliPlugin::readListLine(const QString &line)
return true;
}
-bool CliPlugin::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool CliPlugin::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
m_oldWorkingDir = QDir::currentPath();
m_tempExtractDir = new QTemporaryDir();
diff --git a/plugins/clizipplugin/cliplugin.h b/plugins/clizipplugin/cliplugin.h
index aacd16c..4a789ee 100644
--- a/plugins/clizipplugin/cliplugin.h
+++ b/plugins/clizipplugin/cliplugin.h
@@ -41,7 +41,7 @@ public:
virtual Kerfuffle::ParameterList parameterList() const Q_DECL_OVERRIDE;
virtual bool readListLine(const QString &line) Q_DECL_OVERRIDE;
- virtual bool moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
+ virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) Q_DECL_OVERRIDE;
virtual int moveRequiredSignals() const Q_DECL_OVERRIDE;
virtual QString compressionMethodSwitch(const QString &method) const Q_DECL_OVERRIDE;
diff --git a/plugins/libarchive/libarchiveplugin.cpp b/plugins/libarchive/libarchiveplugin.cpp
index 6f2c6ad..c808fd4 100644
--- a/plugins/libarchive/libarchiveplugin.cpp
+++ b/plugins/libarchive/libarchiveplugin.cpp
@@ -98,7 +98,7 @@ bool LibarchivePlugin::list()
return archive_read_close(m_archiveReader.data()) == ARCHIVE_OK;
}
-bool LibarchivePlugin::addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options)
+bool LibarchivePlugin::addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(files)
Q_UNUSED(destination)
@@ -106,7 +106,7 @@ bool LibarchivePlugin::addFiles(const QList<Archive::Entry*> &files, const Archi
return false;
}
-bool LibarchivePlugin::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool LibarchivePlugin::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(files)
Q_UNUSED(destination)
@@ -114,7 +114,7 @@ bool LibarchivePlugin::moveFiles(const QList<Archive::Entry*> &files, Archive::E
return false;
}
-bool LibarchivePlugin::copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool LibarchivePlugin::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(files)
Q_UNUSED(destination)
@@ -122,7 +122,7 @@ bool LibarchivePlugin::copyFiles(const QList<Archive::Entry*> &files, Archive::E
return false;
}
-bool LibarchivePlugin::deleteFiles(const QList<Archive::Entry*> &files)
+bool LibarchivePlugin::deleteFiles(const QVector<Archive::Entry*> &files)
{
Q_UNUSED(files)
return false;
@@ -144,7 +144,7 @@ bool LibarchivePlugin::doKill()
return true;
}
-bool LibarchivePlugin::extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
+bool LibarchivePlugin::extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
{
qCDebug(ARK) << "Changing current directory to " << destinationDirectory;
QDir::setCurrent(destinationDirectory);
diff --git a/plugins/libarchive/libarchiveplugin.h b/plugins/libarchive/libarchiveplugin.h
index 8eb0a20..6bb799e 100644
--- a/plugins/libarchive/libarchiveplugin.h
+++ b/plugins/libarchive/libarchiveplugin.h
@@ -47,12 +47,12 @@ public:
virtual bool list() Q_DECL_OVERRIDE;
virtual bool doKill() Q_DECL_OVERRIDE;
- virtual bool extractFiles(const QList<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) Q_DECL_OVERRIDE;
- virtual bool addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
- virtual bool moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
- virtual bool copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
- virtual bool deleteFiles(const QList<Archive::Entry*> &files) Q_DECL_OVERRIDE;
+ virtual bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool deleteFiles(const QVector<Archive::Entry*> &files) Q_DECL_OVERRIDE;
virtual bool addComment(const QString &comment) Q_DECL_OVERRIDE;
virtual bool testArchive() Q_DECL_OVERRIDE;
diff --git a/plugins/libarchive/readwritelibarchiveplugin.cpp b/plugins/libarchive/readwritelibarchiveplugin.cpp
index 6ed3eb9..52e2270 100644
--- a/plugins/libarchive/readwritelibarchiveplugin.cpp
+++ b/plugins/libarchive/readwritelibarchiveplugin.cpp
@@ -47,7 +47,7 @@ ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin()
{
}
-bool ReadWriteLibarchivePlugin::addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options)
+bool ReadWriteLibarchivePlugin::addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options)
{
qCDebug(ARK) << "Adding" << files.size() << "entries with CompressionOptions" << options;
@@ -132,7 +132,7 @@ bool ReadWriteLibarchivePlugin::addFiles(const QList<Archive::Entry*> &files, co
return isSuccessful;
}
-bool ReadWriteLibarchivePlugin::moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool ReadWriteLibarchivePlugin::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(options);
@@ -163,7 +163,7 @@ bool ReadWriteLibarchivePlugin::moveFiles(const QList<Archive::Entry*> &files, A
return isSuccessful;
}
-bool ReadWriteLibarchivePlugin::copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
+bool ReadWriteLibarchivePlugin::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(options);
@@ -194,7 +194,7 @@ bool ReadWriteLibarchivePlugin::copyFiles(const QList<Archive::Entry*> &files, A
return isSuccessful;
}
-bool ReadWriteLibarchivePlugin::deleteFiles(const QList<Archive::Entry*> &files)
+bool ReadWriteLibarchivePlugin::deleteFiles(const QVector<Archive::Entry*> &files)
{
qCDebug(ARK) << "Deleting" << files.size() << "entries";
diff --git a/plugins/libarchive/readwritelibarchiveplugin.h b/plugins/libarchive/readwritelibarchiveplugin.h
index 81f87d0..bdbddb5 100644
--- a/plugins/libarchive/readwritelibarchiveplugin.h
+++ b/plugins/libarchive/readwritelibarchiveplugin.h
@@ -44,10 +44,10 @@ public:
explicit ReadWriteLibarchivePlugin(QObject *parent, const QVariantList &args);
~ReadWriteLibarchivePlugin();
- bool addFiles(const QList<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
- bool moveFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
- bool copyFiles(const QList<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
- bool deleteFiles(const QList<Archive::Entry*> &files) Q_DECL_OVERRIDE;
+ bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
+ bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
+ bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) Q_DECL_OVERRIDE;
+ bool deleteFiles(const QVector<Archive::Entry*> &files) Q_DECL_OVERRIDE;
protected:
bool initializeWriter(const bool creatingNewFile = false, const CompressionOptions &options = CompressionOptions());
diff --git a/plugins/libsinglefileplugin/singlefileplugin.cpp b/plugins/libsinglefileplugin/singlefileplugin.cpp
index 8a61f27..ddd5158 100644
--- a/plugins/libsinglefileplugin/singlefileplugin.cpp
+++ b/plugins/libsinglefileplugin/singlefileplugin.cpp
@@ -44,7 +44,7 @@ LibSingleFileInterface::~LibSingleFileInterface()
{
}
-bool LibSingleFileInterface::extractFiles(const QList<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options)
+bool LibSingleFileInterface::extractFiles(const QVector<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options)
{
Q_UNUSED(files)
Q_UNUSED(options)
diff --git a/plugins/libsinglefileplugin/singlefileplugin.h b/plugins/libsinglefileplugin/singlefileplugin.h
index a6ff21b..20aeb20 100644
--- a/plugins/libsinglefileplugin/singlefileplugin.h
+++ b/plugins/libsinglefileplugin/singlefileplugin.h
@@ -39,7 +39,7 @@ public:
virtual bool list() Q_DECL_OVERRIDE;
virtual bool testArchive() Q_DECL_OVERRIDE;
- virtual bool extractFiles(const QList<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options) Q_DECL_OVERRIDE;
+ virtual bool extractFiles(const QVector<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options) Q_DECL_OVERRIDE;
protected:
const QString uncompressedFileName() const;