> On 15 May 2017, at 15:16, Marc Mutz <[email protected]> wrote: > > Open For Extension - Users can add formatting for their own types (like > QStringBuilder allows, but using documented API). QDateTime, etc support to > be added as examples.
We’ve been writing QDebug operator<<(QDebug debug, const QType &o) a lot. I wish we could rather write something which generates a string, for each Qt type, and then reuse it for debug operators, for string concatenation, for formatting like this, and also make sure that console.log() in QML uses it. Same pattern as toString() in Java, but maybe in C++ an operator makes more sense, as long as it’s not clumsy to use. _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
