From 6251d4dafc86bcbec09d1962050af9924249d419 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 30 Jun 2015 22:11:15 +0200 Subject: QtCore: Use Q_NULLPTR instead of 0 in all public headers This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira --- src/corelib/codecs/qtextcodec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/codecs') diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h index 1d5e25efcc..3e73872d64 100644 --- a/src/corelib/codecs/qtextcodec.h +++ b/src/corelib/codecs/qtextcodec.h @@ -88,7 +88,7 @@ public: struct Q_CORE_EXPORT ConverterState { ConverterState(ConversionFlags f = DefaultConversion) - : flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; } + : flags(f), remainingChars(0), invalidChars(0), d(Q_NULLPTR) { state_data[0] = state_data[1] = state_data[2] = 0; } ~ConverterState(); ConversionFlags flags; int remainingChars; @@ -99,9 +99,9 @@ public: Q_DISABLE_COPY(ConverterState) }; - QString toUnicode(const char *in, int length, ConverterState *state = 0) const + QString toUnicode(const char *in, int length, ConverterState *state = Q_NULLPTR) const { return convertToUnicode(in, length, state); } - QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = 0) const + QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = Q_NULLPTR) const { return convertFromUnicode(in, length, state); } QTextDecoder* makeDecoder(ConversionFlags flags = DefaultConversion) const; -- cgit v1.2.3