Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix unicode string test error
  • Loading branch information
longhuan2018 authored and nyalldawson committed Apr 14, 2020
1 parent 314353c commit a399acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/src/app/testqgsappbrowserproviders.cpp
Expand Up @@ -123,7 +123,7 @@ void TestQgsAppBrowserProviders::testProjectItemCreation()
QCOMPARE( child->children().at( 5 )->name(), QStringLiteral( "testlayer" ) );

QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 6 ) ) );
QCOMPARE( child->children().at( 6 )->name(), QStringLiteral( "testlayer \u00E8\u00E9" ) );
QCOMPARE( child->children().at( 6 )->name(), QString::fromStdString( "testlayer \u00E8\u00E9" ) );

delete dirItem;
return;
Expand Down
4 changes: 2 additions & 2 deletions tests/src/gui/testqgsprocessingmodel.cpp
Expand Up @@ -235,7 +235,7 @@ void TestQgsProcessingModel::testModel()
QModelIndex alg1Index = model.index( 0, 0, group1Index );
QVERIFY( !model.providerForIndex( alg1Index ) );
QCOMPARE( model.data( alg1Index, Qt::DisplayRole ).toString(), QStringLiteral( "a1" ) );
QCOMPARE( model.data( alg1Index, Qt::ToolTipRole ).toString(), QStringLiteral( "<p><b>a1</b></p><p>short desc a</p><p>Algorithm ID: \u2018<i>p3:a1</i>\u2019</p>" ) );
QCOMPARE( model.data( alg1Index, Qt::ToolTipRole ).toString(), QString::fromStdString( "<p><b>a1</b></p><p>short desc a</p><p>Algorithm ID: \u2018<i>p3:a1</i>\u2019</p>" ) );
QCOMPARE( model.data( alg1Index, QgsProcessingToolboxModel::RoleAlgorithmFlags ).toInt(), static_cast< int >( QgsProcessingAlgorithm::FlagHideFromModeler ) );
QCOMPARE( model.data( alg1Index, QgsProcessingToolboxModel::RoleAlgorithmId ).toString(), QStringLiteral( "p3:a1" ) );
QCOMPARE( model.data( alg1Index, QgsProcessingToolboxModel::RoleAlgorithmName ).toString(), QStringLiteral( "a1" ) );
Expand All @@ -249,7 +249,7 @@ void TestQgsProcessingModel::testModel()
QVERIFY( model.hasChildren( group2Index ) );
QModelIndex alg2Index = model.index( 0, 0, group2Index );
QCOMPARE( model.data( alg2Index, Qt::DisplayRole ).toString(), QStringLiteral( "a2" ) );
QCOMPARE( model.data( alg2Index, Qt::ToolTipRole ).toString(), QStringLiteral( "<p><b>a2</b></p><p>Algorithm ID: \u2018<i>p3:a2</i>\u2019</p>" ) );
QCOMPARE( model.data( alg2Index, Qt::ToolTipRole ).toString(), QString::fromStdString( "<p><b>a2</b></p><p>Algorithm ID: \u2018<i>p3:a2</i>\u2019</p>" ) );
QCOMPARE( model.data( alg2Index, QgsProcessingToolboxModel::RoleAlgorithmFlags ).toInt(), static_cast< int >( QgsProcessingAlgorithm::FlagHideFromToolbox ) );
QCOMPARE( model.data( alg2Index, QgsProcessingToolboxModel::RoleAlgorithmId ).toString(), QStringLiteral( "p3:a2" ) );
QCOMPARE( model.data( alg2Index, QgsProcessingToolboxModel::RoleAlgorithmName ).toString(), QStringLiteral( "a2" ) );
Expand Down

0 comments on commit a399acc

Please sign in to comment.