summaryrefslogtreecommitdiff
path: root/lang/qt/tests/t-config.cpp
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2023-01-30 13:26:32 +0900
committerJinWang An <jinwang.an@samsung.com>2023-01-30 13:26:32 +0900
commit7068c0ead0c25a9a1fd3ce0b486636d74350e7ca (patch)
tree732edf51b955fd198e4bb7ef46a0782fb3ea1d12 /lang/qt/tests/t-config.cpp
parentd19c360948ede5ffe5974de8abc9da44be617ca1 (diff)
downloadgpgme-7068c0ead0c25a9a1fd3ce0b486636d74350e7ca.tar.gz
gpgme-7068c0ead0c25a9a1fd3ce0b486636d74350e7ca.tar.bz2
gpgme-7068c0ead0c25a9a1fd3ce0b486636d74350e7ca.zip
Imported Upstream version 1.17.0upstream/1.17.0
Diffstat (limited to 'lang/qt/tests/t-config.cpp')
-rw-r--r--lang/qt/tests/t-config.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/lang/qt/tests/t-config.cpp b/lang/qt/tests/t-config.cpp
index 9ec9566..b84dbfd 100644
--- a/lang/qt/tests/t-config.cpp
+++ b/lang/qt/tests/t-config.cpp
@@ -57,27 +57,24 @@ private Q_SLOTS:
// be unsupported in older versions.
return;
}
- // First set compliance to de-vs
auto conf = cryptoConfig();
QVERIFY(conf);
- auto entry = conf->entry(QStringLiteral("gpg"),
- QStringLiteral("Configuration"),
- QStringLiteral("compliance"));
+ auto entry = conf->entry(QStringLiteral("gpg"), QStringLiteral("compliance"));
QVERIFY(entry);
+ const auto defaultValue = entry->defaultValue().toString();
+ QCOMPARE(defaultValue, QStringLiteral("gnupg"));
+
entry->setStringValue("de-vs");
conf->sync(true);
conf->clear();
- entry = conf->entry(QStringLiteral("gpg"),
- QStringLiteral("Configuration"),
- QStringLiteral("compliance"));
+ entry = conf->entry(QStringLiteral("gpg"), QStringLiteral("compliance"));
QCOMPARE(entry->stringValue(), QStringLiteral("de-vs"));
+
entry->resetToDefault();
conf->sync(true);
conf->clear();
- entry = conf->entry(QStringLiteral("gpg"),
- QStringLiteral("Configuration"),
- QStringLiteral("compliance"));
- QCOMPARE(entry->stringValue(), QStringLiteral("gnupg"));
+ entry = conf->entry(QStringLiteral("gpg"), QStringLiteral("compliance"));
+ QCOMPARE(entry->stringValue(), defaultValue);
}
void initTestCase()