QAbstract3DSeries: don't fully qualify enum in member functions

The enum from the same class can be used in member functions without
fully qualifying the type with the class name. This makes a difference
for string-based signal/slot connections, where the declaration without
the full scope makes connections also work if the full scope is not
provided in the SIGNAL and SLOT macros.

Addresses header review comment and amends
52a361988d.

As a drive-by, fix the capitalization of the setter parameter, and the
documentation of the property.

Pick-to: 6.10
Change-Id: I1d9ca21dc8fd173852ca89ec3060dbb1da50c046
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
This commit is contained in:
Volker Hilsheimer 2025-08-19 13:27:58 +02:00
parent e2def3779a
commit 8f9c14c383
2 changed files with 11 additions and 10 deletions

View File

@ -232,7 +232,7 @@ QT_BEGIN_NAMESPACE
* \qmlproperty Abstract3DSeries.LightingMode Abstract3DSeries::lightingMode
* \since 6.10
*
* Sets the lightingMode of the items in the series.
* Sets the lighting mode of the items in the series.
* The default value is \l{QAbstract3DSeries::LightingMode::Shaded}
*
* \sa QAbstract3DSeries::LightingMode
@ -778,16 +778,16 @@ QLinearGradient QAbstract3DSeries::multiHighlightGradient() const
/*!
* \property QAbstract3DSeries::lightingMode
*
* \brief The LightingMode of the series
* \brief The lighting mode of the series
* \since 6.10
*
* \sa LightingMode
*/
void QAbstract3DSeries::setLightingMode(QAbstract3DSeries::LightingMode LightingMode)
void QAbstract3DSeries::setLightingMode(LightingMode lightingMode)
{
Q_D(QAbstract3DSeries);
if (d->m_lightingMode != LightingMode) {
d->setLightingMode(LightingMode);
emit lightingModeChanged(LightingMode);
if (d->m_lightingMode != lightingMode) {
d->setLightingMode(lightingMode);
emit lightingModeChanged(lightingMode);
}
}

View File

@ -47,7 +47,8 @@ class Q_GRAPHS_EXPORT QAbstract3DSeries : public QObject
Q_PROPERTY(QString itemLabel READ itemLabel NOTIFY itemLabelChanged)
Q_PROPERTY(bool itemLabelVisible READ isItemLabelVisible WRITE setItemLabelVisible NOTIFY
itemLabelVisibleChanged)
Q_PROPERTY(QAbstract3DSeries::LightingMode lightingMode READ lightingMode WRITE setLightingMode NOTIFY lightingModeChanged REVISION(6,10))
Q_PROPERTY(QAbstract3DSeries::LightingMode lightingMode READ lightingMode WRITE setLightingMode
NOTIFY lightingModeChanged REVISION(6,10))
QML_NAMED_ELEMENT(Abstract3DSeries)
QML_UNCREATABLE("Uncreatable base type")
public:
@ -123,8 +124,8 @@ public:
void setMultiHighlightGradient(const QLinearGradient &gradient);
QLinearGradient multiHighlightGradient() const;
QAbstract3DSeries::LightingMode lightingMode() const;
void setLightingMode(QAbstract3DSeries::LightingMode lightingMode);
LightingMode lightingMode() const;
void setLightingMode(LightingMode lightingMode);
void setName(const QString &name);
QString name() const;