From 0c6c6ca9fbbe12750009a83a3921e7355d5d15dc Mon Sep 17 00:00:00 2001 From: Syping Date: Wed, 11 Nov 2020 18:14:50 +0100 Subject: [PATCH] RagePhoto: Qt < 5.10 build fix --- RagePhoto.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/RagePhoto.cpp b/RagePhoto.cpp index fe3cac2..8ed7261 100644 --- a/RagePhoto.cpp +++ b/RagePhoto.cpp @@ -369,7 +369,12 @@ bool RagePhoto::load() return load(); } else if (format == static_cast(ExportFormat::G5E1P)) { +#if QT_VERSION >= 0x050A00 size = dataBuffer.skip(1); +#else + QByteArray skipData = dataBuffer.read(1); + size = skipData.size(); +#endif if (size != 1) return false; @@ -379,7 +384,12 @@ bool RagePhoto::load() return false; int i_length = QByteArray::number((int)length[0], 16).toInt() + 6; +#if QT_VERSION >= 0x050A00 size = dataBuffer.skip(i_length); +#else + skipData = dataBuffer.read(i_length); + size = skipData.size(); +#endif if (size != i_length) return false;