mirror of
https://github.com/tnodir/fort
synced 2024-11-15 09:36:28 +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'))) {
|
text.splitRef(QLatin1Char('\n'))) {
|
||||||
++lineNo;
|
++lineNo;
|
||||||
|
|
||||||
if (line.isEmpty())
|
const QStringRef lineTrimmed = line.trimmed();
|
||||||
|
if (lineTrimmed.isEmpty()
|
||||||
|
|| lineTrimmed.startsWith('#')) // commented line
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
quint32 from, to;
|
quint32 from, to;
|
||||||
if (!parseAddressMask(line, from, to)) {
|
if (!parseAddressMask(lineTrimmed, from, to)) {
|
||||||
setErrorLineNo(lineNo);
|
setErrorLineNo(lineNo);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user