/***************************************************************************
- * 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 *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef ALIASESMODEL_H
-#define ALIASESMODEL_H
+#pragma once
+
+#include <memory>
#include <QAbstractItemModel>
-#include <QPointer>
#include "clientaliasmanager.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>(_clonedAliasManager); }
inline bool isReady() const { return _modelReady; }
public slots:
void modelReady(bool);
private:
- ClientAliasManager _clonedAliasManager;
- bool _configChanged{false};
+ std::unique_ptr<ClientAliasManager> _clonedAliasManager;
bool _modelReady{false};
const AliasManager& aliasManager() const;
Q_UNUSED(parent);
return isReady() ? 2 : 0;
}
-
-#endif // ALIASESMODEL_H