summaryrefslogtreecommitdiff
path: root/core/pim/datebook/holiday/national/nationalcfg.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/holiday/national/nationalcfg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/holiday/national/nationalcfg.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/core/pim/datebook/holiday/national/nationalcfg.cpp b/core/pim/datebook/holiday/national/nationalcfg.cpp
index a293251..52c453f 100644
--- a/core/pim/datebook/holiday/national/nationalcfg.cpp
+++ b/core/pim/datebook/holiday/national/nationalcfg.cpp
@@ -22,31 +22,26 @@ NHcfg::~NHcfg()
bool NHcfg::load(const QString&aPath)
{
_path=aPath;
stage = 0;
_content.clear();
- odebug << "Start loading file "<<_path<<oendl;
QFile *f=new QFile(_path);
if (!f) {
oerr << "Could not open file" << oendl;
return false;
}
- odebug << "Source" << oendl;
QXmlInputSource is(*f);
- odebug << "Reader" << oendl;
QXmlSimpleReader reader;
- odebug << "Handler" << oendl;
reader.setContentHandler(this);
- odebug << "Error handler" << oendl;
reader.setErrorHandler(this);
err = "";
- odebug << "parse it" << oendl;
bool ret = reader.parse(is);
- odebug << "Errors: " << err << oendl;
+ if (err.length()>0)
+ odebug << "Errors: " << err << oendl;
return ret;
}
const tholidaylist&NHcfg::days()const
{
return _content;
@@ -88,13 +83,12 @@ bool NHcfg::fatalError(const QXmlParseException& e)
return false;
}
bool NHcfg::startElement(const QString&, const QString&,const QString& name, const QXmlAttributes& attr)
{
bool ret = false;
- odebug << "startElement: " << name << oendl;
if (name==_key_doc) {
stage = 1;
return true;
}
if (stage == 0) {
err = "This is not a national holiday config file";
@@ -141,9 +135,8 @@ bool NHcfg::setName(const QXmlAttributes&attr)
{
int nindx = attr.index("value");
if (nindx==-1) {
return false;
}
_contentname = attr.value(nindx);
- odebug << "Contentname = " << _contentname<<oendl;
return true;
}