mainwindow example: Fix implicit conversion from qsizetype warnings
Change-Id: Ifaeeb620420f43529bb9e3d533b4e1a2e20c68ca Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 080b11b03989227ad62de625084fc5d57d930d7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
53f9709c7b
commit
581cf7dd45
@ -95,7 +95,7 @@ static ParseCommandLineArgumentsResult
|
|||||||
parseCustomSizeHints(const QStringList &arguments, MainWindow::CustomSizeHintMap *result)
|
parseCustomSizeHints(const QStringList &arguments, MainWindow::CustomSizeHintMap *result)
|
||||||
{
|
{
|
||||||
result->clear();
|
result->clear();
|
||||||
const int argumentCount = arguments.size();
|
const auto argumentCount = arguments.size();
|
||||||
for (int i = 1; i < argumentCount; ++i) {
|
for (int i = 1; i < argumentCount; ++i) {
|
||||||
const QString &arg = arguments.at(i);
|
const QString &arg = arguments.at(i);
|
||||||
if (arg.startsWith(QLatin1String("-SizeHint"))) {
|
if (arg.startsWith(QLatin1String("-SizeHint"))) {
|
||||||
@ -105,7 +105,7 @@ static ParseCommandLineArgumentsResult
|
|||||||
if (++i == argumentCount)
|
if (++i == argumentCount)
|
||||||
return CommandLineArgumentsError;
|
return CommandLineArgumentsError;
|
||||||
const QStringView sizeStr{ arguments.at(i) };
|
const QStringView sizeStr{ arguments.at(i) };
|
||||||
const int idx = sizeStr.indexOf(QLatin1Char('x'));
|
const auto idx = sizeStr.indexOf(QLatin1Char('x'));
|
||||||
if (idx == -1)
|
if (idx == -1)
|
||||||
return CommandLineArgumentsError;
|
return CommandLineArgumentsError;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
@ -429,7 +429,7 @@ void MainWindow::createDockWidget()
|
|||||||
|
|
||||||
void MainWindow::destroyDockWidget(QAction *action)
|
void MainWindow::destroyDockWidget(QAction *action)
|
||||||
{
|
{
|
||||||
int index = destroyDockWidgetMenu->actions().indexOf(action);
|
auto index = destroyDockWidgetMenu->actions().indexOf(action);
|
||||||
delete extraDockWidgets.takeAt(index);
|
delete extraDockWidgets.takeAt(index);
|
||||||
destroyDockWidgetMenu->removeAction(action);
|
destroyDockWidgetMenu->removeAction(action);
|
||||||
action->deleteLater();
|
action->deleteLater();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user