diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 16:20:48 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 16:20:48 -0600 |
commit | e63beeb5bdb82987b1e00bc35178667786fbad48 (patch) | |
tree | ab77b6ac830b7944d5d1eb9ce8f81feb8fdab948 /kjsembed/jsfactory_imp.cpp | |
parent | 67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff) | |
download | tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip |
Fix incorrect conversion
Diffstat (limited to 'kjsembed/jsfactory_imp.cpp')
-rw-r--r-- | kjsembed/jsfactory_imp.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kjsembed/jsfactory_imp.cpp b/kjsembed/jsfactory_imp.cpp index dd999610..e987d020 100644 --- a/kjsembed/jsfactory_imp.cpp +++ b/kjsembed/jsfactory_imp.cpp @@ -35,7 +35,7 @@ namespace KJSEmbed { namespace Bindings { -JSFactoryImp::JSFactoryImp( KJS::ExecState *exec, JSFactory *jsfact, int mid, const TTQString &p ) +JSFactoryImp::JSFactoryImp( KJS::ExecState *exec, JSFactory *jsfact, int mid, const TQString &p ) : JSProxyImp(exec), fact(jsfact), id(mid), param(p), defaultVal() { setName( KJS::Identifier(KJS::UString(param)) ); @@ -50,7 +50,7 @@ KJS::Object JSFactoryImp::construct( KJS::ExecState *exec, const KJS::List &args if ( id != NewInstance ) { kdDebug(80001) << "JSFactoryImp has no such constructor, id " << id << endl; - TTQString msg = i18n( "JSFactoryImp has no constructor with id '%1'." ).arg( id ); + TQString msg = i18n( "JSFactoryImp has no constructor with id '%1'." ).arg( id ); return throwError(exec, msg,KJS::ReferenceError); } @@ -71,8 +71,8 @@ KJS::Value JSFactoryImp::defaultValue( KJS::ExecState *exec, KJS::Type hint ) co KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - TTQString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() : TTQString::null; - TTQString arg1 = (args.size() > 1) ? args[1].toString(exec).qstring() : TTQString::null; + TQString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() : TQString::null; + TQString arg1 = (args.size() > 1) ? args[1].toString(exec).qstring() : TQString::null; kdDebug( 80001 ) << "JSFactoryImp::call() " << id << endl; KJS::Object err; @@ -81,20 +81,20 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ case MethodLoadUI: { JSObjectProxy *cproxy = JSProxy::toObjectProxy( args[1].imp() ); - TTQObject *cqo = cproxy ? cproxy->object() : 0; + TQObject *cqo = cproxy ? cproxy->object() : 0; JSObjectProxy *proxy = JSProxy::toObjectProxy( args[2].imp() ); - TTQWidget *qw = proxy ? proxy->widget() : 0; - TTQWidget *obj = fact->loadUI( arg0, cqo, qw, arg1.latin1() ); + TQWidget *qw = proxy ? proxy->widget() : 0; + TQWidget *obj = fact->loadUI( arg0, cqo, qw, arg1.latin1() ); if ( obj ) { KJS::Object parentObject = fact->createProxy( exec, obj ); // Add properties for child widgets. - const TTQObjectList *lst = obj->children(); + const TQObjectList *lst = obj->children(); if ( lst ) { - TTQObjectListIt it( *lst ); - TTQObject *child; + TQObjectListIt it( *lst ); + TQObject *child; while ( (child = it.current()) != 0 ) { publishChildren( child, parentObject); @@ -104,7 +104,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ return parentObject; } - TTQString msg = i18n( "Unable to create ui from file '%1'." ).arg(arg0); + TQString msg = i18n( "Unable to create ui from file '%1'." ).arg(arg0); err = throwError(exec, msg,KJS::ReferenceError); break; } @@ -112,8 +112,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ { kdDebug(80001) << "MethodCreateROPart called, args.size is " << args.size() << endl; - TTQObject *qo = 0; - TTQObject *ropart = 0; + TQObject *qo = 0; + TQObject *ropart = 0; if ( args.size() == 3 ) { JSObjectProxy *proxy = JSProxy::toObjectProxy( args[1].imp() ); @@ -128,7 +128,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ else if ( args.size() == 5 ) { JSObjectProxy *proxy = JSProxy::toObjectProxy( args[2].imp() ); qo = proxy ? proxy->object() : 0; - TTQStringList slist = extractTQStringList( exec, args, 4 ); + TQStringList slist = extractTQStringList( exec, args, 4 ); ropart = fact->createROPart( arg0, arg1, qo, args[3].toString(exec).ascii(), slist ); } @@ -141,7 +141,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ if ( ropart ) return fact->createProxy( exec, ropart ); - TTQString msg = i18n( "Unable to create read-only part for service '%1'." ).arg(arg0); + TQString msg = i18n( "Unable to create read-only part for service '%1'." ).arg(arg0); err = throwError(exec, msg,KJS::ReferenceError); break; } @@ -155,8 +155,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ { KJS::List l; - TTQStringList widgets = TTQWidgetFactory::widgets(); - for ( TTQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { + TQStringList widgets = TQWidgetFactory::widgets(); + for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { l.append( KJS::String( *it ) ); } @@ -186,8 +186,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ case MethodTypes: { KJS::List l; - TTQStringList types = fact->types(); - for ( TTQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { + TQStringList types = fact->types(); + for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { l.append( KJS::String( *it ) ); } @@ -203,8 +203,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ { kdDebug(80001) << "MethodCreateRWPart called, args.size is " << args.size() << endl; - TTQObject *qo = 0; - TTQObject *rwpart = 0; + TQObject *qo = 0; + TQObject *rwpart = 0; if ( args.size() == 3 ) { JSObjectProxy *proxy = JSProxy::toObjectProxy( args[1].imp() ); @@ -226,7 +226,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ if ( rwpart ) return fact->createProxy( exec, rwpart ); - TTQString msg = i18n( "Unable to create read-write part for service '%1'." ).arg(arg0); + TQString msg = i18n( "Unable to create read-write part for service '%1'." ).arg(arg0); err = throwError(exec, msg,KJS::ReferenceError); break; } @@ -245,7 +245,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ default: { kdWarning() << "JSBuiltInImp has no method " << id << endl; - TTQString msg = i18n( "JSFactoryImp has no method with id '%1'." ).arg( id ); + TQString msg = i18n( "JSFactoryImp has no method with id '%1'." ).arg( id ); err = throwError(exec, msg,KJS::ReferenceError); } } @@ -253,9 +253,9 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ } -void JSFactoryImp::publishChildren(TTQObject *obj, KJS::Object &parent) +void JSFactoryImp::publishChildren(TQObject *obj, KJS::Object &parent) { - TTQString name = obj->name(); + TQString name = obj->name(); name.remove(":"); name.remove(" "); name.remove("<"); @@ -264,9 +264,9 @@ void JSFactoryImp::publishChildren(TTQObject *obj, KJS::Object &parent) JSProxy::toProxy( newParent.imp() ) ->setOwner( JSProxy::JavaScript ); // Hack to publish TQToolBoxes children - TTQToolBox *box = dynamic_cast<TTQToolBox*>(obj); - TTQTabWidget *tab = dynamic_cast<TTQTabWidget*>(obj); - TTQWizard *wiz = dynamic_cast<TTQWizard*>(obj); + TQToolBox *box = dynamic_cast<TQToolBox*>(obj); + TQTabWidget *tab = dynamic_cast<TQTabWidget*>(obj); + TQWizard *wiz = dynamic_cast<TQWizard*>(obj); if( box ) { int count = box->count(); @@ -281,10 +281,10 @@ void JSFactoryImp::publishChildren(TTQObject *obj, KJS::Object &parent) for( int idx = 0; idx < count; ++idx) publishChildren(wiz->page(idx),newParent); } else { - const TTQObjectList *lst = obj->children(); + const TQObjectList *lst = obj->children(); if ( lst ) { - TTQObjectListIt it( *lst ); - TTQObject *child; + TQObjectListIt it( *lst ); + TQObject *child; while ( (child = it.current()) != 0 ) { publishChildren( child, newParent); ++it; |