Commit 3f6c1636 authored by Tomas Touceda's avatar Tomas Touceda
Browse files

Support comments in the same line as a config option

parent 4e215d42
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -97,6 +97,10 @@ TorrcDialog::parseAndSet(QString *errmsg)
  int i = 0;
  foreach(QString line, lines) {
    i++;
    int commentIndex = line.indexOf("#");
    if(commentIndex != -1)
      line = line.remove(commentIndex, line.length() - commentIndex);

    line = line.trimmed();
    if(line.startsWith("#")) continue; // Skip commentaries
    parts = line.split(" ", QString::SkipEmptyParts);