diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /kate/kjswrapper/bindings.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/kjswrapper/bindings.cpp')
-rw-r--r-- | kate/kjswrapper/bindings.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kate/kjswrapper/bindings.cpp b/kate/kjswrapper/bindings.cpp index fcb8d38..1bb56eb 100644 --- a/kate/kjswrapper/bindings.cpp +++ b/kate/kjswrapper/bindings.cpp @@ -1,7 +1,7 @@ #include "bindings.h" #include "bindings.moc" #include "plugin_katekjswrapper.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdebug.h> #include <kate/documentmanager.h> #include <kate/document.h> @@ -17,7 +17,7 @@ using namespace Kate::JS; -Bindings::Bindings(QObject *parent): KJSEmbed::Bindings::JSBindingPlugin(parent,"KateAppBindings",QStringList()) { +Bindings::Bindings(TQObject *parent): KJSEmbed::Bindings::JSBindingPlugin(parent,"KateAppBindings",TQStringList()) { } Bindings::~Bindings() { @@ -86,30 +86,30 @@ DocumentManager::~DocumentManager() { } KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QObject *o=m_proxy->object(); + TQObject *o=m_proxy->object(); Kate::DocumentManager *dm=dynamic_cast<Kate::DocumentManager*>(o); if (!dm) { kdWarning()<<"Object died"<<endl; - QString msg = i18n("Call of DocumentManager member on destroyed object"); + TQString msg = i18n("Call of DocumentManager member on destroyed object"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); } - QString mdesc; + TQString mdesc; switch (m_id) { case Document: { mdesc="document(int)"; if (args.size()!=1) break; uint index=args[0].toUInt32(exec); if (exec->hadException()) break; - QObject *doc=dynamic_cast<QObject*>(dm->document(index)); + TQObject *doc=dynamic_cast<TQObject*>(dm->document(index)); if (!doc) return KJS::Null(); return m_dict->jsObject(exec,doc,m_proxy); } break; case ActiveDocument: { mdesc="activeDocument()"; if (args.size()!=0) break; - QObject *doc=dynamic_cast<QObject*>(dm->activeDocument()); + TQObject *doc=dynamic_cast<TQObject*>(dm->activeDocument()); if (!doc) return KJS::Null(); return m_dict->jsObject(exec,doc,m_proxy); } break; @@ -118,21 +118,21 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const if (args.size()!=1) break; uint id=args[0].toUInt32(exec); if (exec->hadException()) break; - QObject *doc=dynamic_cast<QObject*>(dm->documentWithID(id)); + TQObject *doc=dynamic_cast<TQObject*>(dm->documentWithID(id)); if (!doc) return KJS::Null(); return m_dict->jsObject(exec,doc,m_proxy); } break; case FindDocument: { mdesc="documentForURL(KURL)"; if (args.size()!=1) break; - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; return KJS::Number(dm->findDocument(url)); } break; case IsOpen: { mdesc="isOpen(KURL)"; if (args.size()!=0) break; - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; return KJS::Boolean(dm->isOpen(url));} @@ -141,14 +141,14 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const mdesc="openURL(KURL[,String encoding])"; uint docID; if (args.size()==1) { - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; - (void)dm->openURL(url,QString::null,&docID); + (void)dm->openURL(url,TQString::null,&docID); return KJS::Number(docID); } else if (args.size()==2) { - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; - QString encoding=QString( args[1].toString(exec).qstring() ); + TQString encoding=TQString( args[1].toString(exec).qstring() ); (void)dm->openURL(url,encoding,&docID); return KJS::Number(docID); } @@ -164,7 +164,7 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const if (args.size()!=1) break; KJSEmbed::JSObjectProxy *proxy = KJSEmbed::JSProxy::toObjectProxy( args[0].imp() ); if (!proxy) break; - QObject *tmp=proxy->object(); + TQObject *tmp=proxy->object(); Kate::Document *tmpdoc=dynamic_cast<Kate::Document*>(tmp); if (!tmpdoc) break; return KJS::Boolean(dm->closeDocument(tmpdoc)); } @@ -178,7 +178,7 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const kdDebug()<<"calling illegal method of DocumentManager"<<endl; return KJS::Null(); } - QString msg = i18n("Method %1 called with wrong signature").arg(mdesc); + TQString msg = i18n("Method %1 called with wrong signature").arg(mdesc); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -194,7 +194,7 @@ Kate::JS::Management::Management(KJS::ExecState *exec, int id, PluginKateKJSWrap KJS::Value Kate::JS::Management::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { if (m_id==AddConfigPage) { if (args.size()!=1) { - QString msg = i18n("One parameter expected"); + TQString msg = i18n("One parameter expected"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -204,7 +204,7 @@ KJS::Value Kate::JS::Management::call( KJS::ExecState *exec, KJS::Object &self, #warning implement me } else if (m_id==SetConfigPages) { if (args.size()>1) { - QString msg=i18n("One or no parameter expected"); + TQString msg=i18n("One or no parameter expected"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -212,7 +212,7 @@ KJS::Value Kate::JS::Management::call( KJS::ExecState *exec, KJS::Object &self, m_wrapper->m_configPageFactories=(args.size()>0)?args[0]:KJS::Value(); } else if (m_id==SetWindowConfiguration) { if (args.size()>3) { - QString msg = i18n("A maximum of three parameters expected"); + TQString msg = i18n("A maximum of three parameters expected"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -273,16 +273,16 @@ Kate::JS::Application::~Application() { } KJS::Value Kate::JS::Application::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QObject *o=m_proxy->object(); + TQObject *o=m_proxy->object(); Kate::Application *ka=dynamic_cast<Kate::Application*>(o); if (!ka) { kdWarning()<<"Object died"<<endl; - QString msg = i18n("Call of KATE member on destroyed object"); + TQString msg = i18n("Call of KATE member on destroyed object"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); } - QString mdesc; + TQString mdesc; switch (m_id) { case WindowCount: { mdesc="windowCount()"; @@ -310,7 +310,7 @@ KJS::Value Kate::JS::Application::call( KJS::ExecState *exec, KJS::Object &self, } - QString msg = i18n("Method %1 called with wrong signature").arg(mdesc); + TQString msg = i18n("Method %1 called with wrong signature").arg(mdesc); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -373,7 +373,7 @@ KJS::Value Kate::JS::General::fieldz(KJS::ExecState *exec, KJS::Object &obj, con } -Kate::JS::RefCountedObjectDict::RefCountedObjectDict(int size): QObject(), QPtrDict<ObjectEntry>(size) { +Kate::JS::RefCountedObjectDict::RefCountedObjectDict(int size): TQObject(), TQPtrDict<ObjectEntry>(size) { m_usageCount=0; setAutoDelete(true); } @@ -389,12 +389,12 @@ void Kate::JS::RefCountedObjectDict::decRef() { } -KJS::Object Kate::JS::RefCountedObjectDict::jsObject(KJS::ExecState *exec, QObject *obj, KJSEmbed::JSObjectProxy *proxy) { +KJS::Object Kate::JS::RefCountedObjectDict::jsObject(KJS::ExecState *exec, TQObject *obj, KJSEmbed::JSObjectProxy *proxy) { ObjectEntry *oe=find(obj); if (oe==0) { oe=new ObjectEntry; oe->obj=proxy->part()->factory()->createProxy(exec,obj,proxy); - connect(obj,SIGNAL(destroyed()),this,SLOT(removeSender())); + connect(obj,TQT_SIGNAL(destroyed()),this,TQT_SLOT(removeSender())); insert(obj,oe); return oe->obj; } else return oe->obj; @@ -438,16 +438,16 @@ Kate::JS::MainWindow::~MainWindow() { } KJS::Value Kate::JS::MainWindow::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QObject *o=m_proxy->object(); + TQObject *o=m_proxy->object(); Kate::MainWindow *mw=dynamic_cast<Kate::MainWindow*>(o); if (!mw) { kdWarning()<<"Object died"<<endl; - QString msg = i18n("Call of MainWindow member on destroyed object"); + TQString msg = i18n("Call of MainWindow member on destroyed object"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); } - QString mdesc; + TQString mdesc; switch (m_id) { case ActionCollection: { mdesc="actionCollection()"; @@ -458,7 +458,7 @@ KJS::Value Kate::JS::MainWindow::call( KJS::ExecState *exec, KJS::Object &self, default: return KJS::Undefined(); } - QString msg = i18n("Method %1 called with wrong signature").arg(mdesc); + TQString msg = i18n("Method %1 called with wrong signature").arg(mdesc); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); |