1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

IconProvider: Use encodeUrl also when searching for existing icon

As suggested by @srazi
This commit is contained in:
David Rosca 2018-01-03 12:12:14 +01:00
parent 482f446712
commit 87527762f8

View File

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -243,7 +243,7 @@ void IconProvider::saveIconsToDatabase()
foreach (const BufferedIcon &ic, m_iconBuffer) {
QSqlQuery query(SqlDatabase::instance()->database());
query.prepare("SELECT id FROM icons WHERE url = ?");
query.bindValue(0, ic.first.toEncoded(QUrl::RemoveFragment));
query.bindValue(0, encodeUrl(ic.first));
query.exec();
if (query.next()) {