mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[LocationCompleter] Don't leak when query icons,
- it seems it's a fix for #1299
This commit is contained in:
parent
7a1f4c77cd
commit
666ecc4d01
|
@ -95,11 +95,11 @@ void LocationCompleterRefreshJob::runJob()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load all icons into QImage
|
// Load all icons into QImage
|
||||||
|
QSqlQuery query;
|
||||||
|
query.prepare(QSL("SELECT icon FROM icons WHERE url LIKE ? LIMIT 1"));
|
||||||
foreach (QStandardItem* item, m_items) {
|
foreach (QStandardItem* item, m_items) {
|
||||||
const QUrl url = item->data(LocationCompleterModel::UrlRole).toUrl();
|
const QUrl url = item->data(LocationCompleterModel::UrlRole).toUrl();
|
||||||
|
|
||||||
QSqlQuery query;
|
|
||||||
query.prepare(QSL("SELECT icon FROM icons WHERE url LIKE ? LIMIT 1"));
|
|
||||||
query.addBindValue(QString(QL1S("%1%")).arg(QString::fromUtf8(url.toEncoded(QUrl::RemoveFragment))));
|
query.addBindValue(QString(QL1S("%1%")).arg(QString::fromUtf8(url.toEncoded(QUrl::RemoveFragment))));
|
||||||
QSqlQuery res = SqlDatabase::instance()->exec(query);
|
QSqlQuery res = SqlDatabase::instance()->exec(query);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user