6#include <QtCore/qcollator.h>
7#include <QtCore/qsize.h>
9#include <QtCore/private/qabstractitemmodel_p.h>
15class QRangeModelPrivate : QAbstractItemModelPrivate
17 Q_DECLARE_PUBLIC(QRangeModel)
20 explicit QRangeModelPrivate(std::unique_ptr<QRangeModelImplBase, QRangeModelImplBase::Deleter> impl)
21 : impl(std::move(impl))
23 this->impl->call<QRangeModelImplBase::InterfaceVersion>(m_interfaceVersion);
26 std::unique_ptr<QRangeModelImplBase, QRangeModelImplBase::Deleter> impl;
27 friend class QRangeModelImplBase;
29 static QRangeModelPrivate *get(QRangeModel *model) {
return model->d_func(); }
30 static const QRangeModelPrivate *get(
const QRangeModel *model) {
return model->d_func(); }
32 mutable QHash<
int, QByteArray> m_roleNames;
33 QRangeModel::AutoConnectPolicy m_autoConnectPolicy = QRangeModel::AutoConnectPolicy::None;
34 bool m_dataChangedDispatchBlocked =
false;
35 int m_interfaceVersion = -1;
36 int m_sortRole = Qt::DisplayRole;
37 std::optional<QCollator> m_sortCollator;
39 static void emitDataChanged(
const QModelIndex &index,
int role)
41 const auto *model =
static_cast<
const QRangeModel *>(index.model());
42 if (!get(model)->m_dataChangedDispatchBlocked)
43 const_cast<QRangeModel *>(model)->dataChanged(index, index, {role});
58 Q_ASSERT(
std::holds_alternative<Data>(storage));
80 QMetaObject::Connection connection;
83 QPersistentModelIndex index;
91 Q_ASSERT(
std::holds_alternative<Data>(storage));
92 const auto &data =
std::get<Data>(storage);
93 if (!data.index.isValid()) {
94 if (!QObject::disconnect(connection))
95 qWarning() <<
"Failed to break connection for" << Qt::ItemDataRole(data.role);
97 QRangeModelPrivate::emitDataChanged(data.index, data.role);
111 void operator()() { QRangeModelPrivate::emitDataChanged(index, role); }
118QRangeModel::QRangeModel(QRangeModelImplBase *impl, QObject *parent)
119 : QAbstractItemModel(*
new QRangeModelPrivate({impl, {}}), parent)
123QRangeModelImplBase *QRangeModelImplBase::getImplementation(QRangeModel *model)
125 return model->d_func()->impl.get();
128const QRangeModelImplBase *QRangeModelImplBase::getImplementation(
const QRangeModel *model)
130 return model->d_func()->impl.get();
133QScopedValueRollback<
bool> QRangeModelImplBase::blockDataChangedDispatch()
135 return QScopedValueRollback(m_rangeModel->d_func()->m_dataChangedDispatchBlocked,
true);
138int QRangeModelImplBase::sortRole()
const
140 return m_rangeModel->sortRole();
143const QCollator *QRangeModelImplBase::sortCollator()
const
145 const QRangeModelPrivate *d = QRangeModelPrivate::get(m_rangeModel);
146 return d->m_sortCollator ? &d->m_sortCollator.value() :
nullptr;
149QVariant QRangeModelImplBase::convertMatchValue(
const QVariant &value, Qt::MatchFlags flags)
151 QVariant matchValue = value;
152 const Qt::CaseSensitivity cs = flags & Qt::MatchCaseSensitive
153 ? Qt::CaseSensitive : Qt::CaseInsensitive;
154 switch ((flags & Qt::MatchTypeMask).toInt()) {
155#if QT_CONFIG(regularexpression)
156 case Qt::MatchRegularExpression:
157 case Qt::MatchWildcard:
158 if (value.metaType() != QMetaType::fromType<QRegularExpression>()) {
159 QRegularExpression rx;
160 if (flags & Qt::MatchWildcard) {
161 rx.setPattern(QRegularExpression::wildcardToRegularExpression(
162 value.toString(), QRegularExpression::NonPathWildcardConversion));
164 rx.setPattern(value.toString());
166 if (cs == Qt::CaseInsensitive)
167 rx.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
172 case Qt::MatchStartsWith:
173 case Qt::MatchEndsWith:
174 case Qt::MatchFixedString:
175 case Qt::MatchContains:
176 matchValue.convert(QMetaType::fromType<QString>());
184bool QRangeModelImplBase::matchValue(
const QString &itemData,
const QVariant &value,
185 Qt::MatchFlags flags)
188 const uint matchType = (flags & Qt::MatchTypeMask).toInt();
189 const Qt::CaseSensitivity cs = flags & Qt::MatchCaseSensitive
190 ? Qt::CaseSensitive : Qt::CaseInsensitive;
192#if QT_CONFIG(regularexpression)
193 case Qt::MatchRegularExpression:
194 case Qt::MatchWildcard:
195 return itemData.contains(value.toRegularExpression());
197 case Qt::MatchStartsWith:
198 return itemData.startsWith(value.toString(), cs);
199 case Qt::MatchEndsWith:
200 return itemData.endsWith(value.toString(), cs);
201 case Qt::MatchFixedString:
202 return itemData.compare(value.toString(), cs) == 0;
203 case Qt::MatchContains:
204 return itemData.contains(value.toString(), cs);
211
212
213
214
215QHash<
int, QMetaProperty> QRangeModelImplBase::roleProperties(
const QAbstractItemModel &model,
216 const QMetaObject &metaObject)
218 const auto roles = model.roleNames();
219 QHash<
int, QMetaProperty> result;
220 for (
auto &&[role, roleName] : roles.asKeyValueRange()) {
221 if (role == Qt::RangeModelDataRole)
223 result[role] = metaObject.property(metaObject.indexOfProperty(roleName));
228QHash<
int, QMetaProperty> QRangeModelImplBase::columnProperties(
const QMetaObject &metaObject)
230 QHash<
int, QMetaProperty> result;
231 const int propertyOffset = metaObject.propertyOffset();
232 for (
int p = propertyOffset; p < metaObject.propertyCount(); ++p)
233 result[p - propertyOffset] = metaObject.property(p);
237QRangeModelDetails::AutoConnectContext::~AutoConnectContext() =
default;
239template <
auto Handler>
241 QRangeModelDetails::AutoConnectContext *context,
242 const QHash<
int, QMetaProperty> &properties)
247 auto connect = [item, context](
const QModelIndex &cell,
int role,
const QMetaProperty &property) {
248 if (property.hasNotifySignal()) {
249 if (!Handler(cell, item, context, role, property))
252 qWarning() <<
"Property" << property.name() <<
"for" << Qt::ItemDataRole(role)
253 <<
"at" << cell <<
"has no notify signal";
258 if (context->mapping == QRangeModelDetails::AutoConnectContext::AutoConnectMapping::Roles) {
259 for (
auto &&[role, property] : properties.asKeyValueRange())
260 connect(index, role, property);
262 for (
auto &&[column, property] : properties.asKeyValueRange())
263 connect(index.siblingAtColumn(column), Qt::DisplayRole, property);
268bool QRangeModelImplBase::connectProperty(
const QModelIndex &index,
const QObject *item,
269 QRangeModelDetails::AutoConnectContext *context,
270 int role,
const QMetaProperty &property)
274 PropertyChangedHandler handler{index, role};
275 auto connection = property.enclosingMetaObject()->connect(item, property.notifySignal(),
276 context, std::move(handler));
278 qWarning() <<
"Failed to connect to" << item << property.name();
286 handler = std::move(connection);
291bool QRangeModelImplBase::connectProperties(
const QModelIndex &index,
const QObject *item,
292 QRangeModelDetails::AutoConnectContext *context,
293 const QHash<
int, QMetaProperty> &properties)
295 return connectPropertiesHelper<QRangeModelImplBase::connectProperty>(index, item, context, properties);
298bool QRangeModelImplBase::connectPropertyConst(
const QModelIndex &index,
const QObject *item,
299 QRangeModelDetails::AutoConnectContext *context,
300 int role,
const QMetaProperty &property)
304 ConstPropertyChangedHandler handler{index, role};
305 if (!property.enclosingMetaObject()->connect(item, property.notifySignal(),
306 context, std::move(handler))) {
307 qWarning() <<
"Failed to connect to" << item << property.name();
314bool QRangeModelImplBase::connectPropertiesConst(
const QModelIndex &index,
const QObject *item,
315 QRangeModelDetails::AutoConnectContext *context,
316 const QHash<
int, QMetaProperty> &properties)
318 return connectPropertiesHelper<QRangeModelImplBase::connectPropertyConst>(index, item, context, properties);
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
943
944
945
946
947
948QRangeModel::~QRangeModel() =
default;
951
952
953
954
955
956
957
958
959
960QModelIndex QRangeModel::index(
int row,
int column,
const QModelIndex &parent)
const
962 Q_D(
const QRangeModel);
963 return d->impl->call<QRangeModelImplBase::Index>(row, column, parent);
967
968
969
970
971
972
973
974
975
976
977
978QModelIndex QRangeModel::parent(
const QModelIndex &child)
const
980 Q_D(
const QRangeModel);
981 return d->impl->call<QRangeModelImplBase::Parent>(child);
985
986
987
988
989
990
991
992
993
994
995QModelIndex QRangeModel::sibling(
int row,
int column,
const QModelIndex &index)
const
997 Q_D(
const QRangeModel);
998 return d->impl->call<QRangeModelImplBase::Sibling>(row, column, index);
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014int QRangeModel::rowCount(
const QModelIndex &parent)
const
1016 Q_D(
const QRangeModel);
1017 return d->impl->call<QRangeModelImplBase::RowCount>(parent);
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033int QRangeModel::columnCount(
const QModelIndex &parent)
const
1035 Q_D(
const QRangeModel);
1036 return d->impl->call<QRangeModelImplBase::ColumnCount>(parent);
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054Qt::ItemFlags QRangeModel::flags(
const QModelIndex &index)
const
1056 Q_D(
const QRangeModel);
1057 return d->impl->call<QRangeModelImplBase::Flags>(index);
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081QVariant QRangeModel::headerData(
int section, Qt::Orientation orientation,
int role)
const
1083 Q_D(
const QRangeModel);
1084 return d->impl->call<QRangeModelImplBase::HeaderData>(section, orientation, role);
1088
1089
1090bool QRangeModel::setHeaderData(
int section, Qt::Orientation orientation,
const QVariant &data,
1093 return QAbstractItemModel::setHeaderData(section, orientation, data, role);
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117QVariant QRangeModel::data(
const QModelIndex &index,
int role)
const
1119 Q_D(
const QRangeModel);
1120 return d->impl->call<QRangeModelImplBase::Data>(index, role);
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149bool QRangeModel::setData(
const QModelIndex &index,
const QVariant &data,
int role)
1152 return d->impl->call<QRangeModelImplBase::SetData>(index, data, role);
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173QMap<
int, QVariant> QRangeModel::itemData(
const QModelIndex &index)
const
1175 Q_D(
const QRangeModel);
1176 return d->impl->call<QRangeModelImplBase::ItemData>(index);
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205bool QRangeModel::setItemData(
const QModelIndex &index,
const QMap<
int, QVariant> &data)
1208 return d->impl->call<QRangeModelImplBase::SetItemData>(index, data);
1212
1213
1214
1215
1216
1217
1218
1219bool QRangeModel::clearItemData(
const QModelIndex &index)
1222 return d->impl->call<QRangeModelImplBase::ClearItemData>(index);
1226
1227
1228
1229
1230
1231
1232
1233
1234
1237
1238
1239
1240
1241
1242
1243
1244
1245bool QRangeModel::insertColumns(
int column,
int count,
const QModelIndex &parent)
1248 return d->impl->call<QRangeModelImplBase::InsertColumns>(column, count, parent);
1252
1253
1254
1255
1256
1257
1258
1259
1260bool QRangeModel::removeColumns(
int column,
int count,
const QModelIndex &parent)
1263 return d->impl->call<QRangeModelImplBase::RemoveColumns>(column, count, parent);
1267
1268
1269
1270
1271
1272
1273
1274
1275bool QRangeModel::moveColumns(
const QModelIndex &sourceParent,
int sourceColumn,
int count,
1276 const QModelIndex &destinationParent,
int destinationColumn)
1279 return d->impl->call<QRangeModelImplBase::MoveColumns>(
1280 sourceParent, sourceColumn, count,
1281 destinationParent, destinationColumn);
1285
1286
1287
1288
1289
1290
1291
1292
1293
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306bool QRangeModel::insertRows(
int row,
int count,
const QModelIndex &parent)
1309 return d->impl->call<QRangeModelImplBase::InsertRows>(row, count, parent);
1313
1314
1315
1316
1317
1318
1319
1320bool QRangeModel::removeRows(
int row,
int count,
const QModelIndex &parent)
1323 return d->impl->call<QRangeModelImplBase::RemoveRows>(row, count, parent);
1327
1328
1329
1330
1331
1332
1333
1334
1335bool QRangeModel::moveRows(
const QModelIndex &sourceParent,
int sourceRow,
int count,
1336 const QModelIndex &destinationParent,
int destinationRow)
1339 return d->impl->call<QRangeModelImplBase::MoveRows>(
1340 sourceParent, sourceRow, count,
1341 destinationParent, destinationRow);
1345
1346
1347bool QRangeModel::canFetchMore(
const QModelIndex &parent)
const
1349 return QAbstractItemModel::canFetchMore(parent);
1353
1354
1355void QRangeModel::fetchMore(
const QModelIndex &parent)
1357 QAbstractItemModel::fetchMore(parent);
1361
1362
1363bool QRangeModel::hasChildren(
const QModelIndex &parent)
const
1365 return QAbstractItemModel::hasChildren(parent);
1369
1370
1371QModelIndex QRangeModel::buddy(
const QModelIndex &index)
const
1373 return QAbstractItemModel::buddy(index);
1377
1378
1379bool QRangeModel::canDropMimeData(
const QMimeData *data, Qt::DropAction action,
1380 int row,
int column,
const QModelIndex &parent)
const
1382 return QAbstractItemModel::canDropMimeData(data, action, row, column, parent);
1386
1387
1388bool QRangeModel::dropMimeData(
const QMimeData *data, Qt::DropAction action,
1389 int row,
int column,
const QModelIndex &parent)
1391 return QAbstractItemModel::dropMimeData(data, action, row, column, parent);
1395
1396
1397QMimeData *QRangeModel::mimeData(
const QModelIndexList &indexes)
const
1399 return QAbstractItemModel::mimeData(indexes);
1403
1404
1405QStringList QRangeModel::mimeTypes()
const
1407 return QAbstractItemModel::mimeTypes();
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420QModelIndexList QRangeModel::match(
const QModelIndex &start,
int role,
const QVariant &value,
1421 int hits, Qt::MatchFlags flags)
const
1423 Q_D(
const QRangeModel);
1424 if (d->m_interfaceVersion < QT_VERSION_CHECK(6, 12, 0))
1425 return QAbstractItemModel::match(start, role, value, hits, flags);
1426 return d->impl->call<QRangeModelImplBase::Match>(start, role, value, hits, flags);
1430
1431
1432void QRangeModel::multiData(
const QModelIndex &index, QModelRoleDataSpan roleDataSpan)
const
1434 Q_D(
const QRangeModel);
1435 if (d->m_interfaceVersion < QT_VERSION_CHECK(6, 11, 0))
1436 return QAbstractItemModel::multiData(index, roleDataSpan);
1437 d->impl->call<QRangeModelImplBase::MultiData>(index, roleDataSpan);
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1458QHash<
int, QByteArray> QRangeModelImplBase::roleNamesForMetaObject(
const QAbstractItemModel &model,
1459 const QMetaObject &metaObject)
1461 const auto defaults = model.QAbstractItemModel::roleNames();
1462 QHash<
int, QByteArray> result = {{Qt::RangeModelDataRole,
"modelData"}};
1463 int offset = metaObject.propertyOffset();
1464 for (
int i = offset; i < metaObject.propertyCount(); ++i) {
1465 const auto name = metaObject.property(i).name();
1466 const int defaultRole = defaults.key(name, -1);
1467 if (defaultRole != -1) {
1469 result[defaultRole] = name;
1471 result[Qt::UserRole + i - offset] = name;
1477QHash<
int, QByteArray> QRangeModelImplBase::roleNamesForSimpleType()
1480 return QHash<
int, QByteArray>{
1481 {Qt::DisplayRole,
"display"},
1482 {Qt::EditRole,
"edit"},
1483 {Qt::RangeModelDataRole,
"modelData"},
1488
1489
1490
1491
1492
1493QHash<
int, QByteArray> QRangeModel::roleNames()
const
1495 Q_D(
const QRangeModel);
1496 if (d->m_roleNames.isEmpty())
1497 d->m_roleNames = d->impl->call<QRangeModelImplBase::RoleNames>();
1499 return d->m_roleNames;
1502void QRangeModel::setRoleNames(
const QHash<
int, QByteArray> &names)
1505 if (d->m_roleNames == names)
1508 d->impl->call<QRangeModelImplBase::InvalidateCaches>();
1509 if (d->m_autoConnectPolicy != AutoConnectPolicy::None)
1510 d->impl->call<QRangeModelImplBase::SetAutoConnectPolicy>();
1512 d->m_roleNames = names;
1514 Q_EMIT roleNamesChanged();
1517void QRangeModel::resetRoleNames()
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1575QRangeModel::AutoConnectPolicy QRangeModel::autoConnectPolicy()
const
1577 Q_D(
const QRangeModel);
1578 return d->m_autoConnectPolicy;
1581void QRangeModel::setAutoConnectPolicy(QRangeModel::AutoConnectPolicy policy)
1584 if (d->m_autoConnectPolicy == policy)
1587 d->m_autoConnectPolicy = policy;
1588 d->impl->call<QRangeModelImplBase::SetAutoConnectPolicy>();
1589 Q_EMIT autoConnectPolicyChanged(policy);
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609void QRangeModel::sort(
int column, Qt::SortOrder order)
1612 if (d->m_interfaceVersion < QT_VERSION_CHECK(6, 12, 0))
1613 return QAbstractItemModel::sort(column, order);
1615 d->impl->call<QRangeModelImplBase::Sort>(column, order);
1616 } QT_CATCH(
const std::bad_alloc &) {
1617 qCritical(
"QRangeModel::sort ran out of memory, sort likely incomplete.");
1622
1623
1624
1625
1626
1627
1628
1629
1630int QRangeModel::sortRole()
const
1632 Q_D(
const QRangeModel);
1633 return d->m_sortRole;
1636void QRangeModel::setSortRole(
int role)
1639 if (d->m_sortRole == role)
1641 d->m_sortRole = role;
1642 Q_EMIT sortRoleChanged(d->m_sortRole);
1645void QRangeModel::resetSortRole()
1647 setSortRole(Qt::DisplayRole);
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661QCollator QRangeModel::sortCollator()
const
1663 Q_D(
const QRangeModel);
1664 return d->m_sortCollator.value_or(QCollator(QLocale::C));
1667void QRangeModel::setSortCollator(
const QCollator &collator)
1670 if (sortCollator() == collator)
1672 d->m_sortCollator = collator;
1673 Q_EMIT sortCollatorChanged(*d->m_sortCollator);
1676void QRangeModel::resetSortCollator()
1679 if (!d->m_sortCollator)
1681 d->m_sortCollator = std::nullopt;
1682 Q_EMIT sortCollatorChanged(sortCollator());
1686
1687
1688QSize QRangeModel::span(
const QModelIndex &index)
const
1690 return QAbstractItemModel::span(index);
1694
1695
1696Qt::DropActions QRangeModel::supportedDragActions()
const
1698 return QAbstractItemModel::supportedDragActions();
1702
1703
1704Qt::DropActions QRangeModel::supportedDropActions()
const
1706 return QAbstractItemModel::supportedDropActions();
1710
1711
1712void QRangeModel::resetInternalData()
1714 QAbstractItemModel::resetInternalData();
1718
1719
1720bool QRangeModel::event(QEvent *event)
1722 return QAbstractItemModel::event(event);
1726
1727
1728bool QRangeModel::eventFilter(QObject *object, QEvent *event)
1730 return QAbstractItemModel::eventFilter(object, event);
1735#include "moc_qrangemodel.cpp"
static bool connectPropertiesHelper(const QModelIndex &index, const QObject *item, QRangeModelDetails::AutoConnectContext *context, const QHash< int, QMetaProperty > &properties)
~ConstPropertyChangedHandler()=default
ConstPropertyChangedHandler(ConstPropertyChangedHandler &&other) noexcept=default
ConstPropertyChangedHandler(const QModelIndex &index, int role)
PropertyChangedHandler & operator=(PropertyChangedHandler &&)=delete
PropertyChangedHandler(PropertyChangedHandler &&other) noexcept
PropertyChangedHandler(const PropertyChangedHandler &)=delete
PropertyChangedHandler & operator=(const PropertyChangedHandler &)=delete
~PropertyChangedHandler()=default
PropertyChangedHandler(const QPersistentModelIndex &index, int role)
PropertyChangedHandler & operator=(QMetaObject::Connection &&connection)