Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
Fix inputMask for IGMPv3 source IP
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pstavirs committed Dec 29, 2019
1 parent 3f76c53 commit 44a9ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/ipv4addressdelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ inline QWidget* IPv4AddressDelegate::createEditor(QWidget *parent,
ipEdit = static_cast<QLineEdit*>(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;
}
Expand Down

0 comments on commit 44a9ead

Please sign in to comment.