diff options
author | Christoph Sterz <christoph.sterz@kdab.com> | 2015-12-18 13:18:46 +0100 |
---|---|---|
committer | Christoph Sterz <christoph.sterz@kdab.com> | 2017-03-15 08:01:32 +0000 |
commit | 8675bb6b5a4721aa4d94dcb3cb98dbed061c164f (patch) | |
tree | 01db4d0bb7f4e364183e258fac3c2336fa373feb /src/quick/scenegraph/util | |
parent | 5adfb4063a64aa3ae27269330c1fb8960dda4082 (diff) |
Doc: Removed non-working reimplementation suggestions
QSGSimpleMaterialShader::uniformMatrixName() and
QSGSimpleMaterialShader::uniformOpacityName() cannot be reimplemented
since they are non-virtual.
Removed the suggestion, so nobody is tempted to do so.
Added a Remark in the header to fix towards intended behavior in Qt6.
Change-Id: Id23c8d54728095f143f1d0e0520590303cff91a0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'src/quick/scenegraph/util')
-rw-r--r-- | src/quick/scenegraph/util/qsgsimplematerial.cpp | 12 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgsimplematerial.h | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/quick/scenegraph/util/qsgsimplematerial.cpp b/src/quick/scenegraph/util/qsgsimplematerial.cpp index 7214a255df..f29c58ad9e 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.cpp +++ b/src/quick/scenegraph/util/qsgsimplematerial.cpp @@ -194,19 +194,15 @@ /*! \fn const char *QSGSimpleMaterialShader::uniformMatrixName() const - Reimplement this function to give a different name to the uniform for - item transformation. The default value is \c qt_Matrix. - + Returns the name for the transform matrix uniform of this item. + The default value is \c qt_Matrix. */ /*! \fn const char *QSGSimpleMaterialShader::uniformOpacityName() const - Reimplement this function to give a different name to the uniform for - item opacity. The default value is \c qt_Opacity. - - If the shader program does not implement the item opacity, the - implemented function should return a null pointer. + Returns the name for the opacity uniform of this item. + The default value is \c qt_Opacity. */ /*! diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h index 8f42599832..80593c755b 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.h +++ b/src/quick/scenegraph/util/qsgsimplematerial.h @@ -71,6 +71,7 @@ public: resolveUniforms(); } + // ### Qt 6: make both virtual and fix docs const char *uniformMatrixName() const { return "qt_Matrix"; } const char *uniformOpacityName() const { return "qt_Opacity"; } |