diff options
Diffstat (limited to 'examples/quick/window/main.cpp')
-rw-r--r-- | examples/quick/window/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/quick/window/main.cpp b/examples/quick/window/main.cpp index bacf52af15..ee8855cbc8 100644 --- a/examples/quick/window/main.cpp +++ b/examples/quick/window/main.cpp @@ -49,7 +49,8 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - foreach (QScreen * screen, QGuiApplication::screens()) + const auto screens = QGuiApplication::screens(); + for (QScreen *screen : screens) screen->setOrientationUpdateMask(Qt::LandscapeOrientation | Qt::PortraitOrientation | Qt::InvertedLandscapeOrientation | Qt::InvertedPortraitOrientation); QQmlEngine engine; |