fix: Redundant condition in tst_qdbustype
When isValid is true, it must be true; when isValid is false, whether the conditional judgment is true or not only depends on whether !result is true (eg: A | | (!A && B) is equivalent to A | | B.), so you can optimize the judgment condition to improve the readability of the code. Change-Id: Iab621d3d2948d249f6d8a2425bca3f5404c2e1a1 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 3819ad4ea42b707e7b786b3a8b942d1214533ba6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>bb10
parent
b3a25e845a
commit
e0b2258b03
|
|
@ -173,7 +173,7 @@ void tst_QDBusType::isValidFixedType()
|
|||
QFETCH(bool, result);
|
||||
QFETCH(bool, isValid);
|
||||
QVERIFY2(data.size() == 1, "Test is malformed, this function must test only one-letter types");
|
||||
QVERIFY(isValid || (!isValid && !result));
|
||||
QVERIFY(isValid || !result);
|
||||
|
||||
int type = data.at(0).unicode();
|
||||
if (isValid)
|
||||
|
|
|
|||
Loading…
Reference in New Issue