diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-01-30 14:23:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-22 14:00:32 +0100 |
commit | 186692f81f2612c3cf3a4090cbf949f2fb1558f8 (patch) | |
tree | e4506e520a88a1c75086516a1edeb1ab2fb4d057 /src/corelib/kernel | |
parent | 9d173c92183c30144e8bd4f115b2cd93c3da0d40 (diff) |
Remove custom text codec for C strings.
This setting is extremely harmful, as code cannot know whether or not to expect
it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive,
and caused a lot of people to make mistakes with it.
Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 4e7fd94141..9f57cd018c 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1162,8 +1162,8 @@ QVariant::QVariant(QDataStream &s) \fn QVariant::QVariant(const char *val) Constructs a new variant with a string value of \a val. - The variant creates a deep copy of \a val, using the encoding - set by QTextCodec::setCodecForCStrings(). + The variant creates a deep copy of \a val into a QString assuming + UTF-8 encoding on the input \a val. Note that \a val is converted to a QString for storing in the variant and QVariant::type() will return QMetaType::QString for @@ -1171,8 +1171,6 @@ QVariant::QVariant(QDataStream &s) You can disable this operator by defining \c QT_NO_CAST_FROM_ASCII when you compile your applications. - - \sa QTextCodec::setCodecForCStrings() */ #ifndef QT_NO_CAST_FROM_ASCII |