summaryrefslogtreecommitdiffstats
path: root/src/kvilib/ext/kvi_osinfo.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/ext/kvi_osinfo.cpp
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/ext/kvi_osinfo.cpp')
-rw-r--r--src/kvilib/ext/kvi_osinfo.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/kvilib/ext/kvi_osinfo.cpp b/src/kvilib/ext/kvi_osinfo.cpp
index 51037a48..9d443c0b 100644
--- a/src/kvilib/ext/kvi_osinfo.cpp
+++ b/src/kvilib/ext/kvi_osinfo.cpp
@@ -78,9 +78,9 @@ typedef BOOL (WINAPI *PGETPRODUCTINFO)(DWORD,DWORD,DWORD,DWORD,PDWORD);
#define PRODUCT_ULTIMATE 0x00000001
#define PRODUCT_WEB_SERVER 0x00000011
-static QString queryWinInfo( QueryInfo info)
+static TQString queryWinInfo( QueryInfo info)
{
- QString szVersion;
+ TQString szVersion;
OSVERSIONINFOEX osvi;
SYSTEM_INFO si;
PGNSI pGNSI;
@@ -317,7 +317,7 @@ static QString queryWinInfo( QueryInfo info)
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
TEXT("SYSTEM\\CurrentControlSet\\Control\\ProductOptions"),
- 0, KEY_QUERY_VALUE, &hKey );
+ 0, KEY_TQUERY_VALUE, &hKey );
if( lRet != ERROR_SUCCESS )
return FALSE;
@@ -348,19 +348,19 @@ static QString queryWinInfo( QueryInfo info)
// Test for SP6 versus SP6a.
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009"),
- 0, KEY_QUERY_VALUE, &hKey );
+ 0, KEY_TQUERY_VALUE, &hKey );
if( lRet == ERROR_SUCCESS )
- szVersion+= QString("Service Pack 6a (Build %1)").arg( osvi.dwBuildNumber & 0xFFFF );
+ szVersion+= TQString("Service Pack 6a (Build %1)").tqarg( osvi.dwBuildNumber & 0xFFFF );
else // Windows NT 4.0 prior to SP6a
{
- szVersion+= QString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF);
+ szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF);
}
RegCloseKey( hKey );
}
else // not Windows NT 4.0
{
- szVersion+= QString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF);
+ szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF);
}
break;
@@ -398,7 +398,7 @@ static QString queryWinInfo( QueryInfo info)
unsigned long major = osvi.dwMajorVersion;
unsigned long minor = osvi.dwMinorVersion;
unsigned long release = osvi.dwBuildNumber;
- QString szMajor, szMinor, szRelease, szVersion;
+ TQString szMajor, szMinor, szRelease, szVersion;
szMajor.setNum(major);
szMinor.setNum(minor);
szRelease.setNum(release);
@@ -424,7 +424,7 @@ static QString queryWinInfo( QueryInfo info)
namespace KviOsInfo
{
- QString type()
+ TQString type()
{
#ifdef COMPILE_ON_WINDOWS
return queryWinInfo(Os_Type);
@@ -437,74 +437,74 @@ namespace KviOsInfo
#endif
}
- QString name()
+ TQString name()
{
#ifdef COMPILE_ON_WINDOWS
return "windows";
#else
struct utsname uts;
if(uname(&uts) == 0)
- return QString::fromLocal8Bit(uts.sysname);
- return KviQString::empty;
+ return TQString::fromLocal8Bit(uts.sysname);
+ return KviTQString::empty;
#endif
}
- QString version()
+ TQString version()
{
#ifdef COMPILE_ON_WINDOWS
return queryWinInfo(Os_Version);
#else
struct utsname uts;
if(uname(&uts) == 0)
- return QString::fromLocal8Bit(uts.version);
- return KviQString::empty;
+ return TQString::fromLocal8Bit(uts.version);
+ return KviTQString::empty;
#endif
}
- QString release()
+ TQString release()
{
#ifdef COMPILE_ON_WINDOWS
return queryWinInfo(Os_Release);
#else
struct utsname uts;
if(uname(&uts) == 0)
- return QString::fromLocal8Bit(uts.release);
- return KviQString::empty;
+ return TQString::fromLocal8Bit(uts.release);
+ return KviTQString::empty;
#endif
}
- QString machine()
+ TQString machine()
{
#ifdef COMPILE_ON_WINDOWS
- QString mach = getenv("PROCESSOR_IDENTIFIER");
+ TQString mach = getenv("PROCESSOR_IDENTIFIER");
return mach.section(",",0,0);
#else
struct utsname uts;
if(uname(&uts) == 0)
- return QString::fromLocal8Bit(uts.machine);
- return KviQString::empty;
+ return TQString::fromLocal8Bit(uts.machine);
+ return KviTQString::empty;
#endif
}
- QString nodename()
+ TQString nodename()
{
#ifdef COMPILE_ON_WINDOWS
return "windows";
#else
struct utsname uts;
if(uname(&uts) == 0)
- return QString::fromLocal8Bit(uts.nodename);
- return KviQString::empty;
+ return TQString::fromLocal8Bit(uts.nodename);
+ return KviTQString::empty;
#endif
}
- QString hostname()
+ TQString hostname()
{
char hbuffer[1024];
if(gethostname(hbuffer,1024) == 0)
- return QString::fromLocal8Bit(hbuffer);
+ return TQString::fromLocal8Bit(hbuffer);
else
- return KviQString::empty;
+ return KviTQString::empty;
}
}