/***************************************************************************
- * 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 *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef IGNORELISTMODEL_H
-#define IGNORELISTMODEL_H
+#pragma once
+
+#include <memory>
#include <QAbstractItemModel>
-#include <QPointer>
#include "clientignorelistmanager.h"
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<bool>(_clonedIgnoreListManager); }
inline bool isReady() const { return _modelReady; }
const IgnoreListManager::IgnoreListItem& ignoreListItemAt(int row) const;
void modelReady(bool);
private:
- ClientIgnoreListManager _clonedIgnoreListManager;
- bool _configChanged{false};
+ std::unique_ptr<ClientIgnoreListManager> _clonedIgnoreListManager;
bool _modelReady{false};
const IgnoreListManager& ignoreListManager() const;
Q_UNUSED(parent);
return isReady() ? 3 : 0;
}
-
-#endif // IGNORELISTMODEL_H