diff --git a/src/kcms/kio/useragentinfo.cpp b/src/kcms/kio/useragentinfo.cpp --- a/src/kcms/kio/useragentinfo.cpp +++ b/src/kcms/kio/useragentinfo.cpp @@ -22,14 +22,10 @@ // std #include -#ifndef Q_OS_WIN -#include -#else -#include -#endif - // Qt +#include #include +#include // KDE #include @@ -95,19 +91,10 @@ if ( (*it)->property(QStringLiteral("X-KDE-UA-DYNAMIC-ENTRY")).toBool() ) { -#ifndef Q_OS_WIN - struct utsname utsn; - uname( &utsn ); - - tmp.replace( QFL("appSysName"), QString::fromUtf8(utsn.sysname) ); - tmp.replace( QFL("appSysRelease"), QString::fromUtf8(utsn.release) ); - tmp.replace( QFL("appMachineType"), QString::fromUtf8(utsn.machine) ); -#else - tmp.replace( QFL("appSysName"), QLatin1String("Windows") ); - // TODO: maybe we can use QSysInfo also on linux? + tmp.replace( QFL("appSysName"), QSysInfo::productType() ); tmp.replace( QFL("appSysRelease"), QSysInfo::kernelVersion() ); tmp.replace( QFL("appMachineType"), QSysInfo::currentCpuArchitecture() ); -#endif + QStringList languageList = QLocale().uiLanguages(); if ( !languageList.isEmpty() ) {