diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-14 13:48:58 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-23 16:39:19 +0100 |
commit | 080b11b03989227ad62de625084fc5d57d930d7b (patch) | |
tree | 17f6b263c1969cec34e0e74fe6e340f68ccceaaa /examples/widgets/mainwindows/mainwindow/main.cpp | |
parent | fbb26c2b8832ade041ac9d81213ce3f486e85ef5 (diff) |
mainwindow example: Fix implicit conversion from qsizetype warnings
Pick-to: 6.5
Change-Id: Ifaeeb620420f43529bb9e3d533b4e1a2e20c68ca
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/widgets/mainwindows/mainwindow/main.cpp')
-rw-r--r-- | examples/widgets/mainwindows/mainwindow/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/mainwindows/mainwindow/main.cpp b/examples/widgets/mainwindows/mainwindow/main.cpp index 66aa99ee75..a64d2f5843 100644 --- a/examples/widgets/mainwindows/mainwindow/main.cpp +++ b/examples/widgets/mainwindows/mainwindow/main.cpp @@ -95,7 +95,7 @@ static ParseCommandLineArgumentsResult parseCustomSizeHints(const QStringList &arguments, MainWindow::CustomSizeHintMap *result) { result->clear(); - const int argumentCount = arguments.size(); + const auto argumentCount = arguments.size(); for (int i = 1; i < argumentCount; ++i) { const QString &arg = arguments.at(i); if (arg.startsWith(QLatin1String("-SizeHint"))) { @@ -105,7 +105,7 @@ static ParseCommandLineArgumentsResult if (++i == argumentCount) return CommandLineArgumentsError; const QStringView sizeStr{ arguments.at(i) }; - const int idx = sizeStr.indexOf(QLatin1Char('x')); + const auto idx = sizeStr.indexOf(QLatin1Char('x')); if (idx == -1) return CommandLineArgumentsError; bool ok; |