Commit 0fa3bbc4 authored by Volker Krause's avatar Volker Krause
Browse files

Port to QML RegularExpressionValidator

RegExpValidator is deprecated and gone in Qt6.
parent 75f02fb0
Pipeline #216013 passed with stage
in 6 minutes and 41 seconds
......@@ -4,7 +4,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick 2.1
import QtQuick 2.15
import QtQuick.Controls 2.5 as QQC2
QQC2.TextField {
......@@ -56,7 +56,7 @@ QQC2.TextField {
inputMask: "00:00"
selectByMouse: false
inputMethodHints: Qt.ImhPreferNumbers
validator: RegExpValidator { regExp: /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/ }
validator: RegularExpressionValidator { regularExpression: /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/ }
onEditingFinished: submit()
}
......@@ -4,7 +4,7 @@
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
import QtQuick 2.6
import QtQuick 2.15
import QtQuick.Dialogs 1.1
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.5 as QQC2
......@@ -33,8 +33,8 @@ KCM.SimpleKCM {
QQC2.TextField {
id: userNameField
Kirigami.FormData.label: i18n("Username:")
validator: RegExpValidator {
regExp: /^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$/
validator: RegularExpressionValidator {
regularExpression: /^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$/
}
}
QQC2.ComboBox {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment