X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fignorelistmodel.h;h=262358b53036373aa990e217dfa05635783dfa48;hp=7b62cceb84fdbb4cc6c4b1ebf724b13f4a2e3021;hb=673ded0d543cbdc2cf6e746b6bee7c1d21af8f90;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/qtui/settingspages/ignorelistmodel.h b/src/qtui/settingspages/ignorelistmodel.h index 7b62cceb..262358b5 100644 --- a/src/qtui/settingspages/ignorelistmodel.h +++ b/src/qtui/settingspages/ignorelistmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 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