diff options
Diffstat (limited to 'qt/common/smart-ptr/test.hxx')
-rw-r--r-- | qt/common/smart-ptr/test.hxx | 23 |
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 |