@@ -322,7 +322,9 @@ void TestQgsComposerTable::attributeTableSetAliasOnSubset()
322322 aliases.insert ( 1 , QString ( " 1Heading" ) );
323323 aliases.insert ( 3 , QString ( " 2Pilots" ) );
324324 aliases.insert ( 4 , QString ( " 3Cabin Crew" ) );
325+ Q_NOWARN_DEPRECATED_PUSH
325326 mComposerAttributeTable ->setFieldAliasMap ( aliases );
327+ Q_NOWARN_DEPRECATED_POP
326328
327329 // get header labels and compare
328330 QMap<int , QString> headerMap = mComposerAttributeTable ->headerLabels ();
@@ -338,7 +340,9 @@ void TestQgsComposerTable::attributeTableSetAliasOnSubset()
338340 attributes.clear ();
339341 aliases.clear ();
340342 mComposerAttributeTable ->setDisplayAttributes ( attributes );
343+ Q_NOWARN_DEPRECATED_PUSH
341344 mComposerAttributeTable ->setFieldAliasMap ( aliases );
345+ Q_NOWARN_DEPRECATED_POP
342346}
343347
344348void TestQgsComposerTable::attributeTableGetAttributes ()
@@ -348,7 +352,9 @@ void TestQgsComposerTable::attributeTableGetAttributes()
348352 attributes << 0 << 3 << 4 ;
349353 mComposerAttributeTable ->setDisplayAttributes ( attributes );
350354
355+ Q_NOWARN_DEPRECATED_PUSH
351356 QSet<int > evaluated = mComposerAttributeTable ->displayAttributes ();
357+ Q_NOWARN_DEPRECATED_POP
352358
353359 QCOMPARE ( evaluated, attributes );
354360
@@ -363,7 +369,9 @@ void TestQgsComposerTable::attributeTableAlias()
363369
364370 fieldAliasMap.insert ( 0 , QString ( " alias 0" ) );
365371 fieldAliasMap.insert ( 3 , QString ( " alias 3" ) );
372+ Q_NOWARN_DEPRECATED_PUSH
366373 mComposerAttributeTable ->setFieldAliasMap ( fieldAliasMap );
374+ Q_NOWARN_DEPRECATED_POP
367375
368376 QStringList expectedHeaders;
369377 expectedHeaders << " alias 0" << " Heading" << " Importance" << " alias 3" << " Cabin Crew" << " Staff" ;
@@ -381,7 +389,9 @@ void TestQgsComposerTable::attributeTableAlias()
381389 }
382390
383391 fieldAliasMap.clear ();
392+ Q_NOWARN_DEPRECATED_PUSH
384393 mComposerAttributeTable ->setFieldAliasMap ( fieldAliasMap );
394+ Q_NOWARN_DEPRECATED_POP
385395}
386396
387397void TestQgsComposerTable::attributeTableGetAlias ()
@@ -395,15 +405,19 @@ void TestQgsComposerTable::attributeTableGetAlias()
395405
396406 fieldAliasMap.insert ( 1 , QString ( " alias 1" ) );
397407 fieldAliasMap.insert ( 2 , QString ( " alias 2" ) );
408+ Q_NOWARN_DEPRECATED_PUSH
398409 mComposerAttributeTable ->setFieldAliasMap ( fieldAliasMap );
410+ Q_NOWARN_DEPRECATED_POP
399411
400412 QMap<int , QString> expectedAliases;
401413 expectedAliases.insert ( 1 , QString ( " alias 1" ) );
402414 expectedAliases.insert ( 3 , QString ( " Pilots" ) );
403415 expectedAliases.insert ( 4 , QString ( " Cabin Crew" ) );
404416
405417 // get header labels and compare
418+ Q_NOWARN_DEPRECATED_PUSH
406419 QMap<int , QString> aliasMap = mComposerAttributeTable ->fieldAliasMap ();
420+ Q_NOWARN_DEPRECATED_POP
407421 QMap<int , QString>::const_iterator aliasIt = aliasMap.constBegin ();
408422 QString expected;
409423 QString evaluated;
@@ -415,7 +429,9 @@ void TestQgsComposerTable::attributeTableGetAlias()
415429 }
416430
417431 fieldAliasMap.clear ();
432+ Q_NOWARN_DEPRECATED_PUSH
418433 mComposerAttributeTable ->setFieldAliasMap ( fieldAliasMap );
434+ Q_NOWARN_DEPRECATED_POP
419435 attributes.clear ();
420436 mComposerAttributeTable ->setDisplayAttributes ( attributes );
421437}
@@ -427,7 +443,9 @@ void TestQgsComposerTable::attributeTableSort()
427443 sort.append ( qMakePair ( 0 , true ) );
428444 sort.append ( qMakePair ( 1 , false ) );
429445 sort.append ( qMakePair ( 3 , true ) );
446+ Q_NOWARN_DEPRECATED_PUSH
430447 mComposerAttributeTable ->setSortAttributes ( sort );
448+ Q_NOWARN_DEPRECATED_POP
431449 mComposerAttributeTable ->setMaximumNumberOfFeatures ( 5 );
432450
433451 QList<QStringList> expectedRows;
@@ -451,7 +469,9 @@ void TestQgsComposerTable::attributeTableSort()
451469 compareTable ( expectedRows );
452470
453471 sort.clear ();
472+ Q_NOWARN_DEPRECATED_PUSH
454473 mComposerAttributeTable ->setSortAttributes ( sort );
474+ Q_NOWARN_DEPRECATED_POP
455475}
456476
457477void TestQgsComposerTable::attributeTableVisibleOnly ()
0 commit comments