|
@@ -12721,8 +12721,6 @@ void SqlQueryView::openRow(const QModelIndex &index)
|
12721
|
12721
|
|
12722
|
12722
|
@ The other functions are wrappers around model methods.
|
12723
|
12723
|
|
12724
|
|
-\danger |setQuery()| leaks database connections.
|
12725
|
|
-
|
12726
|
12724
|
@<SqlQueryView implementation@>=
|
12727
|
12725
|
void SqlQueryView::setQuery(const QString &query)
|
12728
|
12726
|
{
|
|
@@ -12730,6 +12728,7 @@ void SqlQueryView::setQuery(const QString &query)
|
12730
|
12728
|
database.open();
|
12731
|
12729
|
QSqlQuery q(query, database);
|
12732
|
12730
|
((QSqlQueryModel*)model())->setQuery(q);
|
|
12731
|
+ database.close();
|
12733
|
12732
|
}
|
12734
|
12733
|
|
12735
|
12734
|
bool SqlQueryView::setHeaderData(int section, Qt::Orientation@, orientation,
|