summaryrefslogtreecommitdiffstats
path: root/src/UiGuiSystemInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/UiGuiSystemInfo.cpp')
-rwxr-xr-xsrc/UiGuiSystemInfo.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/UiGuiSystemInfo.cpp b/src/UiGuiSystemInfo.cpp
index b83a636..ac72ce1 100755
--- a/src/UiGuiSystemInfo.cpp
+++ b/src/UiGuiSystemInfo.cpp
@@ -19,10 +19,10 @@
#include "UiGuiSystemInfo.h"
-#include <tqstring.h>
+#include <tntqstring.h>
#include <tqsysinfo.h>
-#include <tqprocess.h>
-#include <tqfile.h>
+#include <tntqprocess.h>
+#include <tntqfile.h>
UiGuiSystemInfo::UiGuiSystemInfo() {
}
@@ -33,51 +33,51 @@ UiGuiSystemInfo::UiGuiSystemInfo() {
The String contains name and version of the os. E.g. Linux Ubuntu 9.04.
*/
-QString UiGuiSystemInfo::getOperatingSystem() {
- QString operatingSystemString = "";
+TQString UiGuiSystemInfo::getOperatingSystem() {
+ TQString operatingSystemString = "";
#if defined(Q_WS_WIN)
- switch ( QSysInfo::WindowsVersion ) {
- case QSysInfo::WV_32s :
+ switch ( TQSysInfo::WindowsVersion ) {
+ case TQSysInfo::WV_32s :
operatingSystemString = "Windows 3.1 with Win 32s";
break;
- case QSysInfo::WV_95 :
+ case TQSysInfo::WV_95 :
operatingSystemString = "Windows 95";
break;
- case QSysInfo::WV_98 :
+ case TQSysInfo::WV_98 :
operatingSystemString = "Windows 98";
break;
- case QSysInfo::WV_Me :
+ case TQSysInfo::WV_Me :
operatingSystemString = "Windows Me";
break;
- case QSysInfo::WV_NT :
+ case TQSysInfo::WV_NT :
operatingSystemString = "Windows NT (operating system version 4.0)";
break;
- case QSysInfo::WV_2000 :
+ case TQSysInfo::WV_2000 :
operatingSystemString = "Windows 2000 (operating system version 5.0)";
break;
- case QSysInfo::WV_XP :
+ case TQSysInfo::WV_XP :
operatingSystemString = "Windows XP (operating system version 5.1)";
break;
- case QSysInfo::WV_2003 :
+ case TQSysInfo::WV_2003 :
operatingSystemString = "Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2)";
break;
- case QSysInfo::WV_VISTA :
+ case TQSysInfo::WV_VISTA :
operatingSystemString = "Windows Vista, Windows Server 2008 (operating system version 6.0)";
break;
- case QSysInfo::WV_WINDOWS7 :
+ case TQSysInfo::WV_WINDOWS7 :
operatingSystemString = "Windows 7 (operating system version 6.1)";
break;
- case QSysInfo::WV_CE :
+ case TQSysInfo::WV_CE :
operatingSystemString = "Windows CE";
break;
- case QSysInfo::WV_CENET :
+ case TQSysInfo::WV_CENET :
operatingSystemString = "Windows CE .NET";
break;
- case QSysInfo::WV_CE_5 :
+ case TQSysInfo::WV_CE_5 :
operatingSystemString = "Windows CE 5.x";
break;
- case QSysInfo::WV_CE_6 :
+ case TQSysInfo::WV_CE_6 :
operatingSystemString = "Windows CE 6.x";
break;
default :
@@ -85,32 +85,32 @@ QString UiGuiSystemInfo::getOperatingSystem() {
break;
}
#elif defined(Q_WS_MAC)
- switch ( QSysInfo::MacintoshVersion ) {
- case QSysInfo::MV_9 :
+ switch ( TQSysInfo::MacintoshVersion ) {
+ case TQSysInfo::MV_9 :
operatingSystemString = "Mac OS 9 (unsupported)";
break;
- case QSysInfo::MV_10_0 :
+ case TQSysInfo::MV_10_0 :
operatingSystemString = "Mac OS X 10.0 Cheetah (unsupported)";
break;
- case QSysInfo::MV_10_1 :
+ case TQSysInfo::MV_10_1 :
operatingSystemString = "Mac OS X 10.1 Puma (unsupported)";
break;
- case QSysInfo::MV_10_2 :
+ case TQSysInfo::MV_10_2 :
operatingSystemString = "Mac OS X 10.2 Jaguar (unsupported)";
break;
- case QSysInfo::MV_10_3 :
+ case TQSysInfo::MV_10_3 :
operatingSystemString = "Mac OS X 10.3 Panther";
break;
- case QSysInfo::MV_10_4 :
+ case TQSysInfo::MV_10_4 :
operatingSystemString = "Mac OS X 10.4 Tiger";
break;
- case QSysInfo::MV_10_5 :
+ case TQSysInfo::MV_10_5 :
operatingSystemString = "Mac OS X 10.5 Leopard";
break;
- case QSysInfo::MV_10_6 :
+ case TQSysInfo::MV_10_6 :
operatingSystemString = "Mac OS X 10.6 Snow Leopard";
break;
- case QSysInfo::MV_Unknown :
+ case TQSysInfo::MV_Unknown :
operatingSystemString = "An unknown and currently unsupported platform";
break;
default :
@@ -120,46 +120,46 @@ QString UiGuiSystemInfo::getOperatingSystem() {
#else
//TODO: Detect Unix, Linux etc. distro as described on http://www.novell.com/coolsolutions/feature/11251.html
operatingSystemString = "Linux";
- QProcess process;
+ TQProcess process;
process.start("uname -s");
bool result = process.waitForFinished(1000);
- QString os = process.readAllStandardOutput().trimmed();
+ TQString os = process.readAllStandardOutput().trimmed();
process.start("uname -r");
result = process.waitForFinished(1000);
- QString rev = process.readAllStandardOutput().trimmed();
+ TQString rev = process.readAllStandardOutput().trimmed();
process.start("uname -m");
result = process.waitForFinished(1000);
- QString mach = process.readAllStandardOutput().trimmed();
+ TQString mach = process.readAllStandardOutput().trimmed();
if ( os == "SunOS" ) {
os = "Solaris";
process.start("uname -p");
result = process.waitForFinished(1000);
- QString arch = process.readAllStandardOutput().trimmed();
+ TQString arch = process.readAllStandardOutput().trimmed();
process.start("uname -v");
result = process.waitForFinished(1000);
- QString timestamp = process.readAllStandardOutput().trimmed();
+ TQString timestamp = process.readAllStandardOutput().trimmed();
operatingSystemString = os + " " + rev + " (" + arch + " " + timestamp + ")";
}
else if ( os == "AIX" ) {
process.start("oslevel -r");
result = process.waitForFinished(1000);
- QString oslevel = process.readAllStandardOutput().trimmed();
+ TQString oslevel = process.readAllStandardOutput().trimmed();
operatingSystemString = os + "oslevel " + oslevel;
}
else if ( os == "Linux" ) {
- QString dist;
- QString pseudoname;
- QString kernel = rev;
+ TQString dist;
+ TQString pseudoname;
+ TQString kernel = rev;
- if ( QFile::exists("/etc/redhat-release") ) {
+ if ( TQFile::exists("/etc/redhat-release") ) {
dist = "RedHat";
process.start("sh -c \"cat /etc/redhat-release | sed s/.*\\(// | sed s/\\)//\"");
@@ -170,7 +170,7 @@ QString UiGuiSystemInfo::getOperatingSystem() {
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/SUSE-release") ) {
+ else if ( TQFile::exists("/etc/SUSE-release") ) {
process.start("sh -c \"cat /etc/SUSE-release | tr '\\n' ' '| sed s/VERSION.*//\"");
result = process.waitForFinished(1000);
dist = process.readAllStandardOutput().trimmed();
@@ -179,7 +179,7 @@ QString UiGuiSystemInfo::getOperatingSystem() {
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/mandrake-release") ) {
+ else if ( TQFile::exists("/etc/mandrake-release") ) {
dist = "Mandrake";
process.start("sh -c \"cat /etc/mandrake-release | sed s/.*\\(// | sed s/\\)//\"");
@@ -190,20 +190,20 @@ QString UiGuiSystemInfo::getOperatingSystem() {
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/lsb-release") ) {
+ else if ( TQFile::exists("/etc/lsb-release") ) {
dist = "Ubuntu";
- QString processCall = "sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_RELEASE=// | sed s/\\ .*//\"";
+ TQString processCall = "sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_RELEASE=// | sed s/\\ .*//\"";
process.start( processCall );
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
- QString errorStr = process.readAllStandardError();
+ TQString errorStr = process.readAllStandardError();
process.start("sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_CODENAME=// | sed s/\\ .*//\"");
result = process.waitForFinished(1000);
pseudoname = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/debian_version") ) {
+ else if ( TQFile::exists("/etc/debian_version") ) {
dist = "Debian";
process.start("cat /etc/debian_version");
@@ -213,7 +213,7 @@ QString UiGuiSystemInfo::getOperatingSystem() {
rev = "";
}
- if ( QFile::exists("/etc/UnitedLinux-release") ) {
+ if ( TQFile::exists("/etc/UnitedLinux-release") ) {
process.start("sh -c \"cat /etc/UnitedLinux-release | tr '\\n' ' ' | sed s/VERSION.*//\"");
result = process.waitForFinished(1000);
dist += process.readAllStandardOutput().trimmed();