From 0bcf45bf9f0adc8cf9e3486845819447d153bd5e Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 22 Feb 2010 15:49:26 +0100 Subject: Fix build with wingw Reviewed-by: ogoffart --- src/corelib/tools/qlocale.cpp | 10 +++++----- src/corelib/tools/qstringbuilder.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index b4bfcaf..84bc154 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -465,7 +465,7 @@ static QString winToQtFormat(const QString &sys_fmt) if (text == QLatin1String("'")) result += QLatin1String("''"); else - result += QLatin1Char('\'') + text + QLatin1Char('\''); + result += QString(QLatin1Char('\'') + text + QLatin1Char('\'')); continue; } @@ -681,8 +681,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const case DateTimeFormatLong: case DateTimeFormatShort: - return query(type == DateTimeFormatLong ? DateFormatLong : DateFormatShort).toString() - + QLatin1Char(' ') + query(type == DateTimeFormatLong ? TimeFormatLong : TimeFormatShort).toString(); + return QString(query(type == DateTimeFormatLong ? DateFormatLong : DateFormatShort).toString() + + QLatin1Char(' ') + query(type == DateTimeFormatLong ? TimeFormatLong : TimeFormatShort).toString()); case DayNameLong: case DayNameShort: return winDayName(in.toInt(), (type == DayNameShort)); @@ -698,8 +698,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const case DateTimeToStringShort: case DateTimeToStringLong: { const QDateTime dt = in.toDateTime(); - return winDateToString(dt.date(), type == DateTimeToStringShort ? DATE_SHORTDATE : DATE_LONGDATE) - + QLatin1Char(' ') + winTimeToString(dt.time()); } + return QString(winDateToString(dt.date(), type == DateTimeToStringShort ? DATE_SHORTDATE : DATE_LONGDATE) + + QLatin1Char(' ') + winTimeToString(dt.time())); } case ZeroDigit: locale_info = LOCALE_SNATIVEDIGITS; diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index 9fe3fd7..0c3ba06 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -107,7 +107,7 @@ public: const QChar * const start = d; QConcatenable< QStringBuilder >::appendTo(*this, d); - if (!QConcatenable< QStringBuilder >::ExactSize && size != d - start) { + if (!QConcatenable< QStringBuilder >::ExactSize && int(size) != d - start) { // this resize is necessary since we allocate a bit too much // when dealing with variable sized 8-bit encodings s.resize(d - start); -- cgit v0.12