#5603 Ignore exceptions in getOSInformation()
This commit is contained in:
parent
088ac82e18
commit
02d75cd370
|
@ -114,6 +114,8 @@ QString getOSInformation()
|
|||
QString result;
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
result = "Linux";
|
||||
try {
|
||||
QStringList arguments;
|
||||
arguments.append("/etc/os-release");
|
||||
CommandProcess cp("/bin/cat", arguments);
|
||||
|
@ -121,8 +123,9 @@ QString getOSInformation()
|
|||
|
||||
QRegExp resultRegex(".*PRETTY_NAME=\"([^\"]+)\".*");
|
||||
if (resultRegex.exactMatch(output)) {
|
||||
QString OSInfo = resultRegex.cap(1);
|
||||
result = OSInfo;
|
||||
result = resultRegex.cap(1);
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue