summaryrefslogtreecommitdiffstats
path: root/src/datavisualizationqml/abstractdeclarative.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualizationqml/abstractdeclarative.cpp')
-rw-r--r--src/datavisualizationqml/abstractdeclarative.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/datavisualizationqml/abstractdeclarative.cpp b/src/datavisualizationqml/abstractdeclarative.cpp
index 8abfd94c..af19d46f 100644
--- a/src/datavisualizationqml/abstractdeclarative.cpp
+++ b/src/datavisualizationqml/abstractdeclarative.cpp
@@ -8,7 +8,7 @@
#if defined(Q_OS_IOS)
#include <QtCore/QTimer>
#endif
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -428,7 +428,7 @@ void AbstractDeclarative::handleWindowChanged(QQuickWindow *window)
if (!window)
return;
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
bool previousVisibility = window->isVisible();
// Enable touch events for Mac touchpads
window->setVisible(true);
@@ -565,7 +565,7 @@ void AbstractDeclarative::render()
QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- if (isVisible()) {
+ if (funcs && isVisible()) {
funcs->glDepthMask(GL_TRUE);
funcs->glEnable(GL_DEPTH_TEST);
funcs->glDepthFunc(GL_LESS);
@@ -647,8 +647,8 @@ void AbstractDeclarative::checkWindowList(QQuickWindow *window)
}
QList<QQuickWindow *> windowList;
-
- foreach (AbstractDeclarative *graph, graphWindowList.keys()) {
+ const auto graphs = graphWindowList.keys();
+ for (AbstractDeclarative *graph : graphs) {
if (graph->m_renderMode == RenderDirectToBackground
|| graph->m_renderMode == RenderDirectToBackground_NoClear) {
windowList.append(graphWindowList.value(graph));