aboutsummaryrefslogtreecommitdiff
path: root/qt/common/smart-ptr/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-04 13:33:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-04 13:33:21 +0200
commit839a84b996d89dcf3d553af23e4ed5e0e4fa60e2 (patch)
treebed8baf6721eb0109a260d170b507b597fe9790d /qt/common/smart-ptr/test.hxx
parent0b641f182c0b89b0c903f8756aa14b6b3a2f60f2 (diff)
Add support for Qt QSharedPointer as value wrapper
Diffstat (limited to 'qt/common/smart-ptr/test.hxx')
-rw-r--r--qt/common/smart-ptr/test.hxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/qt/common/smart-ptr/test.hxx b/qt/common/smart-ptr/test.hxx
index 0a4ce03..86e4fba 100644
--- a/qt/common/smart-ptr/test.hxx
+++ b/qt/common/smart-ptr/test.hxx
@@ -8,6 +8,8 @@
#include <vector>
+#include <QtCore/QSharedPointer>
+
#include <odb/core.hxx>
#include <odb/qt/lazy-ptr.hxx>
@@ -53,4 +55,25 @@ struct obj
QLazySharedPointer<cont> c;
};
+// Test QSharedPointer as a value wrapper.
+//
+#pragma db object
+struct obj2
+{
+ obj2 ()
+ {
+ }
+
+ obj2 (unsigned long id)
+ : id (id)
+ {
+ }
+
+ #pragma db id
+ unsigned long id;
+
+ #pragma db null
+ QSharedPointer<unsigned long> num;
+};
+
#endif // TEST_HXX