mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +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;
|
||||
|
||||
QSqlDatabase db = QSqlDatabase::database(m_connectionName);
|
||||
QSqlQuery* query = new QSqlQuery(db);
|
||||
QSqlQuery query(db);
|
||||
|
||||
if (!db.isValid()) {
|
||||
setLastError(QObject::tr("Invalid connection! %1").arg(m_connectionName));
|
||||
@ -82,13 +82,12 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode)
|
||||
if (!m_prepared) return false;
|
||||
}
|
||||
|
||||
query->prepare(m_preparedSQL);
|
||||
|
||||
fillParams(query);
|
||||
query->exec();
|
||||
query.prepare(m_preparedSQL);
|
||||
fillParams(&query);
|
||||
query.exec();
|
||||
|
||||
QSqlQueryModel *model = new QSqlQueryModel;
|
||||
model->setQuery(*query);
|
||||
model->setQuery(query);
|
||||
|
||||
while (model->canFetchMore())
|
||||
model->fetchMore();
|
||||
|
Loading…
Reference in New Issue
Block a user