diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-09 01:00:35 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-09 10:16:01 +0100 |
commit | bef74b6c3a0a9c8649ea8eb333d80015f76863e4 (patch) | |
tree | 41cdf5b6776c90a6d04a1d6680f4d47a90593746 /src/corelib/codecs/qicucodec.cpp | |
parent | f8d2975b6a8b36bf8dd304c99783947a72081b79 (diff) | |
parent | 4c3c63d4cbb81b38e88e06b72749e7e01497b6f1 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
Diffstat (limited to 'src/corelib/codecs/qicucodec.cpp')
-rw-r--r-- | src/corelib/codecs/qicucodec.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp index 5a778c2638..f9092277b2 100644 --- a/src/corelib/codecs/qicucodec.cpp +++ b/src/corelib/codecs/qicucodec.cpp @@ -381,7 +381,7 @@ static QTextCodec *loadQtCodec(const char *name) return QIsciiCodec::create(name); #endif - return 0; + return nullptr; } /// \threadsafe @@ -438,7 +438,7 @@ QTextCodec *QIcuCodec::defaultCodecUnlocked() { QCoreGlobalData *globalData = QCoreGlobalData::instance(); if (!globalData) - return 0; + return nullptr; QTextCodec *c = globalData->codecForLocale.loadAcquire(); if (c) return c; @@ -523,13 +523,13 @@ QTextCodec *QIcuCodec::codecForNameUnlocked(const char *name) return c; if (qt_only) - return 0; + return nullptr; // check whether there is really a converter for the name available. UConverter *conv = ucnv_open(standardName, &error); if (!conv) { qDebug("codecForName: ucnv_open failed %s %s", standardName, u_errorName(error)); - return 0; + return nullptr; } //qDebug() << "QIcuCodec: Standard name for " << name << "is" << standardName; ucnv_close(conv); @@ -552,7 +552,7 @@ QTextCodec *QIcuCodec::codecForMibUnlocked(int mib) if (mib == 2107) return codecForNameUnlocked("TSCII"); - return 0; + return nullptr; } @@ -567,7 +567,7 @@ QIcuCodec::~QIcuCodec() UConverter *QIcuCodec::getConverter(QTextCodec::ConverterState *state) const { - UConverter *conv = 0; + UConverter *conv = nullptr; if (state) { if (!state->d) { // first time @@ -609,7 +609,7 @@ QString QIcuCodec::convertToUnicode(const char *chars, int length, QTextCodec::C ucnv_toUnicode(conv, &uc, ucEnd, &chars, end, - 0, false, &error); + nullptr, false, &error); if (!U_SUCCESS(error) && error != U_BUFFER_OVERFLOW_ERROR) { qDebug("convertToUnicode failed: %s", u_errorName(error)); break; @@ -646,7 +646,7 @@ QByteArray QIcuCodec::convertFromUnicode(const QChar *unicode, int length, QText ucnv_fromUnicode(conv, &ch, chEnd, &uc, end, - 0, false, &error); + nullptr, false, &error); if (!U_SUCCESS(error)) qDebug("convertFromUnicode failed: %s", u_errorName(error)); convertedChars = ch - string.data(); |