Skip to content

Commit

Permalink
Current version of Psi+ is 1.5.1741
Browse files Browse the repository at this point in the history
It is based on:
* psi: 1a43f2a7
* plugins: 3c71dec
* psimedia: 478567e
* resources: c35f1e3
  • Loading branch information
tehnick committed Apr 7, 2024
1 parent a40dd17 commit ee9f1ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
42 changes: 16 additions & 26 deletions src/systeminfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,16 @@ SystemInfo::SystemInfo() : QObject(QCoreApplication::instance())
// Detect
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU)
// attempt to get LSB version before trying the distro-specific approach
os_str_ = lsbRelease(QStringList() << "--description" << "--short");
os_str_ = lsbRelease(QStringList() << "--description"
<< "--short");

if (os_str_.isEmpty()) {
os_str_ = unixHeuristicDetect();
}
os_name_str_ = os_str_;

os_version_str_ = lsbRelease(QStringList() << "--release" << "--short");
os_version_str_ = lsbRelease(QStringList() << "--release"
<< "--short");

if (os_version_str_.isEmpty()) {
os_version_str_ = QSysInfo::productVersion();
Expand Down Expand Up @@ -282,9 +284,6 @@ SystemInfo::SystemInfo() : QObject(QCoreApplication::instance())
os_name_str_ = "Windows Server";
os_str_ = os_name_str_;
switch (current.majorVersion()) {
case 5:
os_version_str_ = "2003";
break;
case 6:
switch (current.minorVersion()) {
case 0:
Expand All @@ -302,11 +301,21 @@ SystemInfo::SystemInfo() : QObject(QCoreApplication::instance())
}
break;
case 10:
os_version_str_ = "2016";
if (current.microVersion() >= 20348)
os_version_str_ = "2022";
else if (current.microVersion() >= 17763)
os_version_str_ = "2019";
else
os_version_str_ = "2016";
break;
}
} else {
if (current >= QOperatingSystemVersion::Windows10) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
if (current >= QOperatingSystemVersion::Windows11) {
os_version_str_ = "11";
} else
#endif
if (current >= QOperatingSystemVersion::Windows10) {
if (current.microVersion() >= 22000) // Hack to detect Win11
os_version_str_ = "11";
else
Expand All @@ -317,25 +326,6 @@ SystemInfo::SystemInfo() : QObject(QCoreApplication::instance())
os_version_str_ = "8";
} else if (current >= QOperatingSystemVersion::Windows7) {
os_version_str_ = "7";
} else { // Outdated systems
switch (current.majorVersion()) {
case 6:
os_version_str_ = "Vista";
break;
case 5:
switch (current.minorVersion()) {
case 0:
os_version_str_ = "2000";
break;
case 1:
os_version_str_ = "XP";
break;
case 2:
os_version_str_ = "XP 64-Bit Edition";
break;
}
break;
}
}
}
if (!os_version_str_.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1740 (2024-04-07, 5fba513a)
1.5.1741 (2024-04-07, 1a43f2a7)

0 comments on commit ee9f1ed

Please sign in to comment.