From 9bdc2a66b057099a7bca628f26de87d2b4b55400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Santamar=C3=ADa=20Lema?= Date: Mon, 21 Jun 2010 16:07:47 +0200 Subject: Allow comments (start with '#') in accounts map --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index a00c6dc..0edf8f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,7 +41,11 @@ QHash loadIdentityMapFile(const QString &fileName) } while (!file.atEnd()) { - QByteArray line = file.readLine().trimmed(); + QByteArray line = file.readLine(); + int comment_pos = line.indexOf('#'); + if (comment_pos != -1) + line.truncate(comment_pos); + line = line.trimmed(); int space = line.indexOf(' '); if (space == -1) continue; // invalid line -- cgit v1.2.1