summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-09-04 18:46:10 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-09-04 18:47:34 (GMT)
commitfd529383c4491580db344fb3d8035bd0ad3cb5e0 (patch)
treec215155942977ab545a08584bfff80bb002cadd5 /doc
parenta9eff6cd9719572ee7bb2a50217b5cbbb9fa80c2 (diff)
downloadQt-fd529383c4491580db344fb3d8035bd0ad3cb5e0.zip
Qt-fd529383c4491580db344fb3d8035bd0ad3cb5e0.tar.gz
Qt-fd529383c4491580db344fb3d8035bd0ad3cb5e0.tar.bz2
Doc: Added info on Q_FLAGS() by providing an example with more context.
Reviewed-by: Trust Me As-seen-on: qt-interest
Diffstat (limited to 'doc')
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
index 2c18036..c200c30 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -404,9 +404,25 @@ public:
//! [38]
-//! [39]
-Q_FLAGS(Options Alignment)
-//! [39]
+//! [39a]
+class QLibrary : public QObject
+{
+ ...
+ Q_FLAGS(LoadHint LoadHints)
+ ...
+//! [39a]
+
+//! [39b]
+ ...
+public:
+ enum LoadHint {
+ ResolveAllSymbolsHint = 0x01,
+ ExportExternalSymbolsHint = 0x02,
+ LoadArchiveMemberHint = 0x04
+ };
+ Q_DECLARE_FLAGS(LoadHints, LoadHint)
+ ...
+//! [39b]
//! [40]