Commit f7df8cb6 authored by Volker Krause's avatar Volker Krause
Browse files

Port from RegExpValidator to RegularExpressionValidator

RegExpValidator is deprecated and gone in Qt6.
parent 66cb96fc
Pipeline #214907 passed with stage
in 1 minute and 10 seconds
......@@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2018 Alexis Lopes Zubeta <contact@azubieta.net>
// SPDX-FileCopyrightText: 2020 Tomaz Canabrava <tcanabrava@kde.org>
import QtQuick 2.9
import QtQuick 2.15
import QtQuick.Controls 2.9 as QQC2
QQC2.TextField {
......@@ -17,7 +17,7 @@ QQC2.TextField {
placeholderText: i18n("Any IP address")
validator: RegExpValidator {
regExp: ipField.ipv6 ? ipField.ipv6RegExp : ipField.ipv4RegExp
validator: RegularExpressionValidator {
regularExpression: ipField.ipv6 ? ipField.ipv6RegExp : ipField.ipv4RegExp
}
}
......@@ -3,13 +3,13 @@
// SPDX-FileCopyrightText: 2020 Tomaz Canabrava <tcanabrava@kde.org>
import QtQuick 2.9
import QtQuick 2.15
import QtQuick.Controls 2.9 as QQC2
QQC2.TextField {
id: root
placeholderText: i18n("Any Port")
validator: RegExpValidator {
regExp:/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/
validator: RegularExpressionValidator {
regularExpression:/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/
}
}
......@@ -4,7 +4,6 @@
import QtQuick 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4
import QtQuick.Controls 2.12 as QQC2
......
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