1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 11:47:24 +01:00

fixes #755 Added Configlet::clear()

This commit is contained in:
Vadim Kurland 2009-12-02 04:21:00 +00:00
parent 4aab1cc7dc
commit 758ce50c13
2 changed files with 11 additions and 4 deletions

View File

@ -59,9 +59,7 @@ Configlet::Configlet(const std::string &prefix,
const std::string &default_prefix,
const QString &file_name)
{
remove_comments = true;
comment_str = "##";
collapse_empty_strings = false;
clear();
if (!reload(prefix, file_name)) reload(default_prefix, file_name);
}
@ -86,6 +84,14 @@ Configlet::~Configlet()
{
}
void Configlet::clear()
{
vars.clear();
remove_comments = true;
comment_str = "##";
collapse_empty_strings = false;
}
bool Configlet::reload(const std::string &_prefix, const QString &file_name)
{
prefix = _prefix.c_str();

View File

@ -61,7 +61,8 @@ public:
virtual ~Configlet();
bool reload(const std::string &prefix, const QString &filename);
void clear();
void setVariable(const QString &name, const QString &value);
void setVariable(const QString &name, int value);