diff options
| author | João Abecasis <[email protected]> | 2012-01-31 17:35:00 +0100 |
|---|---|---|
| committer | Qt by Nokia <[email protected]> | 2012-02-09 00:32:41 +0100 |
| commit | 0c978407088fdbd15dc185aef7506087a88e1443 (patch) | |
| tree | a8b2e21e5cd52fa615fce085acbe4439782bf365 /src/sql/drivers/psql/qsql_psql.cpp | |
| parent | 14577726ee97c8d6dd176e0039ab2da0193c7bb1 (diff) | |
Introduce Q_DECLARE_OPAQUE_POINTER
To hide the IsPointerToTypeDerivedFromQObject monstruosity :-)
Documentation for Q_DECLARE_METATYPE and qRegisterMetaType was updated
to mention requirements on registered types and how they can be
circumvented for pointer types with the new macro.
Change-Id: If83b037a8e2f28761eb903525e87008107298801
Reviewed-by: Harald Fernengel <[email protected]>
Reviewed-by: Stephen Kelly <[email protected]>
Diffstat (limited to 'src/sql/drivers/psql/qsql_psql.cpp')
| -rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index e3533581baf..ec31d54f0f1 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -107,18 +107,10 @@ template <typename T> inline void PQfreemem(T *t, int = 0) { free(t); } -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject<PGconn*> { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(PGconn*) Q_DECLARE_METATYPE(PGconn*) -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject<PGresult*> { - enum { Value = false }; -}; -} QT_END_NAMESPACE +Q_DECLARE_OPAQUE_POINTER(PGresult*) Q_DECLARE_METATYPE(PGresult*) QT_BEGIN_NAMESPACE |
