diff options
Diffstat (limited to 'src/modules/addon/libkviaddon.cpp')
-rw-r--r-- | src/modules/addon/libkviaddon.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/modules/addon/libkviaddon.cpp b/src/modules/addon/libkviaddon.cpp index a7cd4b88..6e984779 100644 --- a/src/modules/addon/libkviaddon.cpp +++ b/src/modules/addon/libkviaddon.cpp @@ -41,7 +41,7 @@ -QRect g_rectManagementDialogGeometry(0,0,0,0); +TQRect g_rectManagementDialogGeometry(0,0,0,0); /* @doc: addon.exists @@ -62,8 +62,8 @@ QRect g_rectManagementDialogGeometry(0,0,0,0); static bool addon_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szId; - QString szVersion; + TQString szId; + TQString szVersion; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("version",KVS_PT_STRING,KVS_PF_OPTIONAL,szVersion) @@ -102,7 +102,7 @@ static bool addon_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool addon_kvs_fnc_version(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) @@ -135,10 +135,10 @@ static bool addon_kvs_fnc_version(KviKvsModuleFunctionCall * c) static bool addon_kvs_cmd_list(KviKvsModuleCommandCall * c) { - KviPointerHashTable<QString,KviKvsScriptAddon> * da = KviKvsScriptAddonManager::instance()->addonDict(); + KviPointerHashTable<TQString,KviKvsScriptAddon> * da = KviKvsScriptAddonManager::instance()->addonDict(); int cnt = 0; - KviPointerHashTableIterator<QString,KviKvsScriptAddon> it(*da); + KviPointerHashTableIterator<TQString,KviKvsScriptAddon> it(*da); while(KviKvsScriptAddon * a = it.current()) { c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("%cAddon id %Q, version %Q%c"),KVI_TEXT_BOLD,&(a->name()),&(a->version()),KVI_TEXT_BOLD); @@ -180,7 +180,7 @@ static bool addon_kvs_cmd_list(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -188,14 +188,14 @@ static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c) KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(szName); if(a) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Uninstalling existing addon version %Q"),&(a->version())); // uninstall the existing version - KviKvsScriptAddonManager::instance()->unregisterAddon(szName,c->window(),!c->switches()->find('n',"no-callback")); + KviKvsScriptAddonManager::instance()->unregisterAddon(szName,c->window(),!c->switches()->tqfind('n',"no-callback")); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -223,7 +223,7 @@ static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -231,17 +231,17 @@ static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c) KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(szName); if(a) { - QString ss = a->configureCallbackCode(); + TQString ss = a->configureCallbackCode(); if(ss.isEmpty()) { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" has no configure callback set").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" has no configure callback set").tqarg(szName)); } else { a->executeConfigureCallback(c->window()); } } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -270,7 +270,7 @@ static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -278,17 +278,17 @@ static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(szName); if(a) { - QString ss = a->helpCallbackCode(); + TQString ss = a->helpCallbackCode(); if(ss.isEmpty()) { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" has no help callback set").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" has no help callback set").tqarg(szName)); } else { a->executeHelpCallback(c->window()); } } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -322,7 +322,7 @@ static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -333,8 +333,8 @@ static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * { a->setConfigureCallback(c->callback()->code()); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -369,7 +369,7 @@ static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -380,8 +380,8 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) { a->setHelpCallback(c->callback()->code()); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -429,7 +429,7 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) we will adhere to that naming in certain parts of the documentation too. [/p] [p] - Each script-based addon (a set of scripts) is identified by an UNIQUE + Each script-based addon (a set of scripts) is identified by an UNITQUE <id>. Two addons with the same <id> can't co-exist in the same KVIrc installation (so be sure to choose a token characteristic enough to avoid collisions with others). The <id> itself is used only for @@ -510,7 +510,7 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) { KviKvsScriptAddonRegistrationData rd; - QString szMinKVIrcVersion; + TQString szMinKVIrcVersion; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,(rd.szName)) @@ -549,7 +549,7 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) return false; } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Attempting to register addon \"%Q\" with version %Q"),&(rd.szName),&(rd.szVersion)); KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(rd.szName); @@ -560,18 +560,18 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) { // and it has a higher version... // complain unless -f is used - if(!c->switches()->find('f',"force")) + if(!c->switches()->tqfind('f',"force")) { c->error(__tr2qs("The script addon \"%Q\" already exists with version %Q which is higher than %Q"),&(rd.szName),&(a->version()),&(rd.szVersion)); return false; } } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Uninstalling existing addon version %Q"),&(a->version())); // uninstall the existing version - KviKvsScriptAddonManager::instance()->unregisterAddon(rd.szName,c->window(),!c->switches()->find('n',"no-uninstall")); + KviKvsScriptAddonManager::instance()->unregisterAddon(rd.szName,c->window(),!c->switches()->tqfind('n',"no-uninstall")); } if(!KviKvsScriptAddonManager::instance()->registerAddon(&rd)) @@ -580,7 +580,7 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) return false; } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Script succesfully registered")); return true; @@ -621,10 +621,10 @@ static bool addon_module_init(KviModule *m) KVSM_REGISTER_CALLBACK_COMMAND(m,"sethelpcallback",addon_kvs_cmd_sethelpcallback); KVSM_REGISTER_CALLBACK_COMMAND(m,"register",addon_kvs_cmd_register); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Read); - g_rectManagementDialogGeometry = cfg.readRectEntry("EditorGeometry",QRect(10,10,390,440)); + g_rectManagementDialogGeometry = cfg.readRectEntry("EditorGeometry",TQRect(10,10,390,440)); return true; } @@ -633,7 +633,7 @@ static bool addon_module_cleanup(KviModule *m) { KviScriptManagementDialog::cleanup(); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Write); cfg.writeEntry("EditorGeometry",g_rectManagementDialogGeometry); |