Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 98d4637f authored by Kevin Funk's avatar Kevin Funk

Fix TagLib detection and build on Windows

Summary: Due to stricter setups on Windows, TagLib was detected but the includes were not found. This patch fixes this discrepancy. It further fixes some implicit conversions which were disallowed (from QByteArray to TagLib::Filename). End result: kio-extras builds on Windows again. No idea how long it's been like this, but it's a long time.

Test Plan:
Without patch: cmake finishes and finds taglib, build fails because includes are not found
With patch: cmake finishes and finds taglib, build competes because includes are found, and implicit conversions are now explicit.

Reviewers: #frameworks, kfunk

Reviewed By: kfunk

Subscribers: vonreth

Differential Revision:

(cherry picked from commit 5e6c6fe0)
parent 0d053b5d
......@@ -68,10 +68,11 @@ else(TAGLIBCONFIG_EXECUTABLE)
# To avoid issues, make the same assumption as above:
# Assume software will include by things like #include <taglib/tfile.h> instead of <tfile.h>
......@@ -163,31 +163,31 @@ bool AudioCreator::create(const QString &path, int, int, QImage &img)
if (type.inherits("audio/mpeg")) {
TagLib::MPEG::File file(QFile::encodeName(path));
TagLib::MPEG::File file(QFile::encodeName(path).data());
return parseID3v2Tag(file, img) || parseAPETag(file, img);
if (type.inherits("audio/x-flac") || type.inherits("audio/flac")) {
TagLib::FLAC::File file(QFile::encodeName(path));
TagLib::FLAC::File file(QFile::encodeName(path).data());
return parseFlacTag(file, img) || parseID3v2Tag(file, img);
if (type.inherits("audio/mp4") || type.inherits("audio/x-m4a")) {
TagLib::MP4::File file(QFile::encodeName(path));
TagLib::MP4::File file(QFile::encodeName(path).data());
return parseMP4Tag(file, img);
if (type.inherits("audio/x-ape")) {
TagLib::APE::File file(QFile::encodeName(path));
TagLib::APE::File file(QFile::encodeName(path).data());
return parseAPETag(file, img);
if (type.inherits("audio/x-wavpack") || type.inherits("audio/x-vw")) {
TagLib::WavPack::File file(QFile::encodeName(path));
TagLib::WavPack::File file(QFile::encodeName(path).data());
return parseAPETag(file, img);
if (type.inherits("audio/x-musepack")) {
TagLib::MPC::File file(QFile::encodeName(path));
TagLib::MPC::File file(QFile::encodeName(path).data());
return parseAPETag(file, img);
if (type.inherits("audio/ogg") || type.inherits("audio/vorbis")) {
TagLib::FileRef fileRef(QFile::encodeName(path));
TagLib::FileRef fileRef(QFile::encodeName(path).data());
if (fileRef.isNull()) {
return false;
......@@ -198,11 +198,11 @@ bool AudioCreator::create(const QString &path, int, int, QImage &img)
return parseFlacTag(*xiphComment, img);
if (type.inherits("audio/x-aiff")) {
TagLib::RIFF::AIFF::FileExt file(QFile::encodeName(path));
TagLib::RIFF::AIFF::FileExt file(QFile::encodeName(path).data());
return parseID3v2Tag(file, img);
if (type.inherits("audio/x-wav")) {
TagLib::RIFF::WAV::File file(QFile::encodeName(path));
TagLib::RIFF::WAV::File file(QFile::encodeName(path).data());
return parseID3v2Tag(file, img);
return false;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment