summaryrefslogtreecommitdiffstats
path: root/examples/corelib/tools/customtype/message.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-02-25 16:49:05 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-02-28 15:37:11 +0100
commitc158f881b30a28ab28ede0df538cbf1af4326c76 (patch)
treedc3501d9f9a9edd6ac74adfc8304fa1d04b85e89 /examples/corelib/tools/customtype/message.cpp
parent8de66e1f244ee500b7df79ecbeaa32d889dc7d27 (diff)
Docs: Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Applied suitable wrapping round various char and string literals, since docs are meant to show best practice. Change-Id: Ie061905fad26f9b4dda3eedba4612704f0a19126 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/corelib/tools/customtype/message.cpp')
-rw-r--r--examples/corelib/tools/customtype/message.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/corelib/tools/customtype/message.cpp b/examples/corelib/tools/customtype/message.cpp
index e83697cb74..489ec24a4d 100644
--- a/examples/corelib/tools/customtype/message.cpp
+++ b/examples/corelib/tools/customtype/message.cpp
@@ -61,7 +61,7 @@ Message::Message(const QString &body, const QStringList &headers)
QDebug operator<<(QDebug dbg, const Message &message)
{
const QString body = message.body();
- QVector<QStringRef> pieces = body.splitRef("\r\n", QString::SkipEmptyParts);
+ QVector<QStringRef> pieces = body.splitRef(QLatin1String("\r\n"), Qt::SkipEmptyParts);
if (pieces.isEmpty())
dbg.nospace() << "Message()";
else if (pieces.size() == 1)