File indexing completed on 2024-05-19 16:41:36
0001 /* 0002 SPDX-FileCopyrightText: 2007 Glenn Ergeerts <glenn.ergeerts@telenet.be> 0003 SPDX-FileCopyrightText: 2012 Marco Gulino <marco.gulino@xpeppers.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "browser.h" 0011 #include "findprofile.h" 0012 0013 #include <QList> 0014 0015 #include <KDirWatch> 0016 0017 class QJsonObject; 0018 0019 class ProfileBookmarks; 0020 class Chrome : public QObject, public Browser 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit Chrome(FindProfile *findProfile, QObject *parent = nullptr); 0025 ~Chrome() override; 0026 QList<BookmarkMatch> match(const QString &term, bool addEveryThing) override; 0027 public Q_SLOTS: 0028 void prepare() override; 0029 void teardown() override; 0030 0031 private: 0032 void parseFolder(const QJsonObject &entry, ProfileBookmarks *profile); 0033 virtual QList<BookmarkMatch> match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks); 0034 QList<ProfileBookmarks *> m_profileBookmarks; 0035 KDirWatch *m_watcher = nullptr; 0036 bool m_dirty; 0037 };