From: APTX Date: Wed, 20 Mar 2013 12:33:15 +0000 (+0100) Subject: Add dtor to and emit ready signal to SqlAsyncQuery. X-Git-Url: https://gitweb.aptx.org/?a=commitdiff_plain;h=74681608f537aeefbe3d711df17d4b11c58b88fe;p=localmylist.git Add dtor to and emit ready signal to SqlAsyncQuery. --- diff --git a/localmylist/sqlasyncquery.cpp b/localmylist/sqlasyncquery.cpp index c09d4c1..e1fa802 100644 --- a/localmylist/sqlasyncquery.cpp +++ b/localmylist/sqlasyncquery.cpp @@ -12,6 +12,11 @@ SqlAsyncQuery::SqlAsyncQuery(QObject *parent) : { } +SqlAsyncQuery::~SqlAsyncQuery() +{ + delete d; +} + bool SqlAsyncQuery::prepare(const QString &query) { return d->prepare(query); @@ -74,6 +79,7 @@ void SqlAsyncQuery::resultRecieved() return; d->resultReady(t->result()); + emit resultReady(); } } // namespace LocalMyList diff --git a/localmylist/sqlasyncquery.h b/localmylist/sqlasyncquery.h index 1381357..d9d2af2 100644 --- a/localmylist/sqlasyncquery.h +++ b/localmylist/sqlasyncquery.h @@ -15,6 +15,7 @@ class LOCALMYLISTSHARED_EXPORT SqlAsyncQuery : public QObject Q_OBJECT public: explicit SqlAsyncQuery(QObject *parent = 0); + ~SqlAsyncQuery(); bool prepare(const QString &query); void bindValue(const QString &placeholder, const QVariant &val, QSql::ParamType paramType = QSql::In);