[Development] FW: Backwards compatibiltiy break in Qt 5.5

Tasuku Suzuki stasuku at gmail.com
Tue Jul 28 04:47:09 CEST 2015

Hi Thiago,

2015-07-28 1:34 GMT+09:00 Thiago Macieira <thiago.macieira at intel.com>:
> On Monday 27 July 2015 19:27:44 NIkolai Marchenko wrote:
>> > Or just use qPrintable() around your strings.
>> you do realize, that it will require editing thousands of instances of
>> qDebug in the old code?
> Yes.

grepped "QDebug\s*&?operator\s*<<\\(QDebug" under qtbase/src, and
checked if QDebug operator<<(QDebug, const QString&) is used in it for
strings that can be utf8 very roughly. Do we fix those functions?

QDebug operator<<(QDebug debug, const QDir &dir)
QDebug operator<<(QDebug, const QJsonValue &)
QDebug operator<<(QDebug, const QVariant &)

QDebug operator<<(QDebug dbg, const QSqlDatabase &d)
QDebug operator<<(QDebug dbg, const QSqlError &s)
QDebug operator<<(QDebug dbg, const QSqlField &f)
QDebug operator<<(QDebug dbg, const QSqlRecord &r)

QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
QDebug operator<<(QDebug stream, const QFont &font)
QDebug operator<<(QDebug dbg, const QPageSize &pageSize)

QDebug operator<<(QDebug, const QDBusError &)

Qt itself uses QDebug operator<<(QDebug, const QString&) to get
warning messages useful.
Do we apply qPrintable() everywhere in Qt?

Will it be possible to apply qPrintable() to QString in containers?

Best Regards,
Tasuku Suzuki

More information about the Development mailing list