22 #include "fileconfigloader.h" 27 std::unique_ptr<Glib::KeyFile> FileConfigLoader::loadConfig()
29 std::unique_ptr<Glib::KeyFile> configData = std::unique_ptr<Glib::KeyFile>(
new Glib::KeyFile);
31 configData->load_from_file(Glib::ustring(this->m_source), Glib::KEY_FILE_NONE);
32 log_debug() <<
"Loaded config file: \"" << this->m_source <<
"\"";
33 }
catch (Glib::FileError &error) {
34 log_error() <<
"Could not load SoftwareContainer config: \"" << error.what() <<
"\"";
35 log_debug() <<
"Config file that failed to load: \"" << this->m_source <<
"\"";
37 }
catch (Glib::KeyFileError &error) {
38 log_error() <<
"Could not load SoftwareContainer config: \"" << error.what() <<
"\"";
39 log_debug() <<
"Config file that failed to load: \"" << this->m_source <<
"\"";
Developers guide to adding a config item: