X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcoreinfo.cpp;h=7f15d2cfe8c2bd1c112a587a9413d7ea3e86ec48;hb=8f92b3f08df9f4eb8fd243ccec6aa9d4b563ec23;hp=e4019c7a2b6246785b581dd9cf86b0f2374b1a00;hpb=bd5414d8bfe2be18ba051d4bbf936e9ead0cdf66;p=quassel.git diff --git a/src/common/coreinfo.cpp b/src/common/coreinfo.cpp index e4019c7a..7f15d2cf 100644 --- a/src/common/coreinfo.cpp +++ b/src/common/coreinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,15 +20,16 @@ #include "coreinfo.h" -INIT_SYNCABLE_OBJECT(CoreInfo) -CoreInfo::CoreInfo(QObject *parent) : SyncableObject(parent) {} +CoreInfo::CoreInfo(QObject* parent) + : SyncableObject(parent) +{} QVariantMap CoreInfo::coreData() const { return _coreData; } -void CoreInfo::setCoreData(const QVariantMap &coreData) +void CoreInfo::setCoreData(const QVariantMap& coreData) { _coreData = coreData; SYNC(ARG(coreData)); @@ -41,3 +42,11 @@ void CoreInfo::setConnectedClientData(const int peerCount, const QVariantList pe _coreData["sessionConnectedClientData"] = peerData; setCoreData(_coreData); } + +void CoreInfo::reset() +{ + // Clear any stored data + _coreData.clear(); + // Propagate changes to listeners + emit coreDataChanged(_coreData); +}