Skip to content

Commit e248940

Browse files
committed
variantObject to dataRole
1 parent 0730ed4 commit e248940

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

uitools/cpp/Esri/ArcGISRuntime/Toolkit/Internal/GenericListModel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace Esri::ArcGISRuntime::Toolkit {
5555
\li Value
5656
\li Type
5757
\row
58-
\li variantObject
58+
\li dataRole
5959
\li \c{Qt::UserRole}
6060
\li \c{Foo*}
6161
\row
@@ -72,7 +72,7 @@ namespace Esri::ArcGISRuntime::Toolkit {
7272
\li \c {bool}
7373
\endtable
7474
75-
A hard-coded \e{variantObject} role is always exposed as \c Qt::UserRole,
75+
A hard-coded \e{dataRole} role is always exposed as \c Qt::UserRole,
7676
followed by each property on \c Foo in order of declaration.
7777
7878
Both \c data and \c setData can be called respectively on these roles.
@@ -290,7 +290,7 @@ namespace Esri::ArcGISRuntime::Toolkit {
290290
\brief A collection of role names and the corresponding user role enum.
291291
292292
This will always return the hard-coded \e{(name, role)} combination
293-
\c{(variantObject, Qt::UserRole)}.
293+
\c{(dataRole, Qt::UserRole)}.
294294
295295
For each subsequent property it will also expose:
296296
\c{(property_N, Qt::UserRole + N + 1)} where \tt{property_N} is the N\sup{th}
@@ -304,7 +304,7 @@ namespace Esri::ArcGISRuntime::Toolkit {
304304
\li Name
305305
\li Value
306306
\row
307-
\li variantObject
307+
\li dataRole
308308
\li \c{Qt::UserRole}
309309
\row
310310
\li propertyA
@@ -326,7 +326,7 @@ namespace Esri::ArcGISRuntime::Toolkit {
326326
return {};
327327

328328
QHash<int, QByteArray> output;
329-
output.insert(Qt::UserRole, "variantObject");
329+
output.insert(Qt::UserRole, "dataRole");
330330

331331
const int offset = m_elementType->propertyOffset();
332332
for (int i = offset; i < m_elementType->propertyCount(); ++i)

uitools/import/Esri/ArcGISRuntime/Toolkit/BasemapGallery.qml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ Pane {
208208
id: basemapDelegate
209209
width: view.cellWidth
210210
height: view.cellHeight
211-
enabled: controller.basemapMatchesCurrentSpatialReference(variantObject.basemap)
212-
onClicked: controller.setCurrentBasemap(variantObject.basemap)
211+
enabled: controller.basemapMatchesCurrentSpatialReference(dataRole.basemap)
212+
onClicked: controller.setCurrentBasemap(dataRole.basemap)
213213
indicator: Item { }
214214
down: GridView.isCurrentItem
215215

@@ -229,13 +229,13 @@ Pane {
229229
}
230230
icon {
231231
cache: false
232-
source: variantObject.thumbnailUrl
232+
source: dataRole.thumbnailUrl
233233
width: basemapGallery.internal.defaultCellSize
234234
height: basemapGallery.internal.defaultCellSize
235235
color: "transparent"
236236
}
237237

238-
text: variantObject.name === "" ? "Unnamed basemap" : variantObject.name
238+
text: dataRole.name === "" ? "Unnamed basemap" : dataRole.name
239239
display: {
240240
if (basemapGallery.internal.calculatedStyle === BasemapGallery.ViewStyle.List) {
241241
return AbstractButton.TextBesideIcon;
@@ -250,23 +250,23 @@ Pane {
250250
Qt.openUrlExternally(link)
251251
}
252252
}
253-
ToolTip.text: variantObject.tooltip
253+
ToolTip.text: dataRole.tooltip
254254
MouseArea {
255255
id: mouseArea
256256
z : 2
257257
anchors.fill: parent
258258
hoverEnabled: true
259259
onClicked: {
260-
if (controller.currentBasemap !== variantObject.basemap)
260+
if (controller.currentBasemap !== dataRole.basemap)
261261
busyIndicator.running = true;
262-
controller.setCurrentBasemap(variantObject.basemap);
262+
controller.setCurrentBasemap(dataRole.basemap);
263263
}
264264

265265
// When mouse enters thumbnail area, use timer to delay showing of tooltip.
266266
onEntered: {
267267
// Create a definition for the showTooltipFn property of timerOnEntered
268268
timerOnEntered.showTooltipFn = () => {
269-
if (allowTooltips && mouseArea.containsMouse && variantObject.tooltip !== "")
269+
if (allowTooltips && mouseArea.containsMouse && dataRole.tooltip !== "")
270270
basemapDelegate.ToolTip.visible = true;
271271
}
272272
timerOnEntered.start();

uitools/import/Esri/ArcGISRuntime/Toolkit/BookmarksView.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Pane {
7979
text: name
8080
width: listView.width
8181
indicator: null
82-
onPressed: controller.zoomToBookmarkExtent(variantObject)
82+
onPressed: controller.zoomToBookmarkExtent(dataRole)
8383
}
8484
}
8585

uitools/import/Esri/ArcGISRuntime/Toolkit/ClientCertificateView.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Dialog {
9797
}
9898

9999
delegate: ItemDelegate {
100-
text: variantObject
100+
text: dataRole
101101
anchors {
102102
left: parent.left
103103
right: parent.right

uitools/import/Esri/ArcGISRuntime/Toolkit/CoordinateConversion.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,11 @@ Pane {
286286
MenuItem {
287287
text: "Copy to clipboard"
288288
// Copy not available in pure QML API
289-
enabled: typeof variantObject !== "undefined"
289+
enabled: typeof dataRole !== "undefined"
290290
visible: enabled
291291
height: enabled ? implicitHeight : 0
292292
onClicked: {
293-
variantObject.copyNotationToClipboard();
293+
dataRole.copyNotationToClipboard();
294294
}
295295
}
296296
}

0 commit comments

Comments
 (0)