From 1086949b372594df141942ddf592b55fdefba37a Mon Sep 17 00:00:00 2001 From: Norbert Moutarde Date: Wed, 30 Apr 2014 23:02:15 +0200 Subject: [PATCH] attempt to use sax2 (xml) --- diary-mobile-android.pro | 2 ++ sax2.cpp | 8 ++++++++ sax2.h | 22 ++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 sax2.cpp create mode 100644 sax2.h diff --git a/diary-mobile-android.pro b/diary-mobile-android.pro index 4d447ed..25fde5e 100644 --- a/diary-mobile-android.pro +++ b/diary-mobile-android.pro @@ -15,8 +15,10 @@ TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp \ # QsKineticScroller.cpp + sax2.cpp HEADERS += mainwindow.h \ + sax2.h # QsKineticScroller.h #FORMS += mainwindow.ui diff --git a/sax2.cpp b/sax2.cpp new file mode 100644 index 0000000..c588903 --- /dev/null +++ b/sax2.cpp @@ -0,0 +1,8 @@ +#include "sax2.h" + +sax2::sax2(QObject *parent) : + QXmlSimpleReader(parent) +{ + reader.setContentHandler(&handler); + reader.setErrorHandler(&handler); +} diff --git a/sax2.h b/sax2.h new file mode 100644 index 0000000..d73a811 --- /dev/null +++ b/sax2.h @@ -0,0 +1,22 @@ +#ifndef SAX2_H +#define SAX2_H + +#include + +class sax2 : public QXmlSimpleReader +{ + Q_OBJECT + + QXmlSimpleReader reader; + + +public: + explicit sax2(QObject *parent = 0); + +signals: + +public slots: + +}; + +#endif // SAX2_H -- 2.45.1