mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +03:00
Finish 1.4.67
This commit is contained in:
commit
608ae6cda6
@ -70,7 +70,7 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode)
|
|||||||
m_mode = mode;
|
m_mode = mode;
|
||||||
|
|
||||||
QSqlDatabase db = QSqlDatabase::database(m_connectionName);
|
QSqlDatabase db = QSqlDatabase::database(m_connectionName);
|
||||||
QSqlQuery* query = new QSqlQuery(db);
|
QSqlQuery query(db);
|
||||||
|
|
||||||
if (!db.isValid()) {
|
if (!db.isValid()) {
|
||||||
setLastError(QObject::tr("Invalid connection! %1").arg(m_connectionName));
|
setLastError(QObject::tr("Invalid connection! %1").arg(m_connectionName));
|
||||||
@ -82,13 +82,12 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode)
|
|||||||
if (!m_prepared) return false;
|
if (!m_prepared) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
query->prepare(m_preparedSQL);
|
query.prepare(m_preparedSQL);
|
||||||
|
fillParams(&query);
|
||||||
fillParams(query);
|
query.exec();
|
||||||
query->exec();
|
|
||||||
|
|
||||||
QSqlQueryModel *model = new QSqlQueryModel;
|
QSqlQueryModel *model = new QSqlQueryModel;
|
||||||
model->setQuery(*query);
|
model->setQuery(query);
|
||||||
|
|
||||||
while (model->canFetchMore())
|
while (model->canFetchMore())
|
||||||
model->fetchMore();
|
model->fetchMore();
|
||||||
|
Loading…
Reference in New Issue
Block a user