Commit a2b6590b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port away from deprecated KFilterDev

parent ae84fb59
Pipeline #68506 passed with stage
in 8 minutes and 17 seconds
......@@ -27,8 +27,13 @@
#include <QMutex>
#include <KDirWatch>
#include <KFilterDev>
#include <KLocalizedString>
#include <karchive_version.h>
#if KARCHIVE_VERSION >= QT_VERSION_CHECK(5, 85, 0)
#include <KCompressionDevice>
#else
#include <KFilterDev>
#endif
#include "logFileReaderPrivate.h"
......@@ -142,7 +147,12 @@ QIODevice *LocalLogFileReader::open()
logDebug() << "Using KFilterDev input device";
// inputDevice = KFilterDev::deviceForFile(filePath, mimeType);
#if KARCHIVE_VERSION >= QT_VERSION_CHECK(5, 85, 0)
inputDevice.reset(new KCompressionDevice(filePath, KCompressionDevice::compressionTypeForMimeType(mimeType)));
#else
inputDevice.reset(new KCompressionDevice(filePath, KFilterDev::compressionTypeForMimeType(mimeType)));
#endif
if (!inputDevice) {
const QString message(i18n("Unable to uncompress the '%2' format of '%1'.", filePath, mimeType));
......
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