return m_DownloadedData;
}
void MainWindow::readButtons(const QByteArray &in){
- int a=in.count('\n');
+ /*int a=in.count('\n');
QString d=in.split('\n').at(0);
conf->setValue(QString("firstline"), d);
qDebug()<<"first line : "<<d;
}
qDebug()<<"q->exec() : "<<q->exec()<<" lastError()="<<q->lastError();
- };
+ };*/
+ bool ok = sax2.parse(in);
+ if (!ok)qDebug() << "Parsing failed.\n";
db.commit();
flush();
emit datafilled();
QByteArray m_DownloadedData;
};
-
+#include "sax2.h"
#endif // FILEDOWNLOADER_H
signals:
void datafilled();
private:
+
//QsKineticScroller * ks;
//QScrollArea * scroll;
QMutex sql,updatelocker;
{
reader.setContentHandler(&handler);
reader.setErrorHandler(&handler);
+
+}
+sax2::parse(const QXmlInputSource *input){
+ source = new QXmlInputSource(input);
+
+
}
class sax2 : public QXmlSimpleReader
{
Q_OBJECT
-
+ //QByteArray data;
QXmlSimpleReader reader;
+ QXmlDefaultHandler handler;
+ QXmlInputSource source;
public:
explicit sax2(QObject *parent = 0);
-
+ int parse(const QXmlInputSource *input);
signals:
public slots: