diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/tools/customtype/message.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/tools/customtype/message.cpp b/examples/tools/customtype/message.cpp index c470ab116e..eb8befc36f 100644 --- a/examples/tools/customtype/message.cpp +++ b/examples/tools/customtype/message.cpp @@ -65,7 +65,8 @@ Message::Message(const QString &body, const QStringList &headers) //! [custom type streaming operator] QDebug operator<<(QDebug dbg, const Message &message) { - QStringList pieces = message.body().split("\r\n", QString::SkipEmptyParts); + const QString body = message.body(); + QVector<QStringRef> pieces = body.splitRef("\r\n", QString::SkipEmptyParts); if (pieces.isEmpty()) dbg.nospace() << "Message()"; else if (pieces.size() == 1) |