QDBusUtil::isValidBusName(): remove an impossible condition guard
QStringView::split() only returns an empty container if a) the haystack is empty and b) SkipEmptyParts is in effect. Neither is the case here: We use the implicit default of KeepEmptyParts, and we've already checked that the haystack isn't empty in the first line of the function. So the result of split() can never be empty here. Remove the check to avoid confusing more readers than just yours truly. Amends the start of the public history. Pick-to: 6.6 6.5 Change-Id: I423e747ae4de0708d063a6bb2befd625dbd5c591 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 05f9996bbf45fc90e49ea8c1679fa25201555860) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b71dd650c6
commit
60ee856adb
@ -392,9 +392,6 @@ namespace QDBusUtil
|
||||
return isValidUniqueConnectionName(busName);
|
||||
|
||||
const auto parts = QStringView{busName}.split(u'.');
|
||||
if (parts.size() < 1)
|
||||
return false;
|
||||
|
||||
for (QStringView part : parts) {
|
||||
if (part.isEmpty())
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user