Skip to content
Permalink
Browse files
Use one project in test and call QgsProject::clear()
  • Loading branch information
mhugent authored and nyalldawson committed Jun 21, 2021
1 parent f3c217c commit 479173dff7b650f93e68911c1c24023ca3736954
Showing with 3 additions and 4 deletions.
  1. +3 −4 tests/src/core/testqgsproject.cpp
@@ -708,15 +708,14 @@ void TestQgsProject::testDefaultRelativePaths()
s.setValue( QStringLiteral( "/qgis/defaultProjectPathsRelative" ), true );
QgsProject p1;
bool p1PathsAbsolute = p1.readBoolEntry( QStringLiteral( "Paths" ), QStringLiteral( "/Absolute" ), false );

s.setValue( QStringLiteral( "/qgis/defaultProjectPathsRelative" ), false );
QgsProject p2;
bool p2PathsAbsolute = p2.readBoolEntry( QStringLiteral( "Paths" ), QStringLiteral( "/Absolute" ), false );
p1.clear();
bool p1PathsAbsolute_2 = p1.readBoolEntry( QStringLiteral( "Paths" ), QStringLiteral( "/Absolute" ), false );

s.setValue( QStringLiteral( "/qgis/defaultProjectPathsRelative" ), bk_defaultRelativePaths );

QCOMPARE( p1PathsAbsolute, false );
QCOMPARE( p2PathsAbsolute, true );
QCOMPARE( p1PathsAbsolute_2, true );
}

QGSTEST_MAIN( TestQgsProject )

0 comments on commit 479173d

Please sign in to comment.