DBus: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. In some cases, the type is required to be registered with the typedef name, so those Q_DECLARE_METATYPE uses remain for now. In a future patch we can also remove those and the typedefs themselves. Change-Id: I5721955c86f566ae09024203954840f817bd3088 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
parent
bd04a3d136
commit
ad330f327e
@ -45,7 +45,6 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
||||
Q_DECLARE_METATYPE(QVariantList)
|
||||
|
||||
class MyObject: public QObject
|
||||
{
|
||||
|
@ -45,9 +45,6 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtDBus>
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
Q_DECLARE_METATYPE(QList<int>)
|
||||
Q_DECLARE_METATYPE(QVector<int>)
|
||||
|
||||
class tst_QDBusLocalCalls: public QObject
|
||||
{
|
||||
|
@ -56,42 +56,13 @@ static bool compareFileDescriptors(int fd1, int fd2)
|
||||
}
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
Q_DECLARE_METATYPE(QList<bool>)
|
||||
Q_DECLARE_METATYPE(QList<short>)
|
||||
Q_DECLARE_METATYPE(QList<ushort>)
|
||||
Q_DECLARE_METATYPE(QList<int>)
|
||||
Q_DECLARE_METATYPE(QList<uint>)
|
||||
Q_DECLARE_METATYPE(QList<qlonglong>)
|
||||
Q_DECLARE_METATYPE(QList<qulonglong>)
|
||||
Q_DECLARE_METATYPE(QList<double>)
|
||||
Q_DECLARE_METATYPE(QList<QDBusVariant>)
|
||||
Q_DECLARE_METATYPE(QList<QDateTime>)
|
||||
|
||||
Q_DECLARE_METATYPE(QList<QByteArray>)
|
||||
Q_DECLARE_METATYPE(QList<QVariantList>)
|
||||
Q_DECLARE_METATYPE(QList<QStringList>)
|
||||
Q_DECLARE_METATYPE(QList<QList<bool> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<short> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<ushort> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<int> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<uint> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<qlonglong> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<qulonglong> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<double> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<QDBusObjectPath> >)
|
||||
Q_DECLARE_METATYPE(QList<QList<QDBusSignature> >)
|
||||
|
||||
typedef QMap<int, QString> IntStringMap;
|
||||
typedef QMap<QString, QString> StringStringMap;
|
||||
typedef QMap<QDBusObjectPath, QString> ObjectPathStringMap;
|
||||
typedef QMap<qlonglong, QDateTime> LLDateTimeMap;
|
||||
typedef QMap<QDBusSignature, QString> SignatureStringMap;
|
||||
Q_DECLARE_METATYPE(IntStringMap)
|
||||
Q_DECLARE_METATYPE(StringStringMap)
|
||||
Q_DECLARE_METATYPE(ObjectPathStringMap)
|
||||
Q_DECLARE_METATYPE(LLDateTimeMap)
|
||||
Q_DECLARE_METATYPE(SignatureStringMap)
|
||||
|
||||
static bool compare(const QDBusUnixFileDescriptor &t1, const QDBusUnixFileDescriptor &t2)
|
||||
{
|
||||
@ -144,7 +115,6 @@ struct MyVariantMapStruct
|
||||
{ return s == other.s && map == other.map; }
|
||||
};
|
||||
Q_DECLARE_METATYPE(MyVariantMapStruct)
|
||||
Q_DECLARE_METATYPE(QList<MyVariantMapStruct>)
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &arg, const MyVariantMapStruct &ms)
|
||||
{
|
||||
@ -170,7 +140,6 @@ struct MyFileDescriptorStruct
|
||||
{ return compare(fd, other.fd); }
|
||||
};
|
||||
Q_DECLARE_METATYPE(MyFileDescriptorStruct)
|
||||
Q_DECLARE_METATYPE(QList<MyFileDescriptorStruct>)
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &arg, const MyFileDescriptorStruct &ms)
|
||||
{
|
||||
|
@ -83,9 +83,6 @@ Q_DECLARE_METATYPE(Struct1)
|
||||
Q_DECLARE_METATYPE(Struct4)
|
||||
Q_DECLARE_METATYPE(StringPair)
|
||||
|
||||
Q_DECLARE_METATYPE(QList<Struct1>)
|
||||
Q_DECLARE_METATYPE(QList<Struct4>)
|
||||
|
||||
Q_DECLARE_METATYPE(const QMetaObject*)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -93,11 +93,6 @@ Q_DECLARE_METATYPE(Struct3)
|
||||
Q_DECLARE_METATYPE(Struct4)
|
||||
Q_DECLARE_METATYPE(StringPair)
|
||||
|
||||
Q_DECLARE_METATYPE(QList<Struct1>)
|
||||
Q_DECLARE_METATYPE(QList<Struct2>)
|
||||
Q_DECLARE_METATYPE(QList<Struct3>)
|
||||
Q_DECLARE_METATYPE(QList<Struct4>)
|
||||
|
||||
Q_DECLARE_METATYPE(Invalid0)
|
||||
Q_DECLARE_METATYPE(Invalid1)
|
||||
Q_DECLARE_METATYPE(Invalid2)
|
||||
@ -107,14 +102,9 @@ Q_DECLARE_METATYPE(Invalid5)
|
||||
Q_DECLARE_METATYPE(Invalid6)
|
||||
Q_DECLARE_METATYPE(Invalid7)
|
||||
|
||||
Q_DECLARE_METATYPE(QList<Invalid0>)
|
||||
|
||||
typedef QMap<int, QString> IntStringMap;
|
||||
typedef QMap<QString, QString> StringStringMap;
|
||||
typedef QMap<QString, Struct1> StringStruct1Map;
|
||||
Q_DECLARE_METATYPE(IntStringMap)
|
||||
Q_DECLARE_METATYPE(StringStringMap)
|
||||
Q_DECLARE_METATYPE(StringStruct1Map)
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant::Type)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user