From 2766322de37adba37e0d0d4b0054e55edff01c6c Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Wed, 12 Aug 2020 13:16:27 +0200 Subject: 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 --- examples/widgets/mainwindows/mainwindow/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/widgets/mainwindows/mainwindow') diff --git a/examples/widgets/mainwindows/mainwindow/main.cpp b/examples/widgets/mainwindows/mainwindow/main.cpp index ae4634e3be..dcaabd195f 100644 --- a/examples/widgets/mainwindows/mainwindow/main.cpp +++ b/examples/widgets/mainwindows/mainwindow/main.cpp @@ -151,15 +151,15 @@ static ParseCommandLineArgumentsResult return CommandLineArgumentsError; if (++i == argumentCount) return CommandLineArgumentsError; - const QString sizeStr = arguments.at(i); + const QStringView sizeStr{ arguments.at(i) }; const int idx = sizeStr.indexOf(QLatin1Char('x')); if (idx == -1) return CommandLineArgumentsError; bool ok; - const int w = sizeStr.leftRef(idx).toInt(&ok); + const int w = sizeStr.left(idx).toInt(&ok); if (!ok) return CommandLineArgumentsError; - const int h = sizeStr.midRef(idx + 1).toInt(&ok); + const int h = sizeStr.mid(idx + 1).toInt(&ok); if (!ok) return CommandLineArgumentsError; result->insert(name, QSize(w, h)); -- cgit v1.2.3