summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-27 16:19:29 +0200
committerKent Hansen <kent.hansen@nokia.com>2012-03-27 19:22:48 +0200
commitd236fe2214340164bec4f34cb27dea4a634ee0de (patch)
treecda4ebbcc91717b37e5a2dbccb9ee46c2a1d3885 /doc
parent2b17b0235b70f89d15d3b91a14c3297d38377f94 (diff)
parentcbc883da6910b3357a4e03d0e2dfa841da1a03e8 (diff)
Merge master into api_changes
Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
Diffstat (limited to 'doc')
-rw-r--r--doc/src/snippets/code/src_corelib_global_qglobal.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
index 21bea7aef8..16f6783a52 100644
--- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp
+++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
@@ -560,3 +560,26 @@ bool readConfiguration(const QFile &file)
return true;
}
//! [qunlikely]
+
+//! [qunreachable-enum]
+ enum Shapes {
+ Rectangle,
+ Triangle,
+ Circle,
+ NumShapes
+ };
+//! [qunreachable-enum]
+
+//! [qunreachable-switch]
+ switch (shape) {
+ case Rectangle:
+ return rectangle();
+ case Triangle:
+ return triangle();
+ case Circle:
+ return circle();
+ case NumShapes:
+ Q_UNREACHABLE();
+ break;
+ }
+//! [qunreachable-switch]