Hi Thiago, 2015-07-28 1:34 GMT+09:00 Thiago Macieira <[email protected]>: > 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? QtCore: QDebug operator<<(QDebug debug, const QDir &dir) QDebug operator<<(QDebug, const QJsonValue &) QDebug operator<<(QDebug, const QVariant &) QtSql: 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) QtGui: QDebug operator<<(QDebug d, const QAccessibleInterface *iface) QDebug operator<<(QDebug stream, const QFont &font) QDebug operator<<(QDebug dbg, const QPageSize &pageSize) QtDBus: QDebug operator<<(QDebug, const QDBusError &) Qt itself uses QDebug operator<<(QDebug, const QString&) to get warning messages useful. e.g. http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qiodevice.cpp#n83 Do we apply qPrintable() everywhere in Qt? Will it be possible to apply qPrintable() to QString in containers? Best Regards, -- Tasuku Suzuki _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
