From 2a5ac249179871abc220e7707223c6587aca153b Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Mon, 3 May 2021 22:47:18 +0200 Subject: [PATCH] Purge QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16 This was probably introduced for Symbian and did not change since the Qt4 import (except for the Symbian code cleanup). Since it seems only to effect Windows, use Q_OS_WIN instead. Change-Id: I36f4d83ed5254d8b77073fc216551dfa0cc64a9f Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira Reviewed-by: Friedemann Kleint --- src/corelib/io/qfilesystementry.cpp | 4 +--- src/corelib/io/qfilesystementry_p.h | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp index 83f8a86439..c061f58e87 100644 --- a/src/corelib/io/qfilesystementry.cpp +++ b/src/corelib/io/qfilesystementry.cpp @@ -140,7 +140,7 @@ QFileSystemEntry::NativePath QFileSystemEntry::nativeFilePath() const void QFileSystemEntry::resolveFilePath() const { if (m_filePath.isEmpty() && !m_nativeFilePath.isEmpty()) { -#if defined(QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16) +#ifdef Q_OS_WIN m_filePath = QDir::fromNativeSeparators(m_nativeFilePath); #else m_filePath = QDir::fromNativeSeparators(QFile::decodeName(m_nativeFilePath)); @@ -156,8 +156,6 @@ void QFileSystemEntry::resolveNativeFilePath() const if (isRelative()) filePath = fixIfRelativeUncPath(m_filePath); m_nativeFilePath = QFSFileEnginePrivate::longFileName(QDir::toNativeSeparators(filePath)); -#elif defined(QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16) - m_nativeFilePath = QDir::toNativeSeparators(m_filePath); #else m_nativeFilePath = QFile::encodeName(QDir::toNativeSeparators(m_filePath)); #endif diff --git a/src/corelib/io/qfilesystementry_p.h b/src/corelib/io/qfilesystementry_p.h index 251eca553a..d6b1abf498 100644 --- a/src/corelib/io/qfilesystementry_p.h +++ b/src/corelib/io/qfilesystementry_p.h @@ -55,17 +55,13 @@ #include #include -#if defined(Q_OS_WIN) -#define QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16 -#endif - QT_BEGIN_NAMESPACE class QFileSystemEntry { public: -#ifndef QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16 +#ifndef Q_OS_WIN typedef QByteArray NativePath; #else typedef QString NativePath;