X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fignorelistmodel.h;h=f9abad3649799992316a832d595810ecfb8d56f7;hb=24c7de34254b5de4cf28045a6923a527e06f7290;hp=3b27a1c70586f8d2b7d93ec140f2b605dbc6a59e;hpb=a95ad2de573027f9bee36db972bcae4195168d0c;p=quassel.git diff --git a/src/qtui/settingspages/ignorelistmodel.h b/src/qtui/settingspages/ignorelistmodel.h index 3b27a1c7..f9abad36 100644 --- a/src/qtui/settingspages/ignorelistmodel.h +++ b/src/qtui/settingspages/ignorelistmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2020 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,11 +18,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef IGNORELISTMODEL_H -#define IGNORELISTMODEL_H +#pragma once + +#include #include -#include #include "clientignorelistmanager.h" @@ -47,7 +47,7 @@ public: inline int rowCount(const QModelIndex& parent = QModelIndex()) const override; inline int columnCount(const QModelIndex& parent = QModelIndex()) const override; - inline bool hasConfigChanged() const { return _configChanged; } + inline bool hasConfigChanged() const { return static_cast(_clonedIgnoreListManager); } inline bool isReady() const { return _modelReady; } const IgnoreListManager::IgnoreListItem& ignoreListItemAt(int row) const; @@ -66,8 +66,7 @@ signals: void modelReady(bool); private: - ClientIgnoreListManager _clonedIgnoreListManager; - bool _configChanged{false}; + std::unique_ptr _clonedIgnoreListManager; bool _modelReady{false}; const IgnoreListManager& ignoreListManager() const; @@ -92,5 +91,3 @@ int IgnoreListModel::columnCount(const QModelIndex& parent) const Q_UNUSED(parent); return isReady() ? 3 : 0; } - -#endif // IGNORELISTMODEL_H