Fix -Wclazy-detaching-temporary

This commit is contained in:
Sergio Martins
2020-12-22 15:14:28 +00:00
parent 5c0c9799a4
commit 2ccb5391bb
2 changed files with 6 additions and 6 deletions

View File

@@ -106,20 +106,20 @@ int main(int argv, char**argc)
}
bool ok = false;
const int subsetNumber = app.arguments()[1].toInt(&ok);
const int subsetNumber = app.arguments().at(1).toInt(&ok);
if (!ok) {
qWarning() << "Invalid number" << app.arguments()[1];
qWarning() << "Invalid number" << app.arguments().at(1);
return -1;
}
const int subsetPercentage = app.arguments()[2].toInt(&ok);
const int subsetPercentage = app.arguments().at(2).toInt(&ok);
if (!ok) {
qWarning() << "Invalid number" << app.arguments()[2];
qWarning() << "Invalid number" << app.arguments().at(2);
return -1;
}
if (subsetPercentage > 100 || subsetPercentage <= 0) {
qWarning() << "Invalid percentage" << app.arguments()[2];
qWarning() << "Invalid percentage" << app.arguments().at(2);
return -1;
}

View File

@@ -1586,7 +1586,7 @@ void TestMultiSplitter::tst_separatorMoveCrash()
root->insertItem(item6, Item::Location_OnRight);
ItemContainer *c = item5->parentContainer();
auto separator = c->separators()[0];
auto separator = c->separators().constFirst();
const int available5 = item5->availableLength(Qt::Horizontal);