summaryrefslogtreecommitdiffstats
path: root/examples/widgets/gallery
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-08-12 13:16:27 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-08-20 00:58:13 +0200
commit2766322de37adba37e0d0d4b0054e55edff01c6c (patch)
treed487d502ee944963e103e11c9726c3efcd8fe041 /examples/widgets/gallery
parenteb7d1cf098df56f8ebf62f02af611a627435a4a1 (diff)
Move QStringRef and remains to Qt5Compat
Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/widgets/gallery')
-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");