forked from qt-creator/qt-creator
Fix build for Qt 5
QAbstractFileEngine is in a private header in Qt 5 Change-Id: I2f3317e48274392cda853ebf69ed96a662763094 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user