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:
parent
4aab1cc7dc
commit
758ce50c13
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user