Update RegExpValidator to RegularExpressionValidator

Due to Qt6 API change

CURA-8640
This commit is contained in:
c.lamboo 2022-03-30 15:10:37 +02:00
parent 99a3a8d11d
commit 3c9e2a1b08
13 changed files with 26 additions and 26 deletions

View file

@ -1,8 +1,8 @@
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick 2.14
import QtQuick.Controls 2.15
import UM 1.5 as UM
@ -154,7 +154,7 @@ SettingItem
// should be done as little as possible)
clip: definition.type == "str" || definition.type == "[int]"
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
validator: RegularExpressionValidator { regularExpression: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
Binding
{