@@ -207,22 +207,22 @@ void TestQgsCadUtils::testCommonAngle()
207
207
// without common angle
208
208
QgsCadUtils::AlignMapPointOutput res0 = QgsCadUtils::alignMapPoint ( QgsPointXY ( 40 , 20.1 ), context );
209
209
QVERIFY ( res0.valid );
210
- QCOMPARE ( res0.softLockCommonAngle , -1 );
210
+ QCOMPARE ( res0.softLockCommonAngle , -1.0 );
211
211
QCOMPARE ( res0.finalMapPoint , QgsPointXY ( 40 , 20.1 ) );
212
212
213
213
// common angle
214
214
context.commonAngleConstraint = QgsCadUtils::AlignMapPointConstraint ( true , false , 90 );
215
215
QgsCadUtils::AlignMapPointOutput res1 = QgsCadUtils::alignMapPoint ( QgsPointXY ( 40 , 20.1 ), context );
216
216
QVERIFY ( res1.valid );
217
- QCOMPARE ( res1.softLockCommonAngle , 0 );
217
+ QCOMPARE ( res1.softLockCommonAngle , 0.0 );
218
218
QCOMPARE ( res1.finalMapPoint , QgsPointXY ( 40 , 20 ) );
219
219
220
220
// common angle + angle (make sure that angle constraint has priority)
221
221
context.commonAngleConstraint = QgsCadUtils::AlignMapPointConstraint ( true , false , 90 );
222
222
context.angleConstraint = QgsCadUtils::AlignMapPointConstraint ( true , false , 45 );
223
223
QgsCadUtils::AlignMapPointOutput res2 = QgsCadUtils::alignMapPoint ( QgsPointXY ( 40 , 20.1 ), context );
224
224
QVERIFY ( res2.valid );
225
- QCOMPARE ( res2.softLockCommonAngle , -1 );
225
+ QCOMPARE ( res2.softLockCommonAngle , -1.0 );
226
226
QCOMPARE ( res2.finalMapPoint , QgsPointXY ( 35.05 , 25.05 ) );
227
227
228
228
// common angle rel
@@ -231,7 +231,7 @@ void TestQgsCadUtils::testCommonAngle()
231
231
context.cadPointList [1 ] = QgsPointXY ( 40 , 20 );
232
232
QgsCadUtils::AlignMapPointOutput res3 = QgsCadUtils::alignMapPoint ( QgsPointXY ( 50.1 , 29.9 ), context );
233
233
QVERIFY ( res3.valid );
234
- QCOMPARE ( res3.softLockCommonAngle , 90 );
234
+ QCOMPARE ( res3.softLockCommonAngle , 90.0 );
235
235
QCOMPARE ( res3.finalMapPoint , QgsPointXY ( 50 , 30 ) );
236
236
}
237
237
@@ -242,7 +242,7 @@ void TestQgsCadUtils::testDistance()
242
242
// without distance constraint
243
243
QgsCadUtils::AlignMapPointOutput res0 = QgsCadUtils::alignMapPoint ( QgsPointXY ( 45 , 20 ), context );
244
244
QVERIFY ( res0.valid );
245
- QCOMPARE ( res0.softLockCommonAngle , -1 );
245
+ QCOMPARE ( res0.softLockCommonAngle , -1.0 );
246
246
QCOMPARE ( res0.finalMapPoint , QgsPointXY ( 45 , 20 ) );
247
247
248
248
// dist
0 commit comments