summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/Settings/XMLSettingsProvider.cpp')
-rw-r--r--Swift/Controllers/Settings/XMLSettingsProvider.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/Swift/Controllers/Settings/XMLSettingsProvider.cpp b/Swift/Controllers/Settings/XMLSettingsProvider.cpp
index 2573af0..a316cef 100644
--- a/Swift/Controllers/Settings/XMLSettingsProvider.cpp
+++ b/Swift/Controllers/Settings/XMLSettingsProvider.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -18,16 +18,16 @@ namespace Swift {
XMLSettingsProvider::XMLSettingsProvider(const std::string& xmlConfig) : level_(0) {
if (!xmlConfig.empty()) {
PlatformXMLParserFactory factory;
- auto parser = factory.createXMLParser(this);
+ auto parser = factory.createXMLParser(this, true);
if (parser->parse(xmlConfig)) {
- SWIFT_LOG(debug) << "Found and parsed system config" << std::endl;
+ SWIFT_LOG(debug) << "Found and parsed system config";
}
else {
- SWIFT_LOG(debug) << "Found invalid system config" << std::endl;
+ SWIFT_LOG(debug) << "Found invalid system config";
}
}
else {
- SWIFT_LOG(debug) << "No system config found" << std::endl;
+ SWIFT_LOG(debug) << "No system config found";
}
}
@@ -68,7 +68,7 @@ int XMLSettingsProvider::getSetting(const Setting<int>& setting) {
if (values_.find(setting.getKey()) != values_.end()) {
std::string value = values_[setting.getKey()];
try {
- return value.empty() ? setting.getDefaultValue() : boost::lexical_cast<int>(value);;
+ return value.empty() ? setting.getDefaultValue() : boost::lexical_cast<int>(value);
}
catch(boost::bad_lexical_cast &) {}
}
@@ -110,7 +110,7 @@ void XMLSettingsProvider::handleStartElement(const std::string& element, const s
void XMLSettingsProvider::handleEndElement(const std::string& /*element*/, const std::string& /*ns*/) {
if (level_ == SettingLevel) {
values_[currentElement_] = currentText_;
- SWIFT_LOG(debug) << "Setting value of " << currentElement_ << " to " << currentText_ << std::endl;
+ SWIFT_LOG(debug) << "Setting value of " << currentElement_ << " to " << currentText_;
}
level_--;
}
@@ -123,7 +123,3 @@ void XMLSettingsProvider::handleCharacterData(const std::string& data) {
}
-
-
-
-