Commit cb99ab73 authored by Stefan Brüns's avatar Stefan Brüns

KRunner: remove no longer existant and unused column from SQL query

Summary:
The favicon_id is not used in the query results, and may not even exist
when the places db has been created with FF 58 or later. In case the
column does not exist the query fails completely.

BUG: 398305

Test Plan:
1. Create a new FF profile
2. Add some bookmarks
3. Do some queries

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15305
parent 51d863ce
......@@ -87,13 +87,13 @@ QList< BookmarkMatch > Firefox::match(const QString& term, bool addEverything)
QString tmpTerm = term;
QString query;
if (addEverything) {
query = QStringLiteral("SELECT moz_bookmarks.fk, moz_bookmarks.title, moz_places.url," \
"moz_places.favicon_id FROM moz_bookmarks, moz_places WHERE " \
query = QStringLiteral("SELECT moz_bookmarks.fk, moz_bookmarks.title, moz_places.url " \
"FROM moz_bookmarks, moz_places WHERE " \
"moz_bookmarks.type = 1 AND moz_bookmarks.fk = moz_places.id");
} else {
const QString escapedTerm = tmpTerm.replace('\'', QLatin1String("\\'"));
query = QString("SELECT moz_bookmarks.fk, moz_bookmarks.title, moz_places.url," \
"moz_places.favicon_id FROM moz_bookmarks, moz_places WHERE " \
query = QString("SELECT moz_bookmarks.fk, moz_bookmarks.title, moz_places.url " \
"FROM moz_bookmarks, moz_places WHERE " \
"moz_bookmarks.type = 1 AND moz_bookmarks.fk = moz_places.id AND " \
"(moz_bookmarks.title LIKE '%" + escapedTerm + "%' or moz_places.url LIKE '%"
+ escapedTerm + "%')");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment