mirror of
https://github.com/tnodir/fort
synced 2024-11-15 04:05:50 +00:00
UI: ApplicationsPage: Add ability to comment app. lines with "#".
This commit is contained in:
parent
e10f027eda
commit
08f766fed9
@ -206,10 +206,12 @@ bool ConfUtil::parseApps(const QString &text, bool blocked,
|
|||||||
{
|
{
|
||||||
foreach (const QStringRef &line,
|
foreach (const QStringRef &line,
|
||||||
text.splitRef(QLatin1Char('\n'))) {
|
text.splitRef(QLatin1Char('\n'))) {
|
||||||
if (line.isEmpty())
|
const QStringRef lineTrimmed = line.trimmed();
|
||||||
|
if (lineTrimmed.isEmpty()
|
||||||
|
|| lineTrimmed.startsWith('#')) // commented line
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const QString appPath = parseAppPath(line);
|
const QString appPath = parseAppPath(lineTrimmed);
|
||||||
if (appPath.isEmpty())
|
if (appPath.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user