uisupport: Provide helpers for dealing with widget changes
[quassel.git] / src / common / syncableobject.cpp
index 3a1799e..f43a155 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2015 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  *
 #include "signalproxy.h"
 #include "util.h"
 
-INIT_SYNCABLE_OBJECT(SyncableObject)
 SyncableObject::SyncableObject(QObject *parent)
-    : QObject(parent),
-    _initialized(false),
-    _allowClientUpdates(false)
+    : QObject(parent)
 {
 }
 
 
 SyncableObject::SyncableObject(const QString &objectName, QObject *parent)
-    : QObject(parent),
-    _initialized(false),
-    _allowClientUpdates(false)
+    : QObject(parent)
 {
     setObjectName(objectName);
 }
@@ -114,15 +109,11 @@ QVariantMap SyncableObject::toVariantMap()
 
         QVariant::Type variantType = QVariant::nameToType(method.typeName());
         if (variantType == QVariant::Invalid && !QByteArray(method.typeName()).isEmpty()) {
-#if QT_VERSION >= 0x050000
             qWarning() << "SyncableObject::toVariantMap(): cannot fetch init data for:" << this << method.methodSignature() << "- Returntype is unknown to Qt's MetaSystem:" << QByteArray(method.typeName());
-#else
-            qWarning() << "SyncableObject::toVariantMap(): cannot fetch init data for:" << this << method.signature() << "- Returntype is unknown to Qt's MetaSystem:" << QByteArray(method.typeName());
-#endif
             continue;
         }
 
-        QVariant value(variantType, (const void *)0);
+        QVariant value(variantType, (const void *)nullptr);
         QGenericReturnArgument genericvalue = QGenericReturnArgument(method.typeName(), value.data());
         QMetaObject::invokeMethod(this, methodname.toLatin1(), genericvalue);