Compare commits

..

2 commits

Author SHA1 Message Date
f14f6cbe0f
headers
All checks were successful
eden-license / license-header (pull_request) Successful in 28s
Signed-off-by: crueter <crueter@eden-emu.dev>
2025-10-09 15:20:46 -04:00
6be4b03050
[desktop] feat: import/export data
Some checks failed
eden-license / license-header (pull_request) Failing after 30s
Currently not the ideal solution. Can't be cancelled due to JlCompress
currently lacking a method of cancellation, but for now this is a good
prototype.

Signed-off-by: crueter <crueter@eden-emu.dev>
2025-10-09 15:19:32 -04:00
12 changed files with 57 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 598 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 612 B

Before After
Before After

56
quazip.patch Normal file
View file

@ -0,0 +1,56 @@
diff --git a/quazip/JlCompress.cpp b/quazip/JlCompress.cpp
index 5394b2c..c189e8b 100644
--- a/quazip/JlCompress.cpp
+++ b/quazip/JlCompress.cpp
@@ -26,6 +26,8 @@ see quazip/(un)zip.h files for details. Basically it's the zlib license.
#include "JlCompress.h"
#include <memory>
+bool JlCompress::m_cancelled = false;
+
bool JlCompress::copyData(QIODevice &inFile, QIODevice &outFile)
{
while (!inFile.atEnd()) {
@@ -474,6 +476,11 @@ QStringList JlCompress::getFileList(QIODevice *ioDevice)
return getFileList(zip);
}
+void JlCompress::cancel()
+{
+ m_cancelled = true;
+}
+
QString JlCompress::extractFile(QIODevice *ioDevice, QString fileName, QString fileDest)
{
QuaZip zip(ioDevice);
@@ -484,4 +491,4 @@ QStringList JlCompress::extractFiles(QIODevice *ioDevice, QStringList files, QSt
{
QuaZip zip(ioDevice);
return extractFiles(zip, files, dir);
-}
+}
diff --git a/quazip/JlCompress.h b/quazip/JlCompress.h
index 1b009f2..28b4aba 100644
--- a/quazip/JlCompress.h
+++ b/quazip/JlCompress.h
@@ -77,7 +77,7 @@ public:
};
public:
- explicit Options(const CompressionStrategy& strategy)
+ explicit Options(const CompressionStrategy& strategy)
: m_compressionStrategy(strategy) {}
explicit Options(const QDateTime& dateTime = QDateTime(), const CompressionStrategy& strategy = Default)
@@ -323,6 +323,11 @@ public:
are present separately.
*/
static QStringList getFileList(QIODevice *ioDevice);
+
+ static void cancel();
+
+private:
+ static bool m_cancelled;
};
#endif /* JLCOMPRESSFOLDER_H_ */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 438 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Before After
Before After

View file

@ -16,4 +16,5 @@ set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON)
AddJsonPackage(quazip)
# frozen
# TODO(crueter): Qt String Lookup
AddJsonPackage(frozen)