From 44a9eada484a5fe8a0566c2c77f0f1cca18cbd14 Mon Sep 17 00:00:00 2001 From: Srivats P Date: Sun, 29 Dec 2019 19:49:50 +0530 Subject: [PATCH] Fix inputMask for IGMPv3 source IP The old mask 009.009.009.009 does not compute to valid for input 1.2.3.4 and the Qt delegate doesn't accept it with Qt5 (not the case with Qt4) Although the new mask 000.000.000.000 cannot prevent invalid entries like 1.2.. or 300.400.500.600, I decided it was better to accept invalid input (which gets converted to 0.0.0.0) instead of unintentionally not allowing valid entries. Fixes #292 --- common/ipv4addressdelegate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/ipv4addressdelegate.h b/common/ipv4addressdelegate.h index 9e80d17c..c6a87f86 100644 --- a/common/ipv4addressdelegate.h +++ b/common/ipv4addressdelegate.h @@ -50,7 +50,7 @@ inline QWidget* IPv4AddressDelegate::createEditor(QWidget *parent, ipEdit = static_cast(QItemDelegate::createEditor( parent, option, index)); - ipEdit->setInputMask("009.009.009.009;"); // FIXME: use validator + ipEdit->setInputMask("000.000.000.000;"); // FIXME: use validator return ipEdit; }