Make a single NetworkingUtil

CURA-6483
This commit is contained in:
Lipu Fei 2019-04-30 09:43:48 +02:00
parent bb1442a04e
commit ed8127777c
5 changed files with 48 additions and 57 deletions

View file

@ -27,7 +27,7 @@ Item
property var isPrinterDiscovered: discoveredPrinter != null
// For validating IP address
property var util: Cura.QtUtil{}
property var networkingUtil: Cura.NetworkingUtil {}
// Make sure to cancel the current request when this page closes.
onVisibleChanged:
@ -137,7 +137,7 @@ Item
onClicked:
{
const address = hostnameField.text
if (!util.isValidIP(address))
if (!networkingUtil.isValidIP(address))
{
hostnameField.invalidInputDetected()
return