summaryrefslogtreecommitdiffstats
path: root/src/modules/system/libkvisystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/system/libkvisystem.cpp')
-rw-r--r--src/modules/system/libkvisystem.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/modules/system/libkvisystem.cpp b/src/modules/system/libkvisystem.cpp
index 54ada405..d81524af 100644
--- a/src/modules/system/libkvisystem.cpp
+++ b/src/modules/system/libkvisystem.cpp
@@ -35,7 +35,7 @@
#include "kvi_osinfo.h"
#include "kvi_qcstring.h"
-#include <qclipboard.h>
+#include <tqclipboard.h>
#ifndef COMPILE_ON_WINDOWS
#include <sys/utsname.h>
@@ -197,20 +197,20 @@ static bool system_kvs_fnc_osnodename(KviKvsModuleFunctionCall *c)
static bool system_kvs_fnc_getenv(KviKvsModuleFunctionCall *c)
{
- QString szVariable;
+ TQString szVariable;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("variable",KVS_PT_NONEMPTYSTRING,0,szVariable)
KVSM_PARAMETERS_END(c)
- KviQCString szVar = szVariable.local8Bit();
+ KviTQCString szVar = szVariable.local8Bit();
#ifdef COMPILE_ON_WINDOWS
- QString env = getenv(szVar.data());
- QString def = __tr2qs("No environment variable found, please don't use the %% in the request");
- c->returnValue()->setString(env.isEmpty() ? QString::fromLocal8Bit(env) : QString::fromLocal8Bit(def));
+ TQString env = getenv(szVar.data());
+ TQString def = __tr2qs("No environment variable found, please don't use the %% in the request");
+ c->returnValue()->setString(env.isEmpty() ? TQString::fromLocal8Bit(env) : TQString::fromLocal8Bit(def));
#else
char * b = kvi_getenv(szVar.data());
- c->returnValue()->setString(b ? QString::fromLocal8Bit(b) : QString::null);
+ c->returnValue()->setString(b ? TQString::fromLocal8Bit(b) : TQString());
#endif
return true;
}
@@ -240,7 +240,7 @@ static bool system_kvs_fnc_getenv(KviKvsModuleFunctionCall *c)
static bool system_kvs_fnc_clipboard(KviKvsModuleFunctionCall *c)
{
- c->returnValue()->setString(g_pApp->clipboard()->text(QClipboard::Clipboard));
+ c->returnValue()->setString(g_pApp->tqclipboard()->text(TQClipboard::Clipboard));
return true;
}
@@ -270,12 +270,12 @@ static bool system_kvs_fnc_clipboard(KviKvsModuleFunctionCall *c)
static bool system_kvs_cmd_setClipboard(KviKvsModuleCommandCall * c)
{
- QString szValue;
+ TQString szValue;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c)
- g_pApp->clipboard()->setText(szValue,QClipboard::Clipboard);
+ g_pApp->tqclipboard()->setText(szValue,TQClipboard::Clipboard);
return true;
}
@@ -303,11 +303,11 @@ static bool system_kvs_cmd_setClipboard(KviKvsModuleCommandCall * c)
static bool system_kvs_cmd_setSelection(KviKvsModuleCommandCall * c)
{
- QString szValue;
+ TQString szValue;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c)
- g_pApp->clipboard()->setText(szValue,QClipboard::Selection);
+ g_pApp->tqclipboard()->setText(szValue,TQClipboard::Selection);
return true;
}
@@ -337,7 +337,7 @@ static bool system_kvs_cmd_setSelection(KviKvsModuleCommandCall * c)
static bool system_kvs_fnc_selection(KviKvsModuleFunctionCall *c)
{
- c->returnValue()->setString(g_pApp->clipboard()->text(QClipboard::Selection));
+ c->returnValue()->setString(g_pApp->tqclipboard()->text(TQClipboard::Selection));
return true;
}
@@ -364,7 +364,7 @@ static bool system_kvs_fnc_selection(KviKvsModuleFunctionCall *c)
static bool system_kvs_fnc_checkModule(KviKvsModuleFunctionCall *c)
{
- QString szModuleName;
+ TQString szModuleName;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("module_name",KVS_PT_STRING,0,szModuleName)
@@ -420,11 +420,11 @@ static bool system_kvs_fnc_hostname(KviKvsModuleFunctionCall *c)
identifier of the object called, <function> is the function to be executed
on the remote object and <parameter1>,<parameter2>,... is the list of
parameters to be passed. The <function> name must contain the
- trailing parenthesis and parameter specification (see examples).
+ trailing tqparenthesis and parameter specification (see examples).
The parameters MUST be in the form "type=value"
where "type" is the C++ type of the parameter and value
is the string rappresentation of the parameter data. Currently
- KVIrc supports only QString,KviQCString,bool,int and uint data types.[br]
+ KVIrc supports only TQString,KviTQCString,bool,int and uint data types.[br]
The returned value is the string rappresentation of the returned
data if the return type is known, otherwise it is the name of the data type returned.
[br]
@@ -439,7 +439,7 @@ static bool system_kvs_fnc_hostname(KviKvsModuleFunctionCall *c)
# we can also ignore the return value in several ways
%dummy = $system.dcop("kicker","kicker","showKMenu()")
$system.dcop("kdesktop","KScreensaverIface","save()")
- $system.dcop("kicker","Panel","addBrowserButton(QString)","QString=/")
+ $system.dcop("kicker","Panel","addBrowserButton(TQString)","TQString=/")
# runtime test if a call would work (i.e. , kicker is running at all, parameters are right etc...)
if($system.dcop("?kicker","kicker","showKMenu()"))echo "Can't make dcop calls to kicker!"
[/example]
@@ -449,8 +449,8 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
{
bool bTestMode = false;
- KviQCString szApp,szObj,szFun;
- QStringList parms;
+ KviTQCString szApp,szObj,szFun;
+ TQStringList parms;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("application",KVS_PT_NONEMPTYCSTRING,0,szApp)
@@ -470,10 +470,10 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
#ifdef COMPILE_KDE_SUPPORT
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
- for ( QStringList::Iterator it = parms.begin(); it != parms.end(); ++it )
+ for ( TQStringList::Iterator it = parms.begin(); it != parms.end(); ++it )
{
KviStr tmp = *it;
@@ -496,19 +496,19 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
return false;
}
ds << iii;
- } else if(kvi_strEqualCI("QString",szType.ptr()))
+ } else if(kvi_strEqualCI(TQSTRING_OBJECT_NAME_STRING,szType.ptr()))
{
- QString ddd = tmp.ptr();
+ TQString ddd = tmp.ptr();
ds << ddd;
- } else if(kvi_strEqualCI("KviQCString",szType.ptr()))
+ } else if(kvi_strEqualCI("KviTQCString",szType.ptr()))
{
- KviQCString qcs = tmp.ptr();
+ KviTQCString qcs = tmp.ptr();
ds << qcs;
} else if(kvi_strEqualCI("bool",szType.ptr()))
{
bool bbb = kvi_strEqualCI(tmp.ptr(),"true");
ds << bbb;
- } else if(kvi_strEqualCI("unsigned int",szType.ptr()) || kvi_strEqualCI("uint",szType.ptr()) || kvi_strEqualCI("Q_UINT32",szType.ptr()))
+ } else if(kvi_strEqualCI("unsigned int",szType.ptr()) || kvi_strEqualCI("uint",szType.ptr()) || kvi_strEqualCI("TQ_UINT32",szType.ptr()))
{
unsigned int uii = tmp.toUInt(&bOk);
if(!bOk)
@@ -523,8 +523,8 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
}
}
- QByteArray rba;
- KviQCString szRetType;
+ TQByteArray rba;
+ KviTQCString szRetType;
bool bRet = g_pApp->dcopClient()->call(szApp,szObj,szFun,ba,szRetType,rba);
@@ -537,23 +537,23 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
if(bTestMode)
c->returnValue()->setInteger(1);
else {
- QDataStream ret(rba, IO_ReadOnly);
+ TQDataStream ret(rba, IO_ReadOnly);
if(szRetType == "bool")
{
bool bqw;
ret >> bqw;
c->returnValue()->setInteger(bqw ? 1 : 0);
- } else if(szRetType == "QString")
+ } else if(szRetType == TQSTRING_OBJECT_NAME_STRING)
{
- QString szz;
+ TQString szz;
ret >> szz;
c->returnValue()->setString(szz);
- } else if(szRetType == "QCString")
+ } else if(szRetType == "TQCString")
{
- KviQCString sss;
+ KviTQCString sss;
ret >> sss;
c->returnValue()->setString(sss.data());
- } else if((szRetType == "uint") || (szRetType == "unsigned int") || (szRetType == "Q_UINT32"))
+ } else if((szRetType == "uint") || (szRetType == "unsigned int") || (szRetType == "TQ_UINT32"))
{
unsigned int ui3;
ret >> ui3;
@@ -572,18 +572,18 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
int idx = 0;
for(QCStringList::Iterator iter = csl.begin();iter != csl.end();++iter)
{
- arry->set(idx,new KviKvsVariant(QString(*iter)));
+ arry->set(idx,new KviKvsVariant(TQString(*iter)));
idx++;
}
c->returnValue()->setArray(arry);
#endif
- } else if(szRetType == "QStringList")
+ } else if(szRetType == TQSTRINGLIST_OBJECT_NAME_STRING)
{
- QStringList csl;
+ TQStringList csl;
ret >> csl;
KviKvsArray * arry = new KviKvsArray();
int idx = 0;
- for(QStringList::Iterator iter = csl.begin();iter != csl.end();++iter)
+ for(TQStringList::Iterator iter = csl.begin();iter != csl.end();++iter)
{
arry->set(idx,new KviKvsVariant(*iter));
idx++;
@@ -626,21 +626,21 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c)
static bool system_kvs_cmd_setenv(KviKvsModuleCommandCall * c)
{
- QString szVariable,szValue;
+ TQString szVariable,szValue;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("variable",KVS_PT_NONEMPTYSTRING,0,szVariable)
KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c)
- KviQCString szVar = szVariable.local8Bit();
- KviQCString szVal = szValue.local8Bit();
+ KviTQCString szVar = szVariable.local8Bit();
+ KviTQCString szVal = szValue.local8Bit();
if(szVal.isEmpty())kvi_unsetenv(szVar.data());
else
{
/*#ifdef COMPILE_ON_WINDOWS
- QString Var,Val,VarAndVal;
+ TQString Var,Val,VarAndVal;
Val = szVar.data();
Var = szVal.data();
VarAndVal = Var+"="+Val;