From c158f881b30a28ab28ede0df538cbf1af4326c76 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 25 Feb 2020 16:49:05 +0100 Subject: 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 --- examples/corelib/tools/customtype/message.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/corelib/tools/customtype/message.cpp') 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 pieces = body.splitRef("\r\n", QString::SkipEmptyParts); + QVector pieces = body.splitRef(QLatin1String("\r\n"), Qt::SkipEmptyParts); if (pieces.isEmpty()) dbg.nospace() << "Message()"; else if (pieces.size() == 1) -- cgit v1.2.3