Quellcode durchsuchen

Additional Qt-namespace fixes

Mårten Nordheim vor 2 Jahren
Ursprung
Commit
54da1cab14

+ 2 - 3
src/protobuf/qabstractprotobufserializer.cpp

@@ -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

+ 2 - 0
src/protobuf/qtprotobuf.cpp

@@ -26,6 +26,8 @@
 #include "qtprotobuftypes.h"
 #include "qprotobufobject.h"
 
+QT_BEGIN_NAMESPACE
+
 #define registerProtobufType(X) qRegisterMetaType<X>(# X)
 
 namespace QtProtobuf {

+ 2 - 0
src/protobuf/qtprotobuftypes.h

@@ -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();
 
+QT_END_NAMESPACE
+
 Q_DECLARE_METATYPE(QtProtobuf::int32)
 Q_DECLARE_METATYPE(QtProtobuf::int64)
 Q_DECLARE_METATYPE(QtProtobuf::sint32)