summaryrefslogtreecommitdiff
path: root/core/pim/datebook/holiday/national/nationalcfg.cpp
Unidiff
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
@@ -25,25 +25,20 @@ bool NHcfg::load(const QString&aPath)
25 _path=aPath; 25 _path=aPath;
26 stage = 0; 26 stage = 0;
27 _content.clear(); 27 _content.clear();
28 odebug << "Start loading file "<<_path<<oendl;
29 QFile *f=new QFile(_path); 28 QFile *f=new QFile(_path);
30 if (!f) { 29 if (!f) {
31 oerr << "Could not open file" << oendl; 30 oerr << "Could not open file" << oendl;
32 return false; 31 return false;
33 } 32 }
34 odebug << "Source" << oendl;
35 QXmlInputSource is(*f); 33 QXmlInputSource is(*f);
36 odebug << "Reader" << oendl;
37 QXmlSimpleReader reader; 34 QXmlSimpleReader reader;
38 odebug << "Handler" << oendl;
39 reader.setContentHandler(this); 35 reader.setContentHandler(this);
40 odebug << "Error handler" << oendl;
41 reader.setErrorHandler(this); 36 reader.setErrorHandler(this);
42 37
43 err = ""; 38 err = "";
44 odebug << "parse it" << oendl;
45 bool ret = reader.parse(is); 39 bool ret = reader.parse(is);
46 odebug << "Errors: " << err << oendl; 40 if (err.length()>0)
41 odebug << "Errors: " << err << oendl;
47 return ret; 42 return ret;
48} 43}
49 44
@@ -91,7 +86,6 @@ bool NHcfg::fatalError(const QXmlParseException& e)
91bool NHcfg::startElement(const QString&, const QString&,const QString& name, const QXmlAttributes& attr) 86bool NHcfg::startElement(const QString&, const QString&,const QString& name, const QXmlAttributes& attr)
92{ 87{
93 bool ret = false; 88 bool ret = false;
94 odebug << "startElement: " << name << oendl;
95 if (name==_key_doc) { 89 if (name==_key_doc) {
96 stage = 1; 90 stage = 1;
97 return true; 91 return true;
@@ -144,6 +138,5 @@ bool NHcfg::setName(const QXmlAttributes&attr)
144 return false; 138 return false;
145 } 139 }
146 _contentname = attr.value(nindx); 140 _contentname = attr.value(nindx);
147 odebug << "Contentname = " << _contentname<<oendl;
148 return true; 141 return true;
149} 142}