diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-01-22 10:00:34 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-01-25 14:33:26 +0000 |
commit | e2ff9e3b9957f844d6530cc92096bed3c16fa46a (patch) | |
tree | 1abe90bac9e6d0d01c205ea4f55f6463b35109fc /src/opengl | |
parent | 0690c145db99da66dd3e2dc936848862661a161b (diff) |
CMake: Introduce Q_OBJECT qdoc macro
CMake's moc file scanning is rather primitive: It will run moc on any
file containing a line that starts with Q_OBJECT (and similar macros).
We have four files in QtBase that contain such a macro at the start
of the line in a qdoc comment. These four files were excluded from
automatic moc handling by cmake, which is not ideal, since this will
silently fail when somebody actually adds a Q_OBJECT macro in code.
This patch introduces a macro Q_OBJECT for qdoc. This macro will be
replaced with Q_OBJECT in the generated documentation. While not nice,
at least a failure to use \Q_OBJECT is noticeable: Moc will warn about
the file.
Change-Id: I829893c1166eee306fe30058d4ea0256affd45ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/opengl/qglfunctions.cpp | 2 | ||||
-rw-r--r-- | src/opengl/qgraphicsshadereffect.cpp | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index 14750f3a3f..f67fea4d16 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -31,12 +31,6 @@ add_qt_module(OpenGL Qt::GuiPrivate Qt::WidgetsPrivate ) -set_source_files_properties(qglfunctions.cpp qgraphicsshadereffect.cpp PROPERTIES - SKIP_AUTOMOC ON - SKIP_AUTOUIC ON - SKIP_AUTORCC ON -) - ## Scopes: ##################################################################### diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp index 07e1194342..aa1854dd3d 100644 --- a/src/opengl/qglfunctions.cpp +++ b/src/opengl/qglfunctions.cpp @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE \code class MyGLWidget : public QGLWidget, protected QGLFunctions { - Q_OBJECT + \Q_OBJECT public: MyGLWidget(QWidget *parent = 0) : QGLWidget(parent) {} diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp index cf3d307d71..4959c804b8 100644 --- a/src/opengl/qgraphicsshadereffect.cpp +++ b/src/opengl/qgraphicsshadereffect.cpp @@ -87,7 +87,7 @@ QT_BEGIN_NAMESPACE \code class ColorizeEffect : public QGraphicsShaderEffect { - Q_OBJECT + \Q_OBJECT public: ColorizeEffect(QObject *parent = 0) : QGraphicsShaderEffect(parent), color(Qt::black) |