diff options
Diffstat (limited to 'examples/corelib/tools/customtype/message.cpp')
-rw-r--r-- | examples/corelib/tools/customtype/message.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/corelib/tools/customtype/message.cpp b/examples/corelib/tools/customtype/message.cpp index c470ab116e..9487e4ce67 100644 --- a/examples/corelib/tools/customtype/message.cpp +++ b/examples/corelib/tools/customtype/message.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** @@ -17,8 +17,8 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** @@ -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) |