@@ -87,11 +87,11 @@ class TestQgsSpatialIndexKdBush : public QObject
87
87
QgsSpatialIndexKDBush index ( *vl->dataProvider () );
88
88
QVERIFY ( index.size () == 4 );
89
89
90
- QList<QgsSpatialIndexKDBushData> fids = index.intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
90
+ QList<QgsSpatialIndexKDBushData> fids = index.intersects ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
91
91
QVERIFY ( fids.count () == 1 );
92
92
QVERIFY ( testContains ( fids, 1 , QgsPointXY ( 1 , 1 ) ) );
93
93
94
- QList<QgsSpatialIndexKDBushData> fids2 = index.intersect ( QgsRectangle ( -10 , -10 , 0 , 10 ) );
94
+ QList<QgsSpatialIndexKDBushData> fids2 = index.intersects ( QgsRectangle ( -10 , -10 , 0 , 10 ) );
95
95
QCOMPARE ( fids2.count (), 2 );
96
96
QVERIFY ( testContains ( fids2, 2 , QgsPointXY ( -1 , 1 ) ) );
97
97
QVERIFY ( testContains ( fids2, 3 , QgsPointXY ( -1 , -1 ) ) );
@@ -128,7 +128,7 @@ class TestQgsSpatialIndexKdBush : public QObject
128
128
QVERIFY ( index->d ->ref == 2 );
129
129
130
130
// test that copied index works
131
- QList<QgsSpatialIndexKDBushData> fids = indexCopy->intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
131
+ QList<QgsSpatialIndexKDBushData> fids = indexCopy->intersects ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
132
132
QVERIFY ( fids.count () == 1 );
133
133
QVERIFY ( testContains ( fids, 1 , QgsPointXY ( 1 , 1 ) ) );
134
134
@@ -139,7 +139,7 @@ class TestQgsSpatialIndexKdBush : public QObject
139
139
index.reset ();
140
140
141
141
// test that copied index still works
142
- fids = indexCopy->intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
142
+ fids = indexCopy->intersects ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
143
143
QVERIFY ( fids.count () == 1 );
144
144
QVERIFY ( testContains ( fids, 1 , QgsPointXY ( 1 , 1 ) ) );
145
145
QVERIFY ( indexCopy->d ->ref == 1 );
@@ -148,14 +148,14 @@ class TestQgsSpatialIndexKdBush : public QObject
148
148
std::unique_ptr< QgsVectorLayer > vl2 = qgis::make_unique< QgsVectorLayer >( " Point" , QString (), QStringLiteral ( " memory" ) );
149
149
QgsSpatialIndexKDBush index3 ( *vl2->dataProvider () );
150
150
QVERIFY ( index3.size () == 0 );
151
- fids = index3.intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
151
+ fids = index3.intersects ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
152
152
QVERIFY ( fids.count () == 0 );
153
153
QVERIFY ( index3.d ->ref == 1 );
154
154
155
155
index3 = *indexCopy;
156
156
QVERIFY ( index3.d == indexCopy->d );
157
157
QVERIFY ( index3.d ->ref == 2 );
158
- fids = index3.intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
158
+ fids = index3.intersects ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
159
159
QVERIFY ( fids.count () == 1 );
160
160
QVERIFY ( testContains ( fids, 1 , QgsPointXY ( 1 , 1 ) ) );
161
161
0 commit comments