summaryrefslogtreecommitdiffstats
path: root/lib/kross/main
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitb6edfe41c9395f2e20784cbf0e630af6426950a3 (patch)
tree56ed9b871d4296e6c15949c24e16420be1b28697 /lib/kross/main
parentef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff)
downloadkoffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz
koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kross/main')
-rw-r--r--lib/kross/main/manager.cpp26
-rw-r--r--lib/kross/main/scriptaction.h2
-rw-r--r--lib/kross/main/scriptcontainer.cpp4
-rw-r--r--lib/kross/main/scriptguiclient.cpp12
4 files changed, 22 insertions, 22 deletions
diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp
index b966a1cc..646a8746 100644
--- a/lib/kross/main/manager.cpp
+++ b/lib/kross/main/manager.cpp
@@ -83,10 +83,10 @@ Manager::Manager()
TQString pythonlib = TQFile::encodeName( KLibLoader::self()->findLibrary(KROSS_PYTHON_LIBRARY) );
if(! pythonlib.isEmpty()) { // If the Kross Python plugin exists we offer it as supported scripting language.
InterpreterInfo::Option::Map pythonoptions;
- pythonoptions.tqreplace("restricted",
+ pythonoptions.replace("restricted",
new InterpreterInfo::Option("Restricted", "Restricted Python interpreter", TQVariant(false,0))
);
- d->interpreterinfos.tqreplace("python",
+ d->interpreterinfos.replace("python",
new InterpreterInfo("python",
pythonlib, // library
"*.py", // file filter-wildcard
@@ -100,10 +100,10 @@ Manager::Manager()
TQString rubylib = TQFile::encodeName( KLibLoader::self()->findLibrary(KROSS_RUBY_LIBRARY) );
if(! rubylib.isEmpty()) { // If the Kross Ruby plugin exists we offer it as supported scripting language.
InterpreterInfo::Option::Map rubyoptions;
- rubyoptions.tqreplace("safelevel",
+ rubyoptions.replace("safelevel",
new InterpreterInfo::Option("safelevel", "Level of safety of the Ruby interpreter", TQVariant(0)) // 0 -> unsafe, 4 -> very safe
);
- d->interpreterinfos.tqreplace("ruby",
+ d->interpreterinfos.replace("ruby",
new InterpreterInfo("ruby",
rubylib, // library
"*.rb", // file filter-wildcard
@@ -131,7 +131,7 @@ TQMap<TQString, InterpreterInfo*> Manager::getInterpreterInfos()
bool Manager::hasInterpreterInfo(const TQString& interpretername) const
{
- return d->interpreterinfos.tqcontains(interpretername);
+ return d->interpreterinfos.contains(interpretername);
}
InterpreterInfo* Manager::getInterpreterInfo(const TQString& interpretername)
@@ -145,7 +145,7 @@ const TQString Manager::getInterpreternameForFile(const TQString& file)
rx.setWildcard(true);
for(TQMap<TQString, InterpreterInfo*>::Iterator it = d->interpreterinfos.begin(); it != d->interpreterinfos.end(); ++it) {
rx.setPattern((*it)->getWildcard());
- if( file.tqfind(rx) >= 0 )
+ if( file.find(rx) >= 0 )
return (*it)->getInterpretername();
}
return TQString();
@@ -155,11 +155,11 @@ ScriptContainer::Ptr Manager::getScriptContainer(const TQString& scriptname)
{
//TODO at the moment we don't share ScriptContainer instances.
- //if(d->m_scriptcontainers.tqcontains(scriptname))
+ //if(d->m_scriptcontainers.contains(scriptname))
// return d->m_scriptcontainers[scriptname];
ScriptContainer* scriptcontainer = new ScriptContainer(scriptname);
//ScriptContainer script(this, scriptname);
- //d->m_scriptcontainers.tqreplace(scriptname, scriptcontainer);
+ //d->m_scriptcontainers.replace(scriptname, scriptcontainer);
return scriptcontainer;
}
@@ -168,7 +168,7 @@ Interpreter* Manager::getInterpreter(const TQString& interpretername)
{
setException(0); // clear previous exceptions
- if(! d->interpreterinfos.tqcontains(interpretername)) {
+ if(! d->interpreterinfos.contains(interpretername)) {
setException( new Exception(i18n("No such interpreter '%1'").tqarg(interpretername)) );
return 0;
}
@@ -192,8 +192,8 @@ const TQStringList Manager::getInterpreters()
bool Manager::addModule(Module::Ptr module)
{
TQString name = module->getName();
- //if( d->modules.tqcontains(name) ) return false;
- d->modules.tqreplace(name, module);
+ //if( d->modules.contains(name) ) return false;
+ d->modules.replace(name, module);
return true;
}
@@ -201,7 +201,7 @@ Module::Ptr Manager::loadModule(const TQString& modulename)
{
Module::Ptr module = 0;
- if(d->modules.tqcontains(modulename)) {
+ if(d->modules.contains(modulename)) {
module = d->modules[modulename];
if(module)
return module;
@@ -240,7 +240,7 @@ Module::Ptr Manager::loadModule(const TQString& modulename)
}
// Don't remember module cause we like to have freeing it handled by the caller.
- //d->modules.tqreplace(modulename, module);
+ //d->modules.replace(modulename, module);
//krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").tqarg(modulename).tqarg(module->toString()) );
return module;
diff --git a/lib/kross/main/scriptaction.h b/lib/kross/main/scriptaction.h
index 27f910d0..4b78d611 100644
--- a/lib/kross/main/scriptaction.h
+++ b/lib/kross/main/scriptaction.h
@@ -174,7 +174,7 @@ namespace Kross { namespace Api {
/**
* This signal got emitted after the try to execute this
- * \a ScriptAction failed. The \p errormessage tqcontains
+ * \a ScriptAction failed. The \p errormessage contains
* the error message.
*/
void failed(const TQString& errormessage, const TQString& tracedetails);
diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp
index 5acde9db..a345dd02 100644
--- a/lib/kross/main/scriptcontainer.cpp
+++ b/lib/kross/main/scriptcontainer.cpp
@@ -151,7 +151,7 @@ TQMap<TQString, TQVariant>& ScriptContainer::getOptions()
TQVariant ScriptContainer::getOption(const TQString name, TQVariant defaultvalue, bool /*recursive*/)
{
- if(d->options.tqcontains(name))
+ if(d->options.contains(name))
return d->options[name];
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
return info ? info->getOptionValue(name, defaultvalue) : defaultvalue;
@@ -162,7 +162,7 @@ bool ScriptContainer::setOption(const TQString name, const TQVariant& value)
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
if(info) {
if(info->hasOption(name)) {
- d->options.tqreplace(name, value);
+ d->options.replace(name, value);
return true;
} else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").tqarg(name).tqarg(value.toString()) );
} else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").tqarg(name).tqarg(value.toString()) );
diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp
index 36d81151..ebcf0b00 100644
--- a/lib/kross/main/scriptguiclient.cpp
+++ b/lib/kross/main/scriptguiclient.cpp
@@ -82,11 +82,11 @@ ScriptGUIClient::ScriptGUIClient(KXMLGUIClient* guiclient, TQWidget* tqparent)
new KAction(i18n("Scripts Manager..."), 0, 0, this, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts");
// The predefined ScriptActionCollection's this ScriptGUIClient provides.
- d->collections.tqreplace("installedscripts",
+ d->collections.replace("installedscripts",
new ScriptActionCollection(i18n("Scripts"), actionCollection(), "installedscripts") );
- d->collections.tqreplace("loadedscripts",
+ d->collections.replace("loadedscripts",
new ScriptActionCollection(i18n("Loaded"), actionCollection(), "loadedscripts") );
- d->collections.tqreplace("executedscripts",
+ d->collections.replace("executedscripts",
new ScriptActionCollection(i18n("History"), actionCollection(), "executedscripts") );
reloadInstalledScripts();
@@ -102,7 +102,7 @@ ScriptGUIClient::~ScriptGUIClient()
bool ScriptGUIClient::hasActionCollection(const TQString& name)
{
- return d->collections.tqcontains(name);
+ return d->collections.contains(name);
}
ScriptActionCollection* ScriptGUIClient::getActionCollection(const TQString& name)
@@ -118,12 +118,12 @@ TQMap<TQString, ScriptActionCollection*> ScriptGUIClient::getActionCollections()
void ScriptGUIClient::addActionCollection(const TQString& name, ScriptActionCollection* collection)
{
removeActionCollection(name);
- d->collections.tqreplace(name, collection);
+ d->collections.replace(name, collection);
}
bool ScriptGUIClient::removeActionCollection(const TQString& name)
{
- if(d->collections.tqcontains(name)) {
+ if(d->collections.contains(name)) {
ScriptActionCollection* c = d->collections[name];
d->collections.remove(name);
delete c;