projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Make InternalPeer (more) thread-safe
[quassel.git]
/
src
/
common
/
coreinfo.h
diff --git
a/src/common/coreinfo.h
b/src/common/coreinfo.h
index
e7b9244
..
26879d4
100644
(file)
--- a/
src/common/coreinfo.h
+++ b/
src/common/coreinfo.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-
08 by the Quassel Project
*
+ * Copyright (C) 2005-
2018 by the Quassel Project
*
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-15,29
+15,37
@@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 5
9 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ * 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
***************************************************************************/
***************************************************************************/
-#ifndef COREINFO_H
-#define COREINFO_H
+#pragma once
#include "syncableobject.h"
/*
#include "syncableobject.h"
/*
- * gather various information
s
about the core.
+ * gather various information about the core.
*/
*/
-class CoreInfo : public SyncableObject {
- Q_OBJECT
+class CoreInfo : public SyncableObject
+{
+ Q_OBJECT
+ SYNCABLE_OBJECT
-
Q_PROPERTY(QVariantMap coreData READ coreData WRITE setCoreData STORED false
)
+
Q_PROPERTY(QVariantMap coreData READ coreData WRITE setCoreData
)
public:
public:
- CoreInfo(QObject *parent = 0) : SyncableObject(parent) {}
+ explicit CoreInfo(QObject *parent = nullptr);
+ inline QVariant &at(const QString &key) { return _coreData[key]; }
+
+ void setConnectedClientData(int, QVariantList);
+
+signals:
+ void coreDataChanged(QVariantMap);
public slots:
public slots:
- virtual inline QVariantMap coreData() const { return QVariantMap(); }
- virtual inline void setCoreData(const QVariantMap &) {}
-};
+ QVariantMap coreData() const;
+ void setCoreData(const QVariantMap &);
-#endif //COREINFO_H
+private:
+ QVariantMap _coreData;
+};