summaryrefslogtreecommitdiffstats
path: root/examples/widgets/gallery/widgetgallery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/gallery/widgetgallery.cpp')
-rw-r--r--examples/widgets/gallery/widgetgallery.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/gallery/widgetgallery.cpp b/examples/widgets/gallery/widgetgallery.cpp
index 3bbe8943d1..b2973fad4c 100644
--- a/examples/widgets/gallery/widgetgallery.cpp
+++ b/examples/widgets/gallery/widgetgallery.cpp
@@ -335,8 +335,8 @@ QToolBox *WidgetGallery::createTextToolBox()
"How I wonder what you are!\n");
// Create centered/italic HTML rich text
QString richText = QLatin1String("<html><head/><body><i>");
- for (const auto &line : plainText.splitRef(QLatin1Char('\n')))
- richText += QLatin1String("<center>") + line + QLatin1String("</center>");
+ for (const auto &line : QStringView{ plainText }.split(QLatin1Char('\n')))
+ richText += QString::fromLatin1("<center>%1</center>").arg(line);
richText += QLatin1String("</i></body></html>");
auto textEdit = createWidget1<QTextEdit>(richText, "textEdit");