Gui: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -905,7 +905,7 @@ void ParameterValue::onCreateUIntItem()
|
||||
DlgInputDialogImp::UIntBox);
|
||||
dlg.setWindowTitle(QObject::tr("New unsigned item"));
|
||||
UIntSpinBox* edit = dlg.getUIntBox();
|
||||
edit->setRange(0, UINT_MAX);
|
||||
edit->setRange(0, std::numeric_limits<unsigned>::max());
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
QString value = edit->text();
|
||||
unsigned long val = value.toULong(&ok);
|
||||
@@ -1249,7 +1249,7 @@ void ParameterUInt::changeValue()
|
||||
DlgInputDialogImp::UIntBox);
|
||||
dlg.setWindowTitle(QObject::tr("Change value"));
|
||||
UIntSpinBox* edit = dlg.getUIntBox();
|
||||
edit->setRange(0, UINT_MAX);
|
||||
edit->setRange(0, std::numeric_limits<unsigned>::max());
|
||||
edit->setValue(text(2).toULong());
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
QString value = edit->text();
|
||||
|
||||
Reference in New Issue
Block a user