Skip to content

feat: replace QtIOCompressor with KArchive#82

Merged
nullobsi merged 6 commits intonullobsi:mainfrom
gbcox:cantata-p2-drop-qtio
Sep 4, 2025
Merged

feat: replace QtIOCompressor with KArchive#82
nullobsi merged 6 commits intonullobsi:mainfrom
gbcox:cantata-p2-drop-qtio

Conversation

@gbcox
Copy link

@gbcox gbcox commented Aug 10, 2025

This patch completes the transition away from QtIOCompressor by removing all remaining references and cleanup logic. It follows P1, which replaced bundled usage with the system library.

Changes:

Removed all QtIOCompressor includes and usage

Dropped conditional build logic and leftover symbols

Verified that Cantata builds and runs cleanly without the library

{
QString fileName = QFileDialog::getOpenFileName(this, tr("Import Streams"), QDir::homePath(),
tr("XML Streams (*.xml *.xml.gz *.cantata)"));
tr("XML Streams (*.xml *.xml *.cantata)"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this translation is broken. Probably needs to just be "XML Streams (*.xml *.cantata)" (though, what is a .cantata file?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the intent was *.xml... I didn't touch *.cantata because I wasn't sure but agree, it probably isn't valid. Worse case it's some legacy thing that is no longer used.

<message>
<location filename="../streams/streamspage.cpp" line="207"/>
<source>XML Streams (*.xml *.xml.gz *.cantata)</source>
<source>XML Streams (*.xml * *.cantata)</source>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *.xml.gz was an oversight on my part... I was just getting rid of the .gz extensions and missed the fact there was already *.xml there, so it is indeed a duplicate. I'm thinking that the *.cantata must be some kind of legacy thing, I looked and don't see it mentioned anywhere else, so safe to delete also I believe.

<message>
<location filename="../streams/streamspage.cpp" line="218"/>
<source>XML Streams (*.xml.gz)</source>
<source>XML Streams (*)</source>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a miss, I had intended it to be: XML Streams (*.xml) I think * would be too generic

@gbcox
Copy link
Author

gbcox commented Aug 13, 2025

ok, let me take a look. so you have done p0, p1 and now you're on p2.

compressor.setStreamFormat(QtIOCompressor::GzipFormat);
if (compressor.open(QIODevice::ReadOnly)) {
data = compressor.readAll();
if (f.open(QIODevice::ReadOnly)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are going to add KF6Archive as a dependency, why completely get rid of compression here? we might as well avoid spoiling existing caches

plus, it seems KCompressionDevice's interface is pretty similar to use, so I think I will spend some time to adjust these changes to use KCompressionDevice as well

@gbcox
Copy link
Author

gbcox commented Aug 24, 2025

My impression from looking at it was that the existing working services don't use or don't need. Where do you believe it would be useful or make a difference.

@nullobsi nullobsi force-pushed the cantata-p2-drop-qtio branch from c6084df to b2ceacf Compare September 4, 2025 03:03
heirecka and others added 6 commits September 4, 2025 11:05
It has been deprecated with 6.10. Unfortunately endFilterChange() is
only available since that version.
Add option BUNDLED_KARCHIVE to determine whether this is used.
Where QTIOCompressor was used, it is replaced with KCompressionDevice.
@nullobsi nullobsi force-pushed the cantata-p2-drop-qtio branch from 0784a39 to 9ee0414 Compare September 4, 2025 18:55
@nullobsi nullobsi dismissed their stale review September 4, 2025 18:56

Fixed in subsequent commits.

@nullobsi nullobsi changed the title Cantata p2 drop qtio feat: replace QtIOCompressor with KArchive Sep 4, 2025
@nullobsi nullobsi merged commit 9ee0414 into nullobsi:main Sep 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants