|author||Thiago Macieira <firstname.lastname@example.org>||2012-05-14 15:43:57 +0200|
|committer||Qt by Nokia <email@example.com>||2012-05-15 04:57:29 +0200|
Deprecate the ability to change the FS encoding separate from the locale
Changing the encoding used by filenames separately from the locale encoding is a broken concept and cannot work properly. This creates ambiguity depending on the data source and how it's being treated. Instead, enforce that the locale encoding is the only possibility to deal with file names. The QFile::encodeName and decodeName functions are retained due to the Mac-specific issues and due to the sheer number of current uses. There's no point in deprecating them and moving away from them. Change-Id: Iedb2d8715d166a59a824f05bc11d107fd44f9c17 Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003782.html Reviewed-by: Lars Knoll <firstname.lastname@example.org>
Diffstat (limited to 'dist')
1 files changed, 8 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index eebfb6d4dc..3b37473d75 100644
@@ -347,6 +347,14 @@ QtCore
QCoreApplication::Encoding value CodecForTr is now obsolete, use
DefaultCodec instead. For reasoning, see the codecForCStrings() removal above.
+* QFile::setEncodingFunction and QFile::setDecodingFunction are obsolete and do
+ nothing in Qt 5. The QFile::encodeName and QFile::decodeName functions are now
+ hardcoded to operate on QString::fromLocal8Bit and QString::toLocal8Bit
+ only. Therefore, it's still possible to obtain the old behaviour by calling
+ QTextCodec::setCodecForLocale. However, that is not recommended: new code
+ should not make assumptions about the filesystem encoding and older code should
+ have those assumptions removed.
* QIntValidator and QDoubleValidator no longer fall back to using the C locale if
the requested locale fails to validate the input.