| 175 | }; |
| 176 | |
| 177 | bool |
| 178 | StatisticsTemplateProcessor::process () |
| 179 | { |
| 180 | m_output.open (QIODevice::WriteOnly); |
| 181 | |
| 182 | bool ret_value = false; |
| 183 | |
| 184 | try |
| 185 | { |
| 186 | tl::SelfTimer timer (tl::verbosity () > 21, "StatisticsForm: create content"); |
| 187 | |
| 188 | QDomDocument doc; |
| 189 | doc.setContent (m_temp, true); |
| 190 | |
| 191 | QXmlStreamWriter writer (&m_output); |
| 192 | writer.writeStartDocument (QString::fromUtf8 ("1.0")); |
| 193 | process (doc.documentElement (), m_top_eval, writer); |
| 194 | writer.writeEndDocument (); |
| 195 | |
| 196 | ret_value = true; |
| 197 | |
| 198 | } catch (tl::Exception &ex) { |
| 199 | tl::error << ex.msg (); |
| 200 | QTextStream writer (&m_output); |
| 201 | writer << tl::to_string (QObject::tr ("ERROR: evaluating template: ")).c_str () << ex.msg ().c_str (); |
| 202 | } |
| 203 | |
| 204 | m_output.close (); |
| 205 | return ret_value; |
| 206 | } |
| 207 | |
| 208 | void |
| 209 | StatisticsTemplateProcessor::process_child_nodes (const QDomElement &element, tl::Eval &eval, QXmlStreamWriter &writer) |
no test coverage detected