File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
src/bin/patchmanager-daemon Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -3020,6 +3020,13 @@ void PatchManagerObject::setupFilter()
30203020 *
30213021 * \sa m_filter
30223022 */
3023+
3024+ PatchManagerFilter::PatchManagerFilter (QObject *parent, int maxCost )
3025+ : QObject(parent)
3026+ , QCache(maxCost)
3027+ {
3028+ }
3029+
30233030void PatchManagerFilter::setup ()
30243031{
30253032 static const char *etcList[] = {
Original file line number Diff line number Diff line change @@ -75,18 +75,17 @@ class QNetworkAccessManager;
7575class PatchManagerAdaptor ;
7676class QLocalServer ;
7777
78- template <typename Key, typename T>
79- class PatchManagerFilter : public QCache <Key, T>
78+ class PatchManagerFilter : public QObject , public QCache <QString, QObject>
8079{
81- // Q_OBJECT
82- // Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
80+ Q_OBJECT
81+ Q_PROPERTY (bool active READ active WRITE setActive NOTIFY activeChanged)
8382public:
84- // PatchManagerFilter(quint maxCost = 100) : QCache( maxCost)
83+ PatchManagerFilter (QObject *parent = nullptr , int maxCost = 100 );
8584 // ~PatchManagerFilter();
8685
8786 void setup ();
8887 // override QCache::contains()
89- bool contains (const Key &key) const
88+ bool contains (const QString &key) const
9089 {
9190 if (m_active) {
9291 return false ;
@@ -300,7 +299,7 @@ private slots:
300299 QTimer *m_sessionBusConnector = nullptr ;
301300 QDBusConnection m_sbus;
302301
303- PatchManagerFilter<QString, QObject> m_filter;
302+ PatchManagerFilter m_filter;
304303 void setupFilter ();
305304};
306305
You can’t perform that action at this time.
0 commit comments