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 <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Karsten Heimrich 2021-05-03 22:47:18 +02:00
parent ec9e856563
commit 2a5ac24917
2 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -55,17 +55,13 @@
#include <QtCore/qstring.h>
#include <QtCore/qbytearray.h>
#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;