mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:45:22 +00:00
UI: AddressesPage: Add ability to comment address lines with "#".
This commit is contained in:
parent
4c918df002
commit
50f9bfd601
@ -70,11 +70,13 @@ bool Ip4Range::fromText(const QString &text)
|
||||
text.splitRef(QLatin1Char('\n'))) {
|
||||
++lineNo;
|
||||
|
||||
if (line.isEmpty())
|
||||
const QStringRef lineTrimmed = line.trimmed();
|
||||
if (lineTrimmed.isEmpty()
|
||||
|| lineTrimmed.startsWith('#')) // commented line
|
||||
continue;
|
||||
|
||||
quint32 from, to;
|
||||
if (!parseAddressMask(line, from, to)) {
|
||||
if (!parseAddressMask(lineTrimmed, from, to)) {
|
||||
setErrorLineNo(lineNo);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user