diff options
Diffstat (limited to 'src/zoneproperties.cc')
-rw-r--r-- | src/zoneproperties.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/zoneproperties.cc b/src/zoneproperties.cc index 35d994a..43e4804 100644 --- a/src/zoneproperties.cc +++ b/src/zoneproperties.cc @@ -20,6 +20,19 @@ ZoneProperties::~ZoneProperties() void ZoneProperties::save(QTextStream & textstream) { + // comments + if (comment().size()) { + // QTextStream operates on QString, not on QString const + QString commentbuffer = comment(); + QTextStream commentstream(&commentbuffer); + QString line; + while (!commentstream.atEnd()) { + line = commentstream.readLine(1024); + textstream << line << '\n'; + } + textstream << '\n'; + } + textstream << "[zone]" << '\n'; if (name().size()) |