UI: ApplicationsPage: Add ability to comment app. lines with "#".

This commit is contained in:
Nodir Temirkhodjaev 2018-01-20 15:44:39 +05:00
parent e10f027eda
commit 08f766fed9

View File

@ -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;