Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Beatrici <git@davidebeatrici.dev>2021-02-24 00:08:24 +0300
committerGitHub <noreply@github.com>2021-02-24 00:08:24 +0300
commit569336e78a9a5d516306f2ba2d9ce7e35afbf622 (patch)
treec751b6fa8704fec0f6205c0add213a0f21ce4b36
parent9ad316b77c6b2ecb8239e76dcc3a8bc431803f74 (diff)
parent82bbdc86e9087cfee51016611751f998b28c97fa (diff)
Merge PR #4781: FIX/REFAC(shared): Don't pass unneeded values to OSInfo, rely on the ones it provides, fix "osverbose" not being verbose on macOS1.4.0-development-snapshot-002
-rw-r--r--src/OSInfo.cpp12
-rw-r--r--src/OSInfo.h4
-rw-r--r--src/murmur/Register.cpp2
3 files changed, 7 insertions, 11 deletions
diff --git a/src/OSInfo.cpp b/src/OSInfo.cpp
index 982b2864a..e665ddb62 100644
--- a/src/OSInfo.cpp
+++ b/src/OSInfo.cpp
@@ -200,9 +200,6 @@ QString OSInfo::getOSDisplayableVersion(const bool appendArch) {
return QString();
}
- _SYSTEM_INFO si;
- GetNativeSystemInfo(&si);
-
if (ovi.dwMajorVersion == 10) {
if (ovi.wProductType == VER_NT_WORKSTATION) {
os = QLatin1String("Windows 10");
@@ -327,6 +324,8 @@ QString OSInfo::getOSDisplayableVersion(const bool appendArch) {
return os;
}
+#elif defined(Q_OS_MACOS)
+ const QString os = QLatin1String("macOS ") + getOSVersion();
#else
const QString os = QSysInfo::prettyProductName();
#endif
@@ -376,8 +375,7 @@ QString OSInfo::getOSVersion() {
#endif
}
-void OSInfo::fillXml(QDomDocument &doc, QDomElement &root, const QString &os, const QString &osver,
- const QList< QHostAddress > &qlBind) {
+void OSInfo::fillXml(QDomDocument &doc, QDomElement &root, const QList< QHostAddress > &qlBind) {
QDomElement tag = doc.createElement(QLatin1String("machash"));
root.appendChild(tag);
QDomText t = doc.createTextNode(getMacHash(qlBind));
@@ -400,7 +398,7 @@ void OSInfo::fillXml(QDomDocument &doc, QDomElement &root, const QString &os, co
tag = doc.createElement(QLatin1String("os"));
root.appendChild(tag);
- t = doc.createTextNode(os);
+ t = doc.createTextNode(getOS());
tag.appendChild(t);
tag = doc.createElement(QLatin1String("osarch"));
@@ -410,7 +408,7 @@ void OSInfo::fillXml(QDomDocument &doc, QDomElement &root, const QString &os, co
tag = doc.createElement(QLatin1String("osver"));
root.appendChild(tag);
- t = doc.createTextNode(osver);
+ t = doc.createTextNode(getOSVersion());
tag.appendChild(t);
tag = doc.createElement(QLatin1String("osverbose"));
diff --git a/src/OSInfo.h b/src/OSInfo.h
index ae2936da8..b25a1852b 100644
--- a/src/OSInfo.h
+++ b/src/OSInfo.h
@@ -39,9 +39,7 @@ public:
/// Examples: "10.0.19042.1", "10.16.0 20C69"
static QString getOSVersion();
- static void fillXml(QDomDocument &doc, QDomElement &root, const QString &os = OSInfo::getOS(),
- const QString &osver = OSInfo::getOSVersion(),
- const QList< QHostAddress > & = QList< QHostAddress >());
+ static void fillXml(QDomDocument &doc, QDomElement &root, const QList< QHostAddress > & = {});
};
#endif
diff --git a/src/murmur/Register.cpp b/src/murmur/Register.cpp
index 72f5c8449..bf05d3e1c 100644
--- a/src/murmur/Register.cpp
+++ b/src/murmur/Register.cpp
@@ -55,7 +55,7 @@ void Server::update() {
QDomElement root = doc.createElement(QLatin1String("server"));
doc.appendChild(root);
- OSInfo::fillXml(doc, root, meta->qsOS, meta->qsOSVersion, qlBind);
+ OSInfo::fillXml(doc, root, qlBind);
QDomElement tag;
QDomText t;