diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/opengl/qopenglwindow/background_renderer.cpp | 2 | ||||
-rw-r--r-- | examples/opengl/qopenglwindow/background_renderer.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/opengl/qopenglwindow/background_renderer.cpp b/examples/opengl/qopenglwindow/background_renderer.cpp index cba4ae1f2f..9da1b9bf99 100644 --- a/examples/opengl/qopenglwindow/background_renderer.cpp +++ b/examples/opengl/qopenglwindow/background_renderer.cpp @@ -84,7 +84,7 @@ FragmentToy::FragmentToy(const QString &fragmentSource, QObject *parent) QFileInfo info(fragmentSource); m_fragment_file_last_modified = info.lastModified(); m_fragment_file = fragmentSource; -#ifndef QT_NO_FILESYSTEMWATCHER +#if QT_CONFIG(filesystemwatcher) m_watcher.addPath(info.canonicalPath()); QObject::connect(&m_watcher, &QFileSystemWatcher::directoryChanged, this, &FragmentToy::fileChanged); #endif diff --git a/examples/opengl/qopenglwindow/background_renderer.h b/examples/opengl/qopenglwindow/background_renderer.h index f7683db3d6..d99b7ddbeb 100644 --- a/examples/opengl/qopenglwindow/background_renderer.h +++ b/examples/opengl/qopenglwindow/background_renderer.h @@ -54,7 +54,9 @@ #include <QObject> #include <QFile> #include <QDateTime> +#if QT_CONFIG(filesystemwatcher) #include <QFileSystemWatcher> +#endif #include <QOpenGLVertexArrayObject> #include <QOpenGLBuffer> #include <QOpenGLShaderProgram> @@ -71,7 +73,7 @@ public: private: void fileChanged(const QString &path); bool m_recompile_shaders; -#ifndef QT_NO_FILESYSTEMWATCHER +#if QT_CONFIG(filesystemwatcher) QFileSystemWatcher m_watcher; #endif QString m_fragment_file; |