Commit 2b0c1fb3 authored by Aurindam Jana's avatar Aurindam Jana Committed by hjk

Fix build for Qt 5

QAbstractFileEngine is in a private header in Qt 5

Change-Id: I2f3317e48274392cda853ebf69ed96a662763094
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 18e0363c
......@@ -6,7 +6,7 @@ QT += network \
sql
greaterThan(QT_MAJOR_VERSION, 4) {
QT += help printsupport
QT += help printsupport core-private
} else {
CONFIG += help
}
......
......@@ -45,6 +45,8 @@
#if QT_VERSION < 0x050000
#include <QAbstractFileEngine>
#else
#include <private/qabstractfileengine_p.h>
#endif
#ifndef Q_OS_WIN
......@@ -193,8 +195,7 @@ void FileUtils::removeFile(const QString &filePath, bool deleteFromFS)
static inline bool fileSystemRenameFile(const QString &orgFilePath,
const QString &newFilePath)
{
QFile f(orgFilePath); // Due to QTBUG-3570
QAbstractFileEngine *fileEngine = f.fileEngine();
QAbstractFileEngine *fileEngine = QAbstractFileEngine::create(orgFilePath); // Due to QTBUG-3570
if (!fileEngine->caseSensitive() && orgFilePath.compare(newFilePath, Qt::CaseInsensitive) == 0)
return fileEngine->rename(newFilePath);
return QFile::rename(orgFilePath, newFilePath);
......
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