@@ -31,6 +31,7 @@
#include <QtProtobuf/qabstractprotobufserializer.h>
+QT_BEGIN_NAMESPACE
namespace {
@@ -76,8 +77,6 @@ private:
static QtProtobufPrivate::SerializationHandler empty;
};
-QT_BEGIN_NAMESPACE
-
QtProtobufPrivate::SerializationHandler HandlersRegistry::empty{};
}
@@ -91,4 +90,4 @@ QtProtobufPrivate::SerializationHandler QtProtobufPrivate::findHandler(int userT
return HandlersRegistry::instance().findHandler(userType);
-QT_END_NAMESPACE
+QT_END_NAMESPACE
@@ -26,6 +26,8 @@
#include "qtprotobuftypes.h"
#include "qprotobufobject.h"
+
#define registerProtobufType(X) qRegisterMetaType<X>(# X)
namespace QtProtobuf {
@@ -317,6 +317,8 @@ bool repeatedValueCompare(const QMap<K, QSharedPointer<V>>& a, const QMap<K, QSh
// TODO Qt6: Replace with the automatic type registrar
Q_PROTOBUF_EXPORT void qRegisterProtobufTypes();
Q_DECLARE_METATYPE(QtProtobuf::int32)
Q_DECLARE_METATYPE(QtProtobuf::int64)
Q_DECLARE_METATYPE(QtProtobuf::sint32)