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/modules/action/libkviaction.cpp | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'src/modules/action') diff --git a/src/modules/action/libkviaction.cpp b/src/modules/action/libkviaction.cpp index daf84699..34344906 100644 --- a/src/modules/action/libkviaction.cpp +++ b/src/modules/action/libkviaction.cpp @@ -55,7 +55,7 @@ static bool action_kvs_cmd_list(KviKvsModuleCommandCall * c) { KviWindow * pOut = c->window(); - KviPointerHashTableIterator it(*(KviActionManager::instance()->actions())); + KviPointerHashTableIterator it(*(KviActionManager::instance()->actions())); while(KviAction * a = it.current()) { if(a->isKviUserActionNeverOverrideThis()) @@ -96,7 +96,7 @@ static bool action_kvs_cmd_list(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -108,11 +108,11 @@ static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c) { a->activate(); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" is disabled").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" is disabled").tqarg(szName)); } } else { - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -147,7 +147,7 @@ static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -157,8 +157,8 @@ static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c) { if(!a->isEnabled())a->setEnabled(true); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -195,7 +195,7 @@ static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -205,8 +205,8 @@ static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c) { if(a->isEnabled())a->setEnabled(false); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -239,7 +239,7 @@ static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -251,12 +251,12 @@ static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { a->suicide(); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" is a core action and cannot be destroyed").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" is a core action and cannot be destroyed").tqarg(szName)); } } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -362,7 +362,7 @@ static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) { - QString szName,szVisibleText,szDescription,szBigIconId,szSmallIconId; + TQString szName,szVisibleText,szDescription,szBigIconId,szSmallIconId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -378,13 +378,13 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) return false; } - QString szCategory,szWindows,szKeySequence; + TQString szCategory,szWindows,szKeySequence; int iFlags = 0; - if(c->switches()->find('i',"bind-to-context"))iFlags |= KviAction::NeedsContext; - if(c->switches()->find('c',"bind-to-connection"))iFlags |= KviAction::NeedsConnection | KviAction::NeedsContext; - if(c->switches()->find('l',"enable-at-login")) + if(c->switches()->tqfind('i',"bind-to-context"))iFlags |= KviAction::NeedsContext; + if(c->switches()->tqfind('c',"bind-to-connection"))iFlags |= KviAction::NeedsConnection | KviAction::NeedsContext; + if(c->switches()->tqfind('l',"enable-at-login")) { if(iFlags & KviAction::NeedsConnection) iFlags |= KviAction::EnableAtLogin; @@ -396,12 +396,12 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) c->switches()->getAsStringIfExisting('w',"window-types",szWindows); if(!szWindows.isEmpty()) { - if(szWindows.find('c') != -1)iFlags |= KviAction::WindowChannel; - if(szWindows.find('x') != -1)iFlags |= KviAction::WindowConsole; - if(szWindows.find('d') != -1)iFlags |= KviAction::WindowDccChat; - if(szWindows.find('q') != -1)iFlags |= KviAction::WindowQuery; + if(szWindows.tqfind('c') != -1)iFlags |= KviAction::WindowChannel; + if(szWindows.tqfind('x') != -1)iFlags |= KviAction::WindowConsole; + if(szWindows.tqfind('d') != -1)iFlags |= KviAction::WindowDccChat; + if(szWindows.tqfind('q') != -1)iFlags |= KviAction::WindowQuery; } - if(c->switches()->find('s',"enable-on-selected")) + if(c->switches()->tqfind('s',"enable-on-selected")) { if(iFlags & (KviAction::WindowChannel | KviAction::WindowConsole | KviAction::WindowQuery)) iFlags |= KviAction::WindowOnlyIfUsersSelected; @@ -417,12 +417,12 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) if(old->isKviUserActionNeverOverrideThis()) old->suicide(); else { - c->warning(__tr2qs("The action \"%1\" is already defined as core action and cannot be overridden").arg(szName)); + c->warning(__tr2qs("The action \"%1\" is already defined as core action and cannot be overridden").tqarg(szName)); return false; } } - QString szCmd = c->callback()->code(); + TQString szCmd = c->callback()->code(); if(szCmd.isEmpty()) { @@ -462,7 +462,7 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) static bool action_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("action_name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -487,7 +487,7 @@ static bool action_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool action_kvs_fnc_isEnabled(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("action_name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) -- cgit v1.2.1