Skip to content

Commit

Permalink
#3027 fix: linting
Browse files Browse the repository at this point in the history
Signed-off-by: Patrizio Bekerle <[email protected]>
  • Loading branch information
pbek committed Sep 26, 2024
1 parent aeb00b0 commit 7de32a9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/unit_tests/testcases/app/test_settingsservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ void TestSettingsService::testGroupRemove() {
// Set and test a value in a group manually
settings.setValue(group + "/" + key, value);
QVERIFY2(settings.value(group + "/" + key).toString() == value, "Value set failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() == value, "QSettings() value set failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() == value,
"QSettings() value set failed");

// Remove the group and test if it was removed
settings.beginGroup(group);
settings.remove(QLatin1String(""));
settings.endGroup();
QVERIFY2(settings.value(group + "/" + key).toString() != value, "Group remove failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() != value, "QSettings() group remove failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() != value,
"QSettings() group remove failed");
}

void TestSettingsService::testGroupRead() {
Expand All @@ -97,7 +99,8 @@ void TestSettingsService::testGroupRead() {
// Set and test a value in a group manually
settings.setValue(group + "/" + key, value);
QVERIFY2(settings.value(group + "/" + key).toString() == value, "Value set failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() == value, "QSettings value set failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() == value,
"QSettings value set failed");

// Read the value in the group and test if it was read
settings.beginGroup(group);
Expand All @@ -120,7 +123,8 @@ void TestSettingsService::testGroupSet() {

// Test if the value was set in the group manually
QVERIFY2(settings.value(group + "/" + key).toString() == value, "Value set failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() == value, "QSettings value set failed");
QVERIFY2(QSettings().value(group + "/" + key).toString() == value,
"QSettings value set failed");
}

void TestSettingsService::testArraySetAndRead() {
Expand Down

0 comments on commit 7de32a9

Please sign in to comment.