Changeset View
Changeset View
Standalone View
Standalone View
runners/bookmarks/browsers/chrome.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 69 | { | |||
---|---|---|---|---|---|
77 | return results; | 77 | return results; | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | QList<BookmarkMatch> Chrome::match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks) | 80 | QList<BookmarkMatch> Chrome::match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks) | ||
81 | { | 81 | { | ||
82 | QList<BookmarkMatch> results; | 82 | QList<BookmarkMatch> results; | ||
83 | 83 | | |||
84 | const auto bookmarks = profileBookmarks->bookmarks(); | 84 | const auto bookmarks = profileBookmarks->bookmarks(); | ||
85 | Favicon *favicon = profileBookmarks->profile().favicon(); | ||||
85 | for (const QJsonValue &bookmarkValue : bookmarks) { | 86 | for (const QJsonValue &bookmarkValue : bookmarks) { | ||
86 | const QJsonObject bookmark = bookmarkValue.toObject(); | 87 | const QJsonObject bookmark = bookmarkValue.toObject(); | ||
87 | 88 | const QString url = bookmark.value(QStringLiteral("url")).toString(); | |||
88 | QString url = bookmark.value(QStringLiteral("url")).toString(); | 89 | BookmarkMatch bookmarkMatch(favicon->iconFor(url), term, bookmark.value(QStringLiteral("name")).toString(), url); | ||
89 | | ||||
90 | BookmarkMatch bookmarkMatch(profileBookmarks->profile().favicon(), term, bookmark.value(QStringLiteral("name")).toString(), url); | | |||
91 | bookmarkMatch.addTo(results, addEveryThing); | 90 | bookmarkMatch.addTo(results, addEveryThing); | ||
92 | } | 91 | } | ||
93 | return results; | 92 | return results; | ||
94 | } | 93 | } | ||
95 | 94 | | |||
96 | void Chrome::prepare() | 95 | void Chrome::prepare() | ||
97 | { | 96 | { | ||
98 | m_dirty = false; | 97 | m_dirty = false; | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |