[hostinfo] Use os-release only if non-empty

This commit is contained in:
Adriaan de Groot 2019-11-08 12:11:07 +01:00
parent 6528ba30c9
commit dac47d2c3a

View File

@ -67,10 +67,12 @@ hostOSName()
{ {
#ifdef WITH_KOSRelease #ifdef WITH_KOSRelease
KOSRelease r; KOSRelease r;
return r.name(); if ( !r.name().isEmpty() )
#else {
return hostOS(); return r.name();
}
#endif #endif
return hostOS();
} }
static QString static QString