Commit c7dbcff5 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

osinfo: Also check if pretty hostname is empty

Right now the code just checks if the pretty hostname exists, not if it
is empty. This fixes that.
parent 04200fac
......@@ -190,8 +190,9 @@ void LinuxPrivate::update()
kernelPrettyNameProperty->setValue(QString{kernelName % QLatin1Char(' ') % kernelVersion});
if (properties.contains(QStringLiteral("PrettyHostname"))) {
auto prettyHostName = properties.value(QStringLiteral("PrettyHostname"), QString{}).toString();
if (!prettyHostName.isEmpty()) {
} else {
hostnameProperty->setValue(properties.value(QStringLiteral("Hostname"), hostnameProperty->value()));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment