From 0a80cfd57d271dd44221467efb426675fa470356 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 18:31:12 +0000 Subject: 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 --- src/kvilib/ext/kvi_osinfo.cpp | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/kvilib/ext/kvi_osinfo.cpp') 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; } } -- cgit v1.2.1