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/kjsembedpart.cpp | |
parent | 67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff) | |
download | tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip |
Fix incorrect conversion
Diffstat (limited to 'kjsembed/kjsembedpart.cpp')
-rw-r--r-- | kjsembed/kjsembedpart.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kjsembed/kjsembedpart.cpp b/kjsembed/kjsembedpart.cpp index 9e47bc3b..b39b8813 100644 --- a/kjsembed/kjsembedpart.cpp +++ b/kjsembed/kjsembedpart.cpp @@ -89,7 +89,7 @@ namespace KJSEmbed { // KPart // -KJSEmbedPart::KJSEmbedPart( TTQObject *parent, const char *name ) +KJSEmbedPart::KJSEmbedPart( TQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ? name : "kjsembed_part" ), jsConsole(0), jsfactory(0), widgetparent(0), widgetname(name ? name : "kjsembed_part"), deletejs(false) @@ -99,7 +99,7 @@ KJSEmbedPart::KJSEmbedPart( TTQObject *parent, const char *name ) createActionClient(); } -KJSEmbedPart::KJSEmbedPart( TTQWidget *wparent, const char *wname, TTQObject *parent, const char *name ) +KJSEmbedPart::KJSEmbedPart( TQWidget *wparent, const char *wname, TQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ? name : (wname?wname:"jsembed_part") ), jsConsole(0), jsfactory(0), widgetparent(wparent), widgetname(wname), deletejs(false) @@ -109,8 +109,8 @@ KJSEmbedPart::KJSEmbedPart( TTQWidget *wparent, const char *wname, TTQObject *pa createActionClient(); } -KJSEmbedPart::KJSEmbedPart( KJS::Interpreter *jsi, TTQWidget *wparent, const char *wname, - TTQObject *parent, const char *name ) +KJSEmbedPart::KJSEmbedPart( KJS::Interpreter *jsi, TQWidget *wparent, const char *wname, + TQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ? name : (wname?wname:"jsembed_part") ), jsConsole(0), jsfactory(0), builtins(0), widgetparent(wparent), widgetname(wname), js(jsi), deletejs(false) @@ -161,7 +161,7 @@ JSConsoleWidget *KJSEmbedPart::view() { #ifndef QT_ONLY if ( !jsConsole ) { - TTQCString name = widgetname ? widgetname : TTQCString("jsembed_console"); + TQCString name = widgetname ? widgetname : TQCString("jsembed_console"); jsConsole = new JSConsoleWidget( this, widgetparent, name ); setWidget( jsConsole ); jsfactory->addType( jsConsole->className() ); @@ -171,9 +171,9 @@ JSConsoleWidget *KJSEmbedPart::view() return 0L; } -TTQStringList KJSEmbedPart::constructorNames() const +TQStringList KJSEmbedPart::constructorNames() const { - TTQStringList classes; + TQStringList classes; KJS::List cons = constructorList(); KJS::ListIterator it = cons.begin(); @@ -224,9 +224,9 @@ KJS::List KJSEmbedPart::constructorList() const // Version information // -TTQCString KJSEmbedPart::versionString() const +TQCString KJSEmbedPart::versionString() const { - return TTQCString(KJSEMBED_VERSION_STRING); + return TQCString(KJSEMBED_VERSION_STRING); } int KJSEmbedPart::versionMajor() const @@ -243,7 +243,7 @@ int KJSEmbedPart::versionMinor() const // Execute a JS script. // -KJS::Value KJSEmbedPart::evaluate( const TTQString &script, const KJS::Value &self ) +KJS::Value KJSEmbedPart::evaluate( const TQString &script, const KJS::Value &self ) { if ( execute( res, script, self ) ) return res.value(); @@ -251,12 +251,12 @@ KJS::Value KJSEmbedPart::evaluate( const TTQString &script, const KJS::Value &se return KJS::Null(); } -bool KJSEmbedPart::execute( const TTQString &script, const KJS::Value &self ) +bool KJSEmbedPart::execute( const TQString &script, const KJS::Value &self ) { return execute( res, script, self ); } -bool KJSEmbedPart::execute( KJS::Completion &result, const TTQString &script, const KJS::Value &self ) +bool KJSEmbedPart::execute( KJS::Completion &result, const TQString &script, const KJS::Value &self ) { KJS::Value val( self ); result = js->evaluate( script, self.isNull() ? partobj : val ); @@ -269,13 +269,13 @@ bool KJSEmbedPart::openURL( const KURL &url ) // kdDebug(80001) << "KJSEmbedPart: openURL '" << url.url() << "' is javascript" << endl; #ifndef QT_ONLY - TTQString cmd = url.url(); + TQString cmd = url.url(); #else - TTQString cmd = url.toString(); + TQString cmd = url.toString(); #endif - TTQString js( "javascript:" ); - cmd = cmd.replace( 0, js.length(), TTQString("") ); + TQString js( "javascript:" ); + cmd = cmd.replace( 0, js.length(), TQString("") ); // kdDebug(80001) << "KJSEmbedPart: JS command is '" << cmd << "'" << endl; return execute( cmd ); @@ -287,14 +287,14 @@ bool KJSEmbedPart::openURL( const KURL &url ) // Invoke a script file. // -bool KJSEmbedPart::runFile( const TTQString &name, const KJS::Value &self ) +bool KJSEmbedPart::runFile( const TQString &name, const KJS::Value &self ) { kdDebug(80001) << "KJSEmbedPart::runFile(): file is '" << name << "'" << endl; - TTQString script = loadFile( name ); + TQString script = loadFile( name ); return execute( script, self ); } -bool KJSEmbedPart::loadActionSet( const TTQString &file ) +bool KJSEmbedPart::loadActionSet( const TQString &file ) { #ifndef QT_ONLY return xmlclient->load( file ); @@ -304,23 +304,23 @@ bool KJSEmbedPart::loadActionSet( const TTQString &file ) #endif // QT_ONLY } -TTQString KJSEmbedPart::loadFile( const TTQString &src ) +TQString KJSEmbedPart::loadFile( const TQString &src ) { - TTQString script; + TQString script; if ( src == "-" ) { - TTQTextStream ts( stdin, IO_ReadOnly ); + TQTextStream ts( stdin, IO_ReadOnly ); script = ts.read(); } else { - TTQFile file( src ); + TQFile file( src ); if ( file.open( IO_ReadOnly ) ) { - script = TTQString( file.readAll() ); + script = TQString( file.readAll() ); } else { kdWarning() << "Could not open file '" << src << "', " << strerror( errno ) << endl; - return TTQString::null; + return TQString::null; } } @@ -337,14 +337,14 @@ TTQString KJSEmbedPart::loadFile( const TTQString &src ) // Publishing objects. // -KJS::Object KJSEmbedPart::bind( TTQObject *obj ) +KJS::Object KJSEmbedPart::bind( TQObject *obj ) { KJS::Object jsobj = jsfactory->createProxy( js->globalExec(), obj ); JSProxy::toObjectProxy(jsobj.imp() )->setOwner(JSProxy::Native); return jsobj; } -KJS::Object KJSEmbedPart::addObject( TTQObject *obj, KJS::Object &parent, const char *name ) +KJS::Object KJSEmbedPart::addObject( TQObject *obj, KJS::Object &parent, const char *name ) { KJS::Object jsobj = bind( obj ); parent.put( js->globalExec(), name ? name : obj->name(), jsobj ); @@ -352,7 +352,7 @@ KJS::Object KJSEmbedPart::addObject( TTQObject *obj, KJS::Object &parent, const return jsobj; } -KJS::Object KJSEmbedPart::addObject( TTQObject *obj, const char *name ) +KJS::Object KJSEmbedPart::addObject( TQObject *obj, const char *name ) { return addObject( obj, js->globalObject(), name ); } @@ -362,10 +362,10 @@ void KJSEmbedPart::virtual_hook( int /*id*/, void * /*data*/ ) } -static KJS::Object scopeWalker( KJS::ExecState *exec, const KJS::Object &root, const TTQString &objectString ) +static KJS::Object scopeWalker( KJS::ExecState *exec, const KJS::Object &root, const TQString &objectString ) { KJS::Object returnObject = root; - TTQStringList objects = TTQStringList::split(".", objectString); + TQStringList objects = TQStringList::split(".", objectString); for( uint idx = 0; idx < objects.count(); ++idx) { KJS::Identifier id = KJS::Identifier( KJS::UString( objects[idx] )); @@ -376,7 +376,7 @@ static KJS::Object scopeWalker( KJS::ExecState *exec, const KJS::Object &root, c return returnObject; } -KJS::Value KJSEmbedPart::callMethod( const TTQString & methodName, const KJS::List & args ) const +KJS::Value KJSEmbedPart::callMethod( const TQString & methodName, const KJS::List & args ) const { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(methodName.latin1() )); @@ -406,7 +406,7 @@ KJS::Value KJSEmbedPart::callMethod( const TTQString & methodName, const KJS::Li return retValue; } -KJS::Value KJSEmbedPart::getValue( const TTQString & valueName ) const +KJS::Value KJSEmbedPart::getValue( const TQString & valueName ) const { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(valueName.latin1() )); @@ -414,7 +414,7 @@ KJS::Value KJSEmbedPart::getValue( const TTQString & valueName ) const return obj.get(exec, id ); } -void KJSEmbedPart::putValue( const TTQString & valueName, const KJS::Value & value ) +void KJSEmbedPart::putValue( const TQString & valueName, const KJS::Value & value ) { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(valueName.latin1() )); @@ -422,18 +422,18 @@ void KJSEmbedPart::putValue( const TTQString & valueName, const KJS::Value & val obj.put(exec, id, value); } -void KJSEmbedPart::putVariant( const TTQString & valueName, const TTQVariant & value ) +void KJSEmbedPart::putVariant( const TQString & valueName, const TQVariant & value ) { KJS::Value val = convertToValue( js->globalExec(), value); putValue( valueName, val ); } -TTQVariant KJSEmbedPart::getVariant( const TTQString & valueName ) const +TQVariant KJSEmbedPart::getVariant( const TQString & valueName ) const { return convertToVariant( js->globalExec(), getValue( valueName ) ); } -bool KJSEmbedPart::hasMethod( const TTQString & methodName ) +bool KJSEmbedPart::hasMethod( const TQString & methodName ) { KJS::ExecState *exec = js->globalExec(); KJS::Identifier id = KJS::Identifier( KJS::UString(methodName.latin1() )); |