summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-10-05 13:46:01 +0200
committerTopi Reinio <topi.reinio@qt.io>2020-10-05 14:03:31 +0200
commit048d0f97b6e49fe03399dcb495608f436ed6562b (patch)
treef34a831f503ac0da6620352e2f3d0b5051d8ced3 /tests
parentee8a9a0c7e7f69bece49fa410cd8e6866c1cc706 (diff)
qdoc: Fix regression in handling config variables defined as empty
Config::getString() must return an empty but non-null QString for a variable that is defined as empty. Fixes: QTBUG-87127 Change-Id: Iaf8e92096f67a47c46a80736d04826b4242c6109 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdoc/config/tst_config.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qdoc/config/tst_config.cpp b/tests/auto/qdoc/config/tst_config.cpp
index 15426f556..58d8eae15 100644
--- a/tests/auto/qdoc/config/tst_config.cpp
+++ b/tests/auto/qdoc/config/tst_config.cpp
@@ -114,6 +114,7 @@ void tst_Config::variables()
QCOMPARE(config.getBool("untrue"), false);
QCOMPARE(config.getInt("int"), 2);
QCOMPARE(config.getString("void"), QString());
+ QVERIFY(!config.getString("void").isNull());
QCOMPARE(config.getString("void", "undefined"), QString());
QCOMPARE(config.getString("undefined", "undefined"), "undefined");
QVERIFY(config.getString("undefined").isNull());