audio: Support loading of files from Qt embedded resources
ClosedPublic

Authored by aspotashev on Jun 8 2019, 9:48 PM.

Details

Summary

Library version has already been increased to 7.1.0 recently, and there
were no releases since then, so no need to increase it again.

Test Plan

tested with a modified version of KBlocks that loads sound files from its .qrc

Diff Detail

Repository
R420 KDE Games Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aspotashev created this revision.Jun 8 2019, 9:48 PM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptJun 8 2019, 9:48 PM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
aspotashev requested review of this revision.Jun 8 2019, 9:48 PM
aacid added inline comments.Jun 8 2019, 10:41 PM
audio/virtualfileqt-openal.h
27

Why make it a QObject?

aspotashev added inline comments.Jun 8 2019, 10:49 PM
audio/virtualfileqt-openal.h
27

oops, my idea was to destruct QFile with "this" as parent, but QFile will be destroyed anyway by default dtor.

aspotashev updated this revision to Diff 59429.Jun 8 2019, 11:22 PM

do not inherit QObject

aspotashev marked 2 inline comments as done.Jun 8 2019, 11:22 PM
aacid added a comment.Jun 9 2019, 4:28 PM

Code makes sense, haven't tried it though.

Probably would need to add some documentation to kgsndfile saying "since version x.y.x supports reading from qrc:" or similar?

aspotashev updated this revision to Diff 62498.Jul 24 2019, 7:30 PM
  • Bump version to 7.2.0, for release with KDE Applications 19.12.x
  • kgsound: Mention qrc support in Doxygen comments

as said, code looks reasonable to me but haven't tried it.

If you've tried and are confident that this doesn't break i'd say commit it :)

This revision was not accepted when it landed; it landed in state Needs Review.Jul 31 2019, 6:39 PM
This revision was automatically updated to reflect the committed changes.