summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-03 10:23:56 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-03 10:23:56 +0200
commite2f66f921594b7be4af4a058c959557489e86879 (patch)
treecc44931708b57bd5a761906797c7dee0360d1d6b /src/corelib/codecs
parent933bf178aab88ab5df8a68cbf02611d6d8744b1b (diff)
parent754efa57d89c62d1796e01b407e9222e67450f52 (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
Diffstat (limited to 'src/corelib/codecs')
-rw-r--r--src/corelib/codecs/qicucodec.cpp2
-rw-r--r--src/corelib/codecs/qtextcodec.cpp23
-rw-r--r--src/corelib/codecs/qwindowscodec.cpp4
3 files changed, 23 insertions, 6 deletions
diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp
index 65cc337708..b375999aeb 100644
--- a/src/corelib/codecs/qicucodec.cpp
+++ b/src/corelib/codecs/qicucodec.cpp
@@ -121,7 +121,7 @@ struct MibToName {
short index;
};
-static MibToName mibToName[] = {
+static const MibToName mibToName[] = {
{ 3, 0 },
{ 4, 9 },
{ 5, 20 },
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 050f8f207f..8fef333a77 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1147,13 +1147,30 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)
return codecForUtfText(ba, QTextCodec::codecForMib(/*Latin 1*/ 4));
}
+/*!
+ \fn QTextCodec * QTextCodec::codecForTr ()
+ \obsolete
+
+ Returns the codec used by QObject::tr() on its argument. If this
+ function returns 0 (the default), tr() assumes Latin-1.
+
+ \sa setCodecForTr()
+*/
+
+/*!
+ \fn QTextCodec::setCodecForTr ( QTextCodec * c )
+ \obsolete
+
+ Sets the codec used by QObject::tr() on its argument to c. If c
+ is 0 (the default), tr() assumes Latin-1.
+*/
/*!
\internal
\since 4.3
- Determines whether the decoder encountered a failure while decoding the input. If
- an error was encountered, the produced result is undefined, and gets converted as according
- to the conversion flags.
+ Determines whether the decoder encountered a failure while decoding the
+ input. If an error was encountered, the produced result is undefined, and
+ gets converted as according to the conversion flags.
*/
bool QTextDecoder::hasFailure() const
{
diff --git a/src/corelib/codecs/qwindowscodec.cpp b/src/corelib/codecs/qwindowscodec.cpp
index cf427c64b6..dded93ccb5 100644
--- a/src/corelib/codecs/qwindowscodec.cpp
+++ b/src/corelib/codecs/qwindowscodec.cpp
@@ -172,7 +172,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
}
#else
QString s;
- int size = mbstowcs(NULL, mb, length);
+ size_t size = mbstowcs(NULL, mb, length);
if (size < 0) {
Q_ASSERT("Error in CE TextCodec");
return QString();
@@ -181,7 +181,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
ws[size +1] = 0;
ws[size] = 0;
size = mbstowcs(ws, mb, length);
- for (int i=0; i< size; i++)
+ for (size_t i = 0; i < size; i++)
s.append(QChar(ws[i]));
delete [] ws;
#endif