summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp')
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
index 4ecc1758ae..b0048014a4 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -376,38 +376,37 @@ Q_PROPERTY(QString title READ title WRITE setTitle USER true)
class MyClass : public QObject
{
Q_OBJECT
- Q_ENUMS(Priority)
public:
MyClass(QObject *parent = 0);
~MyClass();
enum Priority { High, Low, VeryHigh, VeryLow };
+ Q_ENUM(Priority)
void setPriority(Priority priority);
Priority priority() const;
};
//! [38]
-//! [39a]
+//! [39]
class QLibrary : public QObject
{
- ...
- Q_FLAGS(LoadHint LoadHints)
- ...
-//! [39a]
+ Q_OBJECT
-//! [39b]
- ...
public:
+ ...
+
enum LoadHint {
ResolveAllSymbolsHint = 0x01,
ExportExternalSymbolsHint = 0x02,
LoadArchiveMemberHint = 0x04
};
Q_DECLARE_FLAGS(LoadHints, LoadHint)
+ Q_FLAG(LoadHints)
...
-//! [39b]
+}
+//! [39]
//! [40]