Graphs: remove scaleRole constructor from QItemModelScatterDataProxy

Based on API review: Removed the constructor overload that
accepted a scaleRole parameter in QItemModelScatterDataProxy.

Pick-to: 6.10
Task-number: QTBUG-137478
Change-Id: Iae85f6321e53189f68da5b15d586c9b52fadfd25
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This commit is contained in:
Kwanghyo Park 2025-07-07 16:33:22 +03:00
parent f1ae92e76c
commit 74ef58cc32
3 changed files with 1 additions and 46 deletions

View File

@ -395,33 +395,6 @@ QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemM
d->connectItemModelHandler();
}
/*!
* Constructs QItemModelScatterDataProxy with \a itemModel and an optional \a
* parent. The proxy doesn't take ownership of the \a itemModel, as item models
* are typically owned by other controls. The xPosRole property is set to \a
* xPosRole, the yPosRole property to \a yPosRole, the zPosRole property to \a
* zPosRole, the rotation property to \a rotationRole, and the scale role
* property to \a scaleRole.
*/
QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
const QString &xPosRole,
const QString &yPosRole,
const QString &zPosRole,
const QString &rotationRole,
const QString &scaleRole,
QObject *parent)
: QScatterDataProxy(*(new QItemModelScatterDataProxyPrivate(this)), parent)
{
Q_D(QItemModelScatterDataProxy);
d->m_itemModelHandler->setItemModel(itemModel);
d->m_xPosRole = xPosRole;
d->m_yPosRole = yPosRole;
d->m_zPosRole = zPosRole;
d->m_rotationRole = rotationRole;
d->m_scaleRole = scaleRole;
d->connectItemModelHandler();
}
/*!
* Destroys QItemModelScatterDataProxy.
*/

View File

@ -62,13 +62,7 @@ public:
const QString &zPosRole,
const QString &rotationRole,
QObject *parent = nullptr);
explicit QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
const QString &xPosRole,
const QString &yPosRole,
const QString &zPosRole,
const QString &rotationRole,
const QString &scaleRole,
QObject *parent = nullptr);
~QItemModelScatterDataProxy() override;
void setItemModel(QAbstractItemModel *itemModel);

View File

@ -78,18 +78,6 @@ void tst_proxy::construct()
QCOMPARE(proxy->scaleRole(), QString(""));
delete proxy;
delete series;
proxy = new QItemModelScatterDataProxy(table->model(), "x", "y", "z", "rot", "scale");
series = new QScatter3DSeries(proxy);
QVERIFY(proxy);
QVERIFY(series);
QCOMPARE(proxy->xPosRole(), QString("x"));
QCOMPARE(proxy->yPosRole(), QString("y"));
QCOMPARE(proxy->zPosRole(), QString("z"));
QCOMPARE(proxy->rotationRole(), QString("rot"));
QCOMPARE(proxy->scaleRole(), QString("scale"));
delete proxy;
delete series;
}
void tst_proxy::initialProperties()