Changeset View
Changeset View
Standalone View
Standalone View
runners/bookmarks/browsers/chrome.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | 21 | | |||
22 | #ifndef CHROME_H | 22 | #ifndef CHROME_H | ||
23 | #define CHROME_H | 23 | #define CHROME_H | ||
24 | 24 | | |||
25 | #include "browser.h" | 25 | #include "browser.h" | ||
26 | #include "findprofile.h" | 26 | #include "findprofile.h" | ||
27 | 27 | | |||
28 | #include <QMap> | | |||
29 | #include <QList> | 28 | #include <QList> | ||
30 | #include <QVariantMap> | | |||
31 | 29 | | |||
32 | #include <KDirWatch> | 30 | #include <KDirWatch> | ||
33 | 31 | | |||
32 | class QJsonObject; | ||||
33 | | ||||
34 | class FaviconFromBlob; | 34 | class FaviconFromBlob; | ||
35 | class ProfileBookmarks; | 35 | class ProfileBookmarks; | ||
36 | class Chrome : public QObject, public Browser | 36 | class Chrome : public QObject, public Browser | ||
37 | { | 37 | { | ||
38 | Q_OBJECT | 38 | Q_OBJECT | ||
39 | public: | 39 | public: | ||
40 | explicit Chrome(FindProfile *findProfile, QObject* parent = nullptr); | 40 | explicit Chrome(FindProfile *findProfile, QObject* parent = nullptr); | ||
41 | ~Chrome() override; | 41 | ~Chrome() override; | ||
42 | QList<BookmarkMatch> match(const QString &term, bool addEveryThing) override; | 42 | QList<BookmarkMatch> match(const QString &term, bool addEveryThing) override; | ||
43 | public Q_SLOTS: | 43 | public Q_SLOTS: | ||
44 | void prepare() override; | 44 | void prepare() override; | ||
45 | void teardown() override; | 45 | void teardown() override; | ||
46 | private: | 46 | private: | ||
47 | void parseFolder(const QVariantMap &entry, ProfileBookmarks *profile); | 47 | void parseFolder(const QJsonObject &entry, ProfileBookmarks *profile); | ||
48 | virtual QList<BookmarkMatch> match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks); | 48 | virtual QList<BookmarkMatch> match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks); | ||
49 | QList<ProfileBookmarks*> m_profileBookmarks; | 49 | QList<ProfileBookmarks*> m_profileBookmarks; | ||
50 | KDirWatch* m_watcher = nullptr; | 50 | KDirWatch* m_watcher = nullptr; | ||
51 | bool m_dirty; | 51 | bool m_dirty; | ||
52 | 52 | | |||
53 | }; | 53 | }; | ||
54 | 54 | | |||
55 | #endif // CHROME_H | 55 | #endif // CHROME_H |