summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2021-05-03 22:47:18 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2021-05-11 13:22:44 +0200
commit2a5ac249179871abc220e7707223c6587aca153b (patch)
tree5e5f51aa2b996e6ca615e7fadb5efd6d15f2103f /src
parentec9e85656339dbc9e6918a1369c981cece7bc97d (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfilesystementry.cpp4
-rw-r--r--src/corelib/io/qfilesystementry_p.h6
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 <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;