summaryrefslogtreecommitdiffstats
path: root/khtml/java
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /khtml/java
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/java')
-rw-r--r--khtml/java/kjavaapplet.cpp62
-rw-r--r--khtml/java/kjavaapplet.h68
-rw-r--r--khtml/java/kjavaappletcontext.cpp60
-rw-r--r--khtml/java/kjavaappletcontext.h18
-rw-r--r--khtml/java/kjavaappletserver.cpp268
-rw-r--r--khtml/java/kjavaappletserver.h40
-rw-r--r--khtml/java/kjavaappletviewer.cpp220
-rw-r--r--khtml/java/kjavaappletviewer.h46
-rw-r--r--khtml/java/kjavaappletwidget.cpp28
-rw-r--r--khtml/java/kjavaappletwidget.h12
-rw-r--r--khtml/java/kjavadownloader.cpp50
-rw-r--r--khtml/java/kjavadownloader.h16
-rw-r--r--khtml/java/kjavaprocess.cpp104
-rw-r--r--khtml/java/kjavaprocess.h28
-rw-r--r--khtml/java/kqeventutil.cpp116
-rw-r--r--khtml/java/kqeventutil.h4
-rw-r--r--khtml/java/kxeventutil.cpp96
-rw-r--r--khtml/java/kxeventutil.h40
-rw-r--r--khtml/java/tests/testkjavaappletserver.cpp4
19 files changed, 640 insertions, 640 deletions
diff --git a/khtml/java/kjavaapplet.cpp b/khtml/java/kjavaapplet.cpp
index 2269bc756..879c8624e 100644
--- a/khtml/java/kjavaapplet.cpp
+++ b/khtml/java/kjavaapplet.cpp
@@ -32,13 +32,13 @@ class KJavaAppletPrivate
{
public:
bool reallyExists;
- QString className;
- QString appName;
- QString baseURL;
- QString codeBase;
- QString archives;
- QSize size;
- QString windowName;
+ TQString className;
+ TQString appName;
+ TQString baseURL;
+ TQString codeBase;
+ TQString archives;
+ TQSize size;
+ TQString windowName;
KJavaApplet::AppletState state;
bool failed;
@@ -81,67 +81,67 @@ void KJavaApplet::setAppletContext( KJavaAppletContext* _context )
context->registerApplet( this );
}
-void KJavaApplet::setAppletClass( const QString& _className )
+void KJavaApplet::setAppletClass( const TQString& _className )
{
d->className = _className;
}
-QString& KJavaApplet::appletClass()
+TQString& KJavaApplet::appletClass()
{
return d->className;
}
-QString& KJavaApplet::parameter( const QString& name )
+TQString& KJavaApplet::parameter( const TQString& name )
{
return params[ name ];
}
-void KJavaApplet::setParameter( const QString& name, const QString& value )
+void KJavaApplet::setParameter( const TQString& name, const TQString& value )
{
params.insert( name, value );
}
-QMap<QString,QString>& KJavaApplet::getParams()
+TQMap<TQString,TQString>& KJavaApplet::getParams()
{
return params;
}
-void KJavaApplet::setBaseURL( const QString& baseURL )
+void KJavaApplet::setBaseURL( const TQString& baseURL )
{
d->baseURL = baseURL;
}
-QString& KJavaApplet::baseURL()
+TQString& KJavaApplet::baseURL()
{
return d->baseURL;
}
-void KJavaApplet::setCodeBase( const QString& codeBase )
+void KJavaApplet::setCodeBase( const TQString& codeBase )
{
d->codeBase = codeBase;
}
-QString& KJavaApplet::codeBase()
+TQString& KJavaApplet::codeBase()
{
return d->codeBase;
}
-void KJavaApplet::setSize( QSize size )
+void KJavaApplet::setSize( TQSize size )
{
d->size = size;
}
-QSize KJavaApplet::size()
+TQSize KJavaApplet::size()
{
return d->size;
}
-void KJavaApplet::setArchives( const QString& _archives )
+void KJavaApplet::setArchives( const TQString& _archives )
{
d->archives = _archives;
}
-QString& KJavaApplet::archives()
+TQString& KJavaApplet::archives()
{
return d->archives;
}
@@ -150,30 +150,30 @@ void KJavaApplet::resizeAppletWidget( int width, int height )
{
kdDebug(6100) << "KJavaApplet, id = " << id << ", ::resizeAppletWidget to " << width << ", " << height << endl;
- QStringList sl;
- sl.push_back( QString::number( 0 ) ); // applet itself has id 0
- sl.push_back( QString( "eval" ) ); // evaluate next script
- sl.push_back( QString::number( KParts::LiveConnectExtension::TypeString ) );
- sl.push_back( QString( "this.setAttribute('WIDTH',%1);this.setAttribute('HEIGHT',%2)" ).arg( width ).arg( height ) );
+ TQStringList sl;
+ sl.push_back( TQString::number( 0 ) ); // applet itself has id 0
+ sl.push_back( TQString( "eval" ) ); // evaluate next script
+ sl.push_back( TQString::number( KParts::LiveConnectExtension::TypeString ) );
+ sl.push_back( TQString( "this.setAttribute('WIDTH',%1);this.setAttribute('HEIGHT',%2)" ).arg( width ).arg( height ) );
jsData( sl );
}
-void KJavaApplet::setAppletName( const QString& name )
+void KJavaApplet::setAppletName( const TQString& name )
{
d->appName = name;
}
-void KJavaApplet::setWindowName( const QString& title )
+void KJavaApplet::setWindowName( const TQString& title )
{
d->windowName = title;
}
-QString& KJavaApplet::getWindowName()
+TQString& KJavaApplet::getWindowName()
{
return d->windowName;
}
-QString& KJavaApplet::appletName()
+TQString& KJavaApplet::appletName()
{
return d->appName;
}
@@ -259,8 +259,8 @@ void KJavaApplet::stateChange( const int newStateInt ) {
}
}
-void KJavaApplet::showStatus(const QString &msg) {
- QStringList args;
+void KJavaApplet::showStatus(const TQString &msg) {
+ TQStringList args;
args << msg;
context->processCmd("showstatus", args);
}
diff --git a/khtml/java/kjavaapplet.h b/khtml/java/kjavaapplet.h
index abde99927..6fe0f7709 100644
--- a/khtml/java/kjavaapplet.h
+++ b/khtml/java/kjavaapplet.h
@@ -26,9 +26,9 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
/**
* @short A Java applet
@@ -74,90 +74,90 @@ public:
/**
* Specify the name of the class file to run. For example 'Lake.class'.
*/
- void setAppletClass( const QString& clazzName );
+ void setAppletClass( const TQString& clazzName );
/**
* Get the name of the Class file the applet should run
*/
- QString& appletClass();
+ TQString& appletClass();
/**
* Set the URL of the document embedding the applet.
*/
- void setBaseURL( const QString& base );
+ void setBaseURL( const TQString& base );
/**
* get the Base URL of the document embedding the applet
*/
- QString& baseURL();
+ TQString& baseURL();
/**
* Set the codebase of the applet classes.
*/
- void setCodeBase( const QString& codeBase );
+ void setCodeBase( const TQString& codeBase );
/**
* Get the codebase of the applet classes
*/
- QString& codeBase();
+ TQString& codeBase();
/**
* Set the list of archives at the Applet's codebase to search in for
* class files and other resources
*/
- void setArchives( const QString& _archives );
+ void setArchives( const TQString& _archives );
/**
* Get the list of Archives that should be searched for class files
* and other resources
*/
- QString& archives();
+ TQString& archives();
/**
* Set the name the applet should be called in its context
*/
- void setAppletName( const QString& name );
+ void setAppletName( const TQString& name );
/**
* Get the name the applet should be called in its context
*/
- QString& appletName();
+ TQString& appletName();
/**
* Set the size of the applet
*/
- void setSize( QSize size );
+ void setSize( TQSize size );
/**
* Get the size of the applet
*/
- QSize size();
+ TQSize size();
/**
* Specify a parameter to be passed to the applet.
*/
- void setParameter( const QString& name, const QString& value );
+ void setParameter( const TQString& name, const TQString& value );
/**
* Look up the parameter value for the given Parameter. Returns
- * QString::null if the name has not been set.
+ * TQString::null if the name has not been set.
*/
- QString& parameter( const QString& name );
+ TQString& parameter( const TQString& name );
/**
* Get a reference to the Paramaters and their values
*/
- QMap<QString,QString>& getParams();
+ TQMap<TQString,TQString>& getParams();
/**
* Set the window title for swallowing
*/
- void setWindowName( const QString& title );
+ void setWindowName( const TQString& title );
/**
* Get the window title this applet should use
*/
- QString& getWindowName();
+ TQString& getWindowName();
/**
* Interface for applets to resize themselves
@@ -206,20 +206,20 @@ public:
/**
* Get/Set the user name
*/
- void setUser(const QString & _user) { username = _user; }
- const QString & user () const { return username; }
+ void setUser(const TQString & _user) { username = _user; }
+ const TQString & user () const { return username; }
/**
* Get/Set the user password
*/
- void setPassword(const QString & _password) { userpassword = _password; }
- const QString & password () const { return userpassword; }
+ void setPassword(const TQString & _password) { userpassword = _password; }
+ const TQString & password () const { return userpassword; }
/**
* Get/Set the auth name
*/
- void setAuthName(const QString & _auth) { authname = _auth; }
- const QString & authName () const { return authname; }
+ void setAuthName(const TQString & _auth) { authname = _auth; }
+ const TQString & authName () const { return authname; }
/**
* called from the protocol engine
@@ -234,18 +234,18 @@ public:
/**
* JavaScript coming from Java
**/
- void jsData (const QStringList & args) { emit jsEvent (args); }
+ void jsData (const TQStringList & args) { emit jsEvent (args); }
signals:
- void jsEvent (const QStringList & args);
+ void jsEvent (const TQStringList & args);
private:
- void showStatus( const QString &msg);
+ void showStatus( const TQString &msg);
KJavaAppletPrivate* d;
- QMap<QString, QString> params;
+ TQMap<TQString, TQString> params;
KJavaAppletContext* context;
int id;
- QString username;
- QString userpassword;
- QString authname;
+ TQString username;
+ TQString userpassword;
+ TQString authname;
};
#endif // KJAVAAPPLET_H
diff --git a/khtml/java/kjavaappletcontext.cpp b/khtml/java/kjavaappletcontext.cpp
index 94e17ff72..76914a5dc 100644
--- a/khtml/java/kjavaappletcontext.cpp
+++ b/khtml/java/kjavaappletcontext.cpp
@@ -26,15 +26,15 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
// This file was using 6002, but kdebug.areas didn't know about that number
#define DEBUGAREA 6100
-typedef QMap< int, QGuardedPtr<KJavaApplet> > AppletMap;
+typedef TQMap< int, TQGuardedPtr<KJavaApplet> > AppletMap;
// For future expansion
class KJavaAppletContextPrivate
@@ -50,11 +50,11 @@ int KJavaAppletContext::contextCount = 0;
/* Class Implementation
*/
KJavaAppletContext::KJavaAppletContext()
- : QObject()
+ : TQObject()
{
d = new KJavaAppletContextPrivate;
server = KJavaAppletServer::allocateJavaServer();
- connect(server->javaProcess(), SIGNAL(exited(int)), this, SLOT(javaProcessExited(int)));
+ connect(server->javaProcess(), TQT_SIGNAL(exited(int)), this, TQT_SLOT(javaProcessExited(int)));
id = contextCount;
server->createContext( id, this );
@@ -128,37 +128,37 @@ void KJavaAppletContext::stop( KJavaApplet* applet )
server->stopApplet( id, applet->appletId() );
}
-void KJavaAppletContext::processCmd( QString cmd, QStringList args )
+void KJavaAppletContext::processCmd( TQString cmd, TQStringList args )
{
received( cmd, args );
}
-void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
+void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg )
{
kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl;
kdDebug(6100) << "arg count = " << arg.count() << endl;
- if ( cmd == QString::fromLatin1("showstatus")
+ if ( cmd == TQString::fromLatin1("showstatus")
&& !arg.empty() )
{
- QString tmp = arg.first();
- tmp.replace(QRegExp("[\n\r]"), "");
+ TQString tmp = arg.first();
+ tmp.replace(TQRegExp("[\n\r]"), "");
kdDebug(6100) << "status message = " << tmp << endl;
emit showStatus( tmp );
}
- else if ( cmd == QString::fromLatin1( "showurlinframe" )
+ else if ( cmd == TQString::fromLatin1( "showurlinframe" )
&& arg.count() > 1 )
{
kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl;
emit showDocument( arg[0], arg[1] );
}
- else if ( cmd == QString::fromLatin1( "showdocument" )
+ else if ( cmd == TQString::fromLatin1( "showdocument" )
&& !arg.empty() )
{
kdDebug(6100) << "url = " << arg.first() << endl;
emit showDocument( arg.first(), "_top" );
}
- else if ( cmd == QString::fromLatin1( "resizeapplet" )
+ else if ( cmd == TQString::fromLatin1( "resizeapplet" )
&& arg.count() > 2 )
{
//arg[1] should be appletID
@@ -180,10 +180,10 @@ void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
tmp->resizeAppletWidget( width, height );
}
}
- else if (cmd.startsWith(QString::fromLatin1("audioclip_"))) {
+ else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) {
kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl;
}
- else if ( cmd == QString::fromLatin1( "JS_Event" )
+ else if ( cmd == TQString::fromLatin1( "JS_Event" )
&& arg.count() > 2 )
{
bool ok;
@@ -191,14 +191,14 @@ void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
KJavaApplet * applet;
if (ok && (applet = d->applets[appletID]))
{
- QStringList js_args(arg);
+ TQStringList js_args(arg);
js_args.pop_front();
applet->jsData(js_args);
}
else
kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl;
}
- else if ( cmd == QString::fromLatin1( "AppletStateNotification" ) )
+ else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) )
{
bool ok;
const int appletID = arg.first().toInt(&ok);
@@ -222,15 +222,15 @@ void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
} else
kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl;
}
- else if ( cmd == QString::fromLatin1( "AppletFailed" ) ) {
+ else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) {
bool ok;
const int appletID = arg.first().toInt(&ok);
if (ok)
{
KJavaApplet* const applet = d->applets[appletID];
/*
- QString errorDetail(arg[1]);
- errorDetail.replace(QRegExp(":\\s*"), ":\n");
+ TQString errorDetail(arg[1]);
+ errorDetail.replace(TQRegExp(":\\s*"), ":\n");
KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail);
*/
if (applet)
@@ -251,23 +251,23 @@ void KJavaAppletContext::javaProcessExited(int) {
}
}
-bool KJavaAppletContext::getMember(QStringList & args, QStringList & ret_args) {
- args.push_front( QString::number(id) );
+bool KJavaAppletContext::getMember(TQStringList & args, TQStringList & ret_args) {
+ args.push_front( TQString::number(id) );
return server->getMember( args, ret_args );
}
-bool KJavaAppletContext::putMember( QStringList & args ) {
- args.push_front( QString::number(id) );
+bool KJavaAppletContext::putMember( TQStringList & args ) {
+ args.push_front( TQString::number(id) );
return server->putMember( args );
}
-bool KJavaAppletContext::callMember(QStringList & args, QStringList &ret_args) {
- args.push_front( QString::number(id) );
+bool KJavaAppletContext::callMember(TQStringList & args, TQStringList &ret_args) {
+ args.push_front( TQString::number(id) );
return server->callMember( args, ret_args );
}
-void KJavaAppletContext::derefObject( QStringList & args ) {
- args.push_front( QString::number(id) );
+void KJavaAppletContext::derefObject( TQStringList & args ) {
+ args.push_front( TQString::number(id) );
server->derefObject( args );
}
diff --git a/khtml/java/kjavaappletcontext.h b/khtml/java/kjavaappletcontext.h
index 06e5aafc7..ca851a42e 100644
--- a/khtml/java/kjavaappletcontext.h
+++ b/khtml/java/kjavaappletcontext.h
@@ -24,7 +24,7 @@
#ifndef KJAVAAPPLETCONTEXT_H
#define KJAVAAPPLETCONTEXT_H
-#include <qobject.h>
+#include <tqobject.h>
/**
* @short Provides a context for KJavaAppletWidgets
@@ -94,27 +94,27 @@ public:
* use this for applet call backs, the AppletServer
* calls this directly.
*/
- void processCmd( QString cmd, QStringList args );
+ void processCmd( TQString cmd, TQStringList args );
/**
* LiveConnect functions
*/
- bool getMember(QStringList & args, QStringList & ret_args);
- bool putMember(QStringList & args);
- bool callMember(QStringList & args, QStringList & ret_args);
- void derefObject(QStringList & args);
+ bool getMember(TQStringList & args, TQStringList & ret_args);
+ bool putMember(TQStringList & args);
+ bool callMember(TQStringList & args, TQStringList & ret_args);
+ void derefObject(TQStringList & args);
KJavaAppletServer* getServer() const { return server; }
signals:
/**
* Signals the KHMTL Part to show this as the status message.
*/
- void showStatus ( const QString& txt );
+ void showStatus ( const TQString& txt );
/**
* Signals the KHTML Part to show a url in a given target
*/
- void showDocument( const QString& url, const QString& target );
+ void showDocument( const TQString& url, const TQString& target );
/**
* Signals the KHTML Part an applet is loaded
@@ -129,7 +129,7 @@ protected:
KJavaAppletServer* server;
protected slots:
- void received( const QString& cmd, const QStringList& arg );
+ void received( const TQString& cmd, const TQStringList& arg );
void javaProcessExited(int);
private:
diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp
index e766dcb5b..59d0517a2 100644
--- a/khtml/java/kjavaappletserver.cpp
+++ b/khtml/java/kjavaappletserver.cpp
@@ -38,18 +38,18 @@
#include <ksslcertchain.h>
#include <kssl.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <stdlib.h>
#include <assert.h>
@@ -87,12 +87,12 @@
class JSStackFrame;
-typedef QMap< int, KJavaKIOJob* > KIOJobMap;
-typedef QMap< int, JSStackFrame* > JSStack;
+typedef TQMap< int, KJavaKIOJob* > KIOJobMap;
+typedef TQMap< int, JSStackFrame* > JSStack;
class JSStackFrame {
public:
- JSStackFrame(JSStack & stack, QStringList & a)
+ JSStackFrame(JSStack & stack, TQStringList & a)
: jsstack(stack), args(a), ticket(counter++), ready(false), exit (false) {
jsstack.insert( ticket, this );
}
@@ -100,7 +100,7 @@ public:
jsstack.erase( ticket );
}
JSStack & jsstack;
- QStringList & args;
+ TQStringList & args;
int ticket;
bool ready : 1;
bool exit : 1;
@@ -118,15 +118,15 @@ private:
delete kssl;
}
int counter;
- QMap< int, QGuardedPtr<KJavaAppletContext> > contexts;
- QString appletLabel;
+ TQMap< int, TQGuardedPtr<KJavaAppletContext> > contexts;
+ TQString appletLabel;
JSStack jsstack;
KIOJobMap kiojobs;
bool javaProcessFailed;
bool useKIO;
KSSL * kssl;
//int locked_context;
- //QValueList<QByteArray> java_requests;
+ //TQValueList<TQByteArray> java_requests;
};
static KJavaAppletServer* self = 0;
@@ -136,8 +136,8 @@ KJavaAppletServer::KJavaAppletServer()
d = new KJavaAppletServerPrivate;
process = new KJavaProcess();
- connect( process, SIGNAL(received(const QByteArray&)),
- this, SLOT(slotJavaRequest(const QByteArray&)) );
+ connect( process, TQT_SIGNAL(received(const TQByteArray&)),
+ this, TQT_SLOT(slotJavaRequest(const TQByteArray&)) );
setupJava( process );
@@ -159,15 +159,15 @@ KJavaAppletServer::~KJavaAppletServer()
delete d;
}
-QString KJavaAppletServer::getAppletLabel()
+TQString KJavaAppletServer::getAppletLabel()
{
if( self )
return self->appletLabel();
else
- return QString::null;
+ return TQString::null;
}
-QString KJavaAppletServer::appletLabel()
+TQString KJavaAppletServer::appletLabel()
{
return d->appletLabel;
}
@@ -198,7 +198,7 @@ void KJavaAppletServer::freeJavaServer()
if( config.readBoolEntry( "ShutdownAppletServer", true ) )
{
const int value = config.readNumEntry( "AppletServerTimeout", 60 );
- QTimer::singleShot( value*1000, self, SLOT( checkShutdown() ) );
+ TQTimer::singleShot( value*1000, self, TQT_SLOT( checkShutdown() ) );
}
}
}
@@ -217,16 +217,16 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
KConfig config ( "konquerorrc", true );
config.setGroup( "Java/JavaScript Settings" );
- QString jvm_path = "java";
+ TQString jvm_path = "java";
- QString jPath = config.readPathEntry( "JavaPath" );
+ TQString jPath = config.readPathEntry( "JavaPath" );
if ( !jPath.isEmpty() && jPath != "java" )
{
// Cut off trailing slash if any
if( jPath[jPath.length()-1] == '/' )
jPath.remove(jPath.length()-1, 1);
- QDir dir( jPath );
+ TQDir dir( jPath );
if( dir.exists( "bin/java" ) )
{
jvm_path = jPath + "/bin/java";
@@ -235,7 +235,7 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
{
jvm_path = jPath + "/jre/bin/java";
}
- else if( QFile::exists(jPath) )
+ else if( TQFile::exists(jPath) )
{
//check here to see if they entered the whole path the java exe
jvm_path = jPath;
@@ -246,22 +246,22 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
p->setJVMPath( jvm_path );
// Prepare classpath variable
- QString kjava_class = locate("data", "kjava/kjava.jar");
+ TQString kjava_class = locate("data", "kjava/kjava.jar");
kdDebug(6100) << "kjava_class = " << kjava_class << endl;
if( kjava_class.isNull() ) // Should not happen
return;
- QDir dir( kjava_class );
+ TQDir dir( kjava_class );
dir.cdUp();
kdDebug(6100) << "dir = " << dir.absPath() << endl;
- const QStringList entries = dir.entryList( "*.jar" );
+ const TQStringList entries = dir.entryList( "*.jar" );
kdDebug(6100) << "entries = " << entries.join( ":" ) << endl;
- QString classes;
+ TQString classes;
{
- QStringList::ConstIterator it = entries.begin();
- const QStringList::ConstIterator itEnd = entries.end();
+ TQStringList::ConstIterator it = entries.begin();
+ const TQStringList::ConstIterator itEnd = entries.end();
for( ; it != itEnd; ++it )
{
if( !classes.isEmpty() )
@@ -272,12 +272,12 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
p->setClasspath( classes );
// Fix all the extra arguments
- const QString extraArgs = config.readEntry( "JavaArgs" );
+ const TQString extraArgs = config.readEntry( "JavaArgs" );
p->setExtraArgs( extraArgs );
if( config.readBoolEntry( "UseSecurityManager", true ) )
{
- QString class_file = locate( "data", "kjava/kjava.policy" );
+ TQString class_file = locate( "data", "kjava/kjava.policy" );
p->setSystemProperty( "java.security.policy", class_file );
p->setSystemProperty( "java.security.manager",
@@ -287,7 +287,7 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
d->useKIO = config.readBoolEntry( "UseKio", false);
if( d->useKIO )
{
- p->setSystemProperty( "kjas.useKio", QString::null );
+ p->setSystemProperty( "kjas.useKio", TQString::null );
}
//check for http proxies...
@@ -298,12 +298,12 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
// this is a workaround for now
// FIXME
const KURL dummyURL( "http://www.kde.org/" );
- const QString httpProxy = KProtocolManager::proxyForURL(dummyURL);
+ const TQString httpProxy = KProtocolManager::proxyForURL(dummyURL);
kdDebug(6100) << "httpProxy is " << httpProxy << endl;
const KURL url( httpProxy );
p->setSystemProperty( "http.proxyHost", url.host() );
- p->setSystemProperty( "http.proxyPort", QString::number( url.port() ) );
+ p->setSystemProperty( "http.proxyPort", TQString::number( url.port() ) );
}
//set the main class to run
@@ -317,8 +317,8 @@ void KJavaAppletServer::createContext( int contextId, KJavaAppletContext* contex
d->contexts.insert( contextId, context );
- QStringList args;
- args.append( QString::number( contextId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
process->send( KJAS_CREATE_CONTEXT, args );
}
@@ -328,18 +328,18 @@ void KJavaAppletServer::destroyContext( int contextId )
if ( d->javaProcessFailed ) return;
d->contexts.remove( contextId );
- QStringList args;
- args.append( QString::number( contextId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
process->send( KJAS_DESTROY_CONTEXT, args );
}
bool KJavaAppletServer::createApplet( int contextId, int appletId,
- const QString & name, const QString & clazzName,
- const QString & baseURL, const QString & user,
- const QString & password, const QString & authname,
- const QString & codeBase, const QString & jarFile,
- QSize size, const QMap<QString,QString>& params,
- const QString & windowTitle )
+ const TQString & name, const TQString & clazzName,
+ const TQString & baseURL, const TQString & user,
+ const TQString & password, const TQString & authname,
+ const TQString & codeBase, const TQString & jarFile,
+ TQSize size, const TQMap<TQString,TQString>& params,
+ const TQString & windowTitle )
{
// kdDebug(6100) << "createApplet: contextId = " << contextId << endl
// << " appletId = " << appletId << endl
@@ -353,9 +353,9 @@ bool KJavaAppletServer::createApplet( int contextId, int appletId,
if ( d->javaProcessFailed ) return false;
- QStringList args;
- args.append( QString::number( contextId ) );
- args.append( QString::number( appletId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
+ args.append( TQString::number( appletId ) );
//it's ok if these are empty strings, I take care of it later...
args.append( name );
@@ -367,18 +367,18 @@ bool KJavaAppletServer::createApplet( int contextId, int appletId,
args.append( codeBase );
args.append( jarFile );
- args.append( QString::number( size.width() ) );
- args.append( QString::number( size.height() ) );
+ args.append( TQString::number( size.width() ) );
+ args.append( TQString::number( size.height() ) );
args.append( windowTitle );
//add on the number of parameter pairs...
const int num = params.count();
- const QString num_params = QString("%1").arg( num, 8 );
+ const TQString num_params = TQString("%1").arg( num, 8 );
args.append( num_params );
- QMap< QString, QString >::ConstIterator it = params.begin();
- const QMap< QString, QString >::ConstIterator itEnd = params.end();
+ TQMap< TQString, TQString >::ConstIterator it = params.begin();
+ const TQMap< TQString, TQString >::ConstIterator itEnd = params.end();
for( ; it != itEnd; ++it )
{
@@ -394,9 +394,9 @@ bool KJavaAppletServer::createApplet( int contextId, int appletId,
void KJavaAppletServer::initApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number( contextId ) );
- args.append( QString::number( appletId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
+ args.append( TQString::number( appletId ) );
process->send( KJAS_INIT_APPLET, args );
}
@@ -404,9 +404,9 @@ void KJavaAppletServer::initApplet( int contextId, int appletId )
void KJavaAppletServer::destroyApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
+ TQStringList args;
+ args.append( TQString::number(contextId) );
+ args.append( TQString::number(appletId) );
process->send( KJAS_DESTROY_APPLET, args );
}
@@ -414,9 +414,9 @@ void KJavaAppletServer::destroyApplet( int contextId, int appletId )
void KJavaAppletServer::startApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
+ TQStringList args;
+ args.append( TQString::number(contextId) );
+ args.append( TQString::number(appletId) );
process->send( KJAS_START_APPLET, args );
}
@@ -424,24 +424,24 @@ void KJavaAppletServer::startApplet( int contextId, int appletId )
void KJavaAppletServer::stopApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
+ TQStringList args;
+ args.append( TQString::number(contextId) );
+ args.append( TQString::number(appletId) );
process->send( KJAS_STOP_APPLET, args );
}
void KJavaAppletServer::showConsole() {
if ( d->javaProcessFailed ) return;
- QStringList args;
+ TQStringList args;
process->send( KJAS_SHOW_CONSOLE, args );
}
-void KJavaAppletServer::sendURLData( int loaderID, int code, const QByteArray& data )
+void KJavaAppletServer::sendURLData( int loaderID, int code, const TQByteArray& data )
{
- QStringList args;
- args.append( QString::number(loaderID) );
- args.append( QString::number(code) );
+ TQStringList args;
+ args.append( TQString::number(loaderID) );
+ args.append( TQString::number(code) );
process->send( KJAS_URLDATA, args, data );
}
@@ -457,19 +457,19 @@ void KJavaAppletServer::removeDataJob( int loaderID )
void KJavaAppletServer::quit()
{
- const QStringList args;
+ const TQStringList args;
process->send( KJAS_SHUTDOWN_SERVER, args );
process->flushBuffers();
process->wait( 10 );
}
-void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
+void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb )
{
// qb should be one command only without the length string,
// we parse out the command and it's meaning here...
- QString cmd;
- QStringList args;
+ TQString cmd;
+ TQStringList args;
int index = 0;
const int qb_size = qb.size();
@@ -478,7 +478,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
++index; //skip the next sep
//get contextID
- QString contextID;
+ TQString contextID;
while( qb[index] != 0 && index < qb_size )
{
contextID += qb[ index++ ];
@@ -504,7 +504,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
if (ok) {
KIOJobMap::iterator it = d->kiojobs.find( ID_num );
if (ok && it != d->kiojobs.end()) {
- QByteArray qba;
+ TQByteArray qba;
qba.setRawData(qb.data() + index, qb.size() - index - 1);
it.data()->data(qba);
qba.resetRawData(qb.data() + index, qb.size() - index - 1);
@@ -522,8 +522,8 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
kdError(6100) << "Missing separation byte" << endl;
sep_pos = qb_size;
}
- //kdDebug(6100) << "KJavaAppletServer::slotJavaRequest: "<< QString::fromLocal8Bit( qb.data() + index, sep_pos - index ) << endl;
- args.append( QString::fromLocal8Bit( qb.data() + index, sep_pos - index ) );
+ //kdDebug(6100) << "KJavaAppletServer::slotJavaRequest: "<< TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) << endl;
+ args.append( TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) );
index = sep_pos + 1; //skip the sep
}
//here I should find the context and call the method directly
@@ -531,19 +531,19 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
switch( cmd_code )
{
case KJAS_SHOW_DOCUMENT:
- cmd = QString::fromLatin1( "showdocument" );
+ cmd = TQString::fromLatin1( "showdocument" );
break;
case KJAS_SHOW_URLINFRAME:
- cmd = QString::fromLatin1( "showurlinframe" );
+ cmd = TQString::fromLatin1( "showurlinframe" );
break;
case KJAS_SHOW_STATUS:
- cmd = QString::fromLatin1( "showstatus" );
+ cmd = TQString::fromLatin1( "showstatus" );
break;
case KJAS_RESIZE_APPLET:
- cmd = QString::fromLatin1( "resizeapplet" );
+ cmd = TQString::fromLatin1( "resizeapplet" );
break;
case KJAS_GET_URLDATA:
@@ -573,7 +573,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
kdError(6100) << "KIO Data command error " << ok << " args:" << args.size() << endl;
return;
case KJAS_JAVASCRIPT_EVENT:
- cmd = QString::fromLatin1( "JS_Event" );
+ cmd = TQString::fromLatin1( "JS_Event" );
kdDebug(6100) << "Javascript request: "<< contextID
<< " code: " << args[0] << endl;
break;
@@ -593,37 +593,37 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
return;
}
case KJAS_AUDIOCLIP_PLAY:
- cmd = QString::fromLatin1( "audioclip_play" );
+ cmd = TQString::fromLatin1( "audioclip_play" );
kdDebug(6100) << "Audio Play: url=" << args[0] << endl;
break;
case KJAS_AUDIOCLIP_LOOP:
- cmd = QString::fromLatin1( "audioclip_loop" );
+ cmd = TQString::fromLatin1( "audioclip_loop" );
kdDebug(6100) << "Audio Loop: url=" << args[0] << endl;
break;
case KJAS_AUDIOCLIP_STOP:
- cmd = QString::fromLatin1( "audioclip_stop" );
+ cmd = TQString::fromLatin1( "audioclip_stop" );
kdDebug(6100) << "Audio Stop: url=" << args[0] << endl;
break;
case KJAS_APPLET_STATE:
kdDebug(6100) << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1] << endl;
- cmd = QString::fromLatin1( "AppletStateNotification" );
+ cmd = TQString::fromLatin1( "AppletStateNotification" );
break;
case KJAS_APPLET_FAILED:
kdDebug(6100) << "Applet " << args[0] << " Failed: " << args[1] << endl;
- cmd = QString::fromLatin1( "AppletFailed" );
+ cmd = TQString::fromLatin1( "AppletFailed" );
break;
case KJAS_SECURITY_CONFIRM: {
if (KSSL::doesSSLWork() && !d->kssl)
d->kssl = new KSSL;
- QStringList sl;
- QCString answer( "invalid" );
+ TQStringList sl;
+ TQCString answer( "invalid" );
if (!d->kssl) {
answer = "nossl";
} else if (args.size() > 2) {
const int certsnr = args[1].toInt();
- QString text;
- QPtrList<KSSLCertificate> certs;
+ TQString text;
+ TQPtrList<KSSLCertificate> certs;
certs.setAutoDelete( true );
for (int i = certsnr; i >= 0; --i) {
KSSLCertificate * cert = KSSLCertificate::fromString(args[i+2].ascii());
@@ -666,12 +666,12 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
default:
text += i18n("Unknown"); break;
}
- text += QString(")\n");
- QString subject = cert->getSubject() + QChar('\n');
- QRegExp reg(QString("/[A-Z]+="));
+ text += TQString(")\n");
+ TQString subject = cert->getSubject() + TQChar('\n');
+ TQRegExp reg(TQString("/[A-Z]+="));
int pos = 0;
while ((pos = subject.find(reg, pos)) > -1)
- subject.replace(pos, 1, QString("\n "));
+ subject.replace(pos, 1, TQString("\n "));
text += subject.mid(1);
}
}
@@ -683,8 +683,8 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
answer = PermissionDialog( qApp->activeWindow() ).exec( text, args[0] );
}
}
- sl.push_front( QString(answer) );
- sl.push_front( QString::number(ID_num) );
+ sl.push_front( TQString(answer) );
+ sl.push_front( TQString::number(ID_num) );
process->send( KJAS_SECURITY_CONFIRM, sl );
return;
}
@@ -716,7 +716,7 @@ void KJavaAppletServer::endWaitForReturnData() {
it.data()->exit = true;
}
-void KJavaAppletServer::timerEvent(QTimerEvent *) {
+void KJavaAppletServer::timerEvent(TQTimerEvent *) {
endWaitForReturnData();
kdDebug(6100) << "KJavaAppletServer::timerEvent timeout" << endl;
}
@@ -726,15 +726,15 @@ void KJavaAppletServer::waitForReturnData(JSStackFrame * frame) {
killTimers();
startTimer(15000);
while (!frame->exit)
- kapp->eventLoop()->processEvents (QEventLoop::AllEvents | QEventLoop::WaitForMore);
+ kapp->eventLoop()->processEvents (TQEventLoop::AllEvents | TQEventLoop::WaitForMore);
if (d->jsstack.size() <= 1)
killTimers();
kdDebug(6100) << "<KJavaAppletServer::waitForReturnData stacksize:" << d->jsstack.size() << endl;
}
-bool KJavaAppletServer::getMember(QStringList & args, QStringList & ret_args) {
+bool KJavaAppletServer::getMember(TQStringList & args, TQStringList & ret_args) {
JSStackFrame frame( d->jsstack, ret_args );
- args.push_front( QString::number(frame.ticket) );
+ args.push_front( TQString::number(frame.ticket) );
process->send( KJAS_GET_MEMBER, args );
waitForReturnData( &frame );
@@ -742,10 +742,10 @@ bool KJavaAppletServer::getMember(QStringList & args, QStringList & ret_args) {
return frame.ready;
}
-bool KJavaAppletServer::putMember( QStringList & args ) {
- QStringList ret_args;
+bool KJavaAppletServer::putMember( TQStringList & args ) {
+ TQStringList ret_args;
JSStackFrame frame( d->jsstack, ret_args );
- args.push_front( QString::number(frame.ticket) );
+ args.push_front( TQString::number(frame.ticket) );
process->send( KJAS_PUT_MEMBER, args );
waitForReturnData( &frame );
@@ -753,9 +753,9 @@ bool KJavaAppletServer::putMember( QStringList & args ) {
return frame.ready && ret_args.count() > 0 && ret_args[0].toInt();
}
-bool KJavaAppletServer::callMember(QStringList & args, QStringList & ret_args) {
+bool KJavaAppletServer::callMember(TQStringList & args, TQStringList & ret_args) {
JSStackFrame frame( d->jsstack, ret_args );
- args.push_front( QString::number(frame.ticket) );
+ args.push_front( TQString::number(frame.ticket) );
process->send( KJAS_CALL_MEMBER, args );
waitForReturnData( &frame );
@@ -763,7 +763,7 @@ bool KJavaAppletServer::callMember(QStringList & args, QStringList & ret_args) {
return frame.ready;
}
-void KJavaAppletServer::derefObject( QStringList & args ) {
+void KJavaAppletServer::derefObject( TQStringList & args ) {
process->send( KJAS_DEREF_OBJECT, args );
}
@@ -772,48 +772,48 @@ bool KJavaAppletServer::usingKIO() {
}
-PermissionDialog::PermissionDialog( QWidget* parent )
- : QObject(parent), m_button("no")
+PermissionDialog::PermissionDialog( TQWidget* parent )
+ : TQObject(parent), m_button("no")
{}
-QCString PermissionDialog::exec( const QString & cert, const QString & perm ) {
- QGuardedPtr<QDialog> dialog = new QDialog( static_cast<QWidget*>(parent()), "PermissionDialog");
+TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm ) {
+ TQGuardedPtr<TQDialog> dialog = new TQDialog( static_cast<TQWidget*>(parent()), "PermissionDialog");
- dialog->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) );
+ dialog->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) );
dialog->setModal( true );
dialog->setCaption( i18n("Security Alert") );
- QVBoxLayout* const dialogLayout = new QVBoxLayout( dialog, 11, 6, "dialogLayout");
+ TQVBoxLayout* const dialogLayout = new TQVBoxLayout( dialog, 11, 6, "dialogLayout");
- dialogLayout->addWidget( new QLabel( i18n("Do you grant Java applet with certificate(s):"), dialog ) );
- dialogLayout->addWidget( new QLabel( cert, dialog, "message" ) );
- dialogLayout->addWidget( new QLabel( i18n("the following permission"), dialog, "message" ) );
- dialogLayout->addWidget( new QLabel( perm, dialog, "message" ) );
- QSpacerItem* const spacer2 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ dialogLayout->addWidget( new TQLabel( i18n("Do you grant Java applet with certificate(s):"), dialog ) );
+ dialogLayout->addWidget( new TQLabel( cert, dialog, "message" ) );
+ dialogLayout->addWidget( new TQLabel( i18n("the following permission"), dialog, "message" ) );
+ dialogLayout->addWidget( new TQLabel( perm, dialog, "message" ) );
+ TQSpacerItem* const spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
dialogLayout->addItem( spacer2 );
- QHBoxLayout* const buttonLayout = new QHBoxLayout( 0, 0, 6, "buttonLayout");
+ TQHBoxLayout* const buttonLayout = new TQHBoxLayout( 0, 0, 6, "buttonLayout");
- QPushButton* const no = new QPushButton( i18n("&No"), dialog, "no" );
+ TQPushButton* const no = new TQPushButton( i18n("&No"), dialog, "no" );
no->setDefault( true );
buttonLayout->addWidget( no );
- QPushButton* const reject = new QPushButton( i18n("&Reject All"), dialog, "reject" );
+ TQPushButton* const reject = new TQPushButton( i18n("&Reject All"), dialog, "reject" );
buttonLayout->addWidget( reject );
- QPushButton* const yes = new QPushButton( i18n("&Yes"), dialog, "yes" );
+ TQPushButton* const yes = new TQPushButton( i18n("&Yes"), dialog, "yes" );
buttonLayout->addWidget( yes );
- QPushButton* const grant = new QPushButton( i18n("&Grant All"), dialog, "grant" );
+ TQPushButton* const grant = new TQPushButton( i18n("&Grant All"), dialog, "grant" );
buttonLayout->addWidget( grant );
dialogLayout->addLayout( buttonLayout );
dialog->resize( dialog->minimumSizeHint() );
//clearWState( WState_Polished );
- connect( no, SIGNAL( clicked() ), this, SLOT( clicked() ) );
- connect( reject, SIGNAL( clicked() ), this, SLOT( clicked() ) );
- connect( yes, SIGNAL( clicked() ), this, SLOT( clicked() ) );
- connect( grant, SIGNAL( clicked() ), this, SLOT( clicked() ) );
+ connect( no, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
+ connect( reject, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
+ connect( yes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
+ connect( grant, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
dialog->exec();
delete dialog;
@@ -827,7 +827,7 @@ PermissionDialog::~PermissionDialog()
void PermissionDialog::clicked()
{
m_button = sender()->name();
- static_cast<const QWidget*>(sender())->parentWidget()->close();
+ static_cast<const TQWidget*>(sender())->parentWidget()->close();
}
#include "kjavaappletserver.moc"
diff --git a/khtml/java/kjavaappletserver.h b/khtml/java/kjavaappletserver.h
index 674afb4ad..08d0f2983 100644
--- a/khtml/java/kjavaappletserver.h
+++ b/khtml/java/kjavaappletserver.h
@@ -25,8 +25,8 @@
#define KJAVAAPPLETSERVER_H
#include "kjavaprocess.h"
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
/**
@@ -68,7 +68,7 @@ public:
* while the applet is being loaded. If the java process could not be
* started, an error message is displayed instead.
*/
- static QString getAppletLabel();
+ static TQString getAppletLabel();
/**
* Create an applet context with the specified id.
@@ -86,12 +86,12 @@ public:
* name, class etc. are specified in the same way as in the HTML APPLET tag.
*/
bool createApplet( int contextId, int appletId,
- const QString & name, const QString & clazzName,
- const QString & baseURL, const QString & user,
- const QString & password, const QString & authname,
- const QString & codeBase, const QString & jarFile,
- QSize size, const QMap<QString, QString>& params,
- const QString & windowTitle );
+ const TQString & name, const TQString & clazzName,
+ const TQString & baseURL, const TQString & user,
+ const TQString & password, const TQString & authname,
+ const TQString & codeBase, const TQString & jarFile,
+ TQSize size, const TQMap<TQString, TQString>& params,
+ const TQString & windowTitle );
/**
* This should be called by the KJavaAppletWidget
@@ -122,7 +122,7 @@ public:
* Send data we got back from a KJavaDownloader back to the appropriate
* class loader.
*/
- void sendURLData( int loaderID, int code, const QByteArray& data );
+ void sendURLData( int loaderID, int code, const TQByteArray& data );
/**
* Removes KJavaDownloader from the list (deletes it too).
*/
@@ -134,15 +134,15 @@ public:
void quit();
KJavaProcess* javaProcess() { return process; }
- QString appletLabel();
+ TQString appletLabel();
void waitForReturnData(JSStackFrame *);
void endWaitForReturnData();
- bool getMember(QStringList & args, QStringList & ret_args);
- bool putMember(QStringList & args);
- bool callMember(QStringList & args, QStringList & ret_args);
- void derefObject(QStringList & args);
+ bool getMember(TQStringList & args, TQStringList & ret_args);
+ bool putMember(TQStringList & args);
+ bool callMember(TQStringList & args, TQStringList & ret_args);
+ void derefObject(TQStringList & args);
bool usingKIO();
protected:
@@ -151,9 +151,9 @@ protected:
KJavaProcess* process;
protected slots:
- void slotJavaRequest( const QByteArray& qb );
+ void slotJavaRequest( const TQByteArray& qb );
void checkShutdown();
- void timerEvent(QTimerEvent *);
+ void timerEvent(TQTimerEvent *);
private:
KJavaAppletServerPrivate* d;
@@ -165,16 +165,16 @@ class PermissionDialog : public QObject
{
Q_OBJECT
public:
- PermissionDialog( QWidget* );
+ PermissionDialog( TQWidget* );
~PermissionDialog();
- QCString exec( const QString & cert, const QString & perm );
+ TQCString exec( const TQString & cert, const TQString & perm );
private slots:
void clicked();
private:
- QCString m_button;
+ TQCString m_button;
};
#endif // KJAVAAPPLETSERVER_H
diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp
index 53e8b4512..d4c8e266f 100644
--- a/khtml/java/kjavaappletviewer.cpp
+++ b/khtml/java/kjavaappletviewer.cpp
@@ -22,12 +22,12 @@
#ifdef KDE_USE_FINAL
#undef Always
#endif
-#include <qdir.h>
-#include <qtable.h>
-#include <qpair.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qlabel.h>
+#include <tqdir.h>
+#include <tqtable.h>
+#include <tqpair.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
+#include <tqlabel.h>
#include <klibloader.h>
#include <kaboutdata.h>
@@ -59,8 +59,8 @@ KJavaAppletViewerFactory::~KJavaAppletViewerFactory () {
}
KParts::Part *KJavaAppletViewerFactory::createPartObject
- (QWidget *wparent, const char *wname,
- QObject *parent, const char * name, const char *, const QStringList & args) {
+ (TQWidget *wparent, const char *wname,
+ TQObject *parent, const char * name, const char *, const TQStringList & args) {
return new KJavaAppletViewer (wparent, wname, parent, name, args);
}
@@ -74,12 +74,12 @@ public:
KJavaServerMaintainer () { }
~KJavaServerMaintainer ();
- KJavaAppletContext * getContext (QObject*, const QString &);
- void releaseContext (QObject*, const QString &);
+ KJavaAppletContext * getContext (TQObject*, const TQString &);
+ void releaseContext (TQObject*, const TQString &);
void setServer (KJavaAppletServer * s);
- QGuardedPtr <KJavaAppletServer> server;
+ TQGuardedPtr <KJavaAppletServer> server;
private:
- typedef QMap <QPair <QObject*, QString>, QPair <KJavaAppletContext*, int> >
+ typedef TQMap <QPair <TQObject*, TQString>, QPair <KJavaAppletContext*, int> >
ContextMap;
ContextMap m_contextmap;
};
@@ -88,7 +88,7 @@ KJavaServerMaintainer::~KJavaServerMaintainer () {
delete server;
}
-KJavaAppletContext * KJavaServerMaintainer::getContext (QObject * w, const QString & doc) {
+KJavaAppletContext * KJavaServerMaintainer::getContext (TQObject * w, const TQString & doc) {
ContextMap::key_type key = qMakePair (w, doc);
ContextMap::iterator it = m_contextmap.find (key);
if (it != m_contextmap.end ()) {
@@ -100,7 +100,7 @@ KJavaAppletContext * KJavaServerMaintainer::getContext (QObject * w, const QStri
return context;
}
-void KJavaServerMaintainer::releaseContext (QObject * w, const QString & doc) {
+void KJavaServerMaintainer::releaseContext (TQObject * w, const TQString & doc) {
ContextMap::iterator it = m_contextmap.find (qMakePair (w, doc));
if (it != m_contextmap.end () && --(*it).second <= 0) {
kdDebug(6100) << "KJavaServerMaintainer::releaseContext" << endl;
@@ -123,31 +123,31 @@ AppletParameterDialog::AppletParameterDialog (KJavaAppletWidget * parent)
KDialogBase::Close, KDialogBase::Close, true),
m_appletWidget (parent) {
KJavaApplet* const applet = parent->applet ();
- table = new QTable (30, 2, this);
- table->setMinimumSize (QSize (600, 400));
+ table = new TQTable (30, 2, this);
+ table->setMinimumSize (TQSize (600, 400));
table->setColumnWidth (0, 200);
table->setColumnWidth (1, 340);
- QHeader* const header = table->horizontalHeader();
+ TQHeader* const header = table->horizontalHeader();
header->setLabel (0, i18n ("Parameter"));
header->setLabel (1, i18n ("Value"));
- QTableItem * tit = new QTableItem (table, QTableItem::Never, i18n("Class"));
+ TQTableItem * tit = new TQTableItem (table, TQTableItem::Never, i18n("Class"));
table->setItem (0, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, applet->appletClass());
+ tit = new TQTableItem(table, TQTableItem::Always, applet->appletClass());
table->setItem (0, 1, tit);
- tit = new QTableItem (table, QTableItem::Never, i18n ("Base URL"));
+ tit = new TQTableItem (table, TQTableItem::Never, i18n ("Base URL"));
table->setItem (1, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, applet->baseURL());
+ tit = new TQTableItem(table, TQTableItem::Always, applet->baseURL());
table->setItem (1, 1, tit);
- tit = new QTableItem (table, QTableItem::Never, i18n ("Archives"));
+ tit = new TQTableItem (table, TQTableItem::Never, i18n ("Archives"));
table->setItem (2, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, applet->archives());
+ tit = new TQTableItem(table, TQTableItem::Always, applet->archives());
table->setItem (2, 1, tit);
- QMap<QString,QString>::const_iterator it = applet->getParams().begin();
- const QMap<QString,QString>::const_iterator itEnd = applet->getParams().end();
+ TQMap<TQString,TQString>::const_iterator it = applet->getParams().begin();
+ const TQMap<TQString,TQString>::const_iterator itEnd = applet->getParams().end();
for (int count = 2; it != itEnd; ++it) {
- tit = new QTableItem (table, QTableItem::Always, it.key ());
+ tit = new TQTableItem (table, TQTableItem::Always, it.key ());
table->setItem (++count, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, it.data ());
+ tit = new TQTableItem(table, TQTableItem::Always, it.data ());
table->setItem (count, 1, tit);
}
setMainWidget (table);
@@ -169,18 +169,18 @@ void AppletParameterDialog::slotClose () {
}
//-----------------------------------------------------------------------------
-class CoverWidget : public QWidget {
+class CoverWidget : public TQWidget {
KJavaAppletWidget * m_appletwidget;
public:
- CoverWidget (QWidget *);
+ CoverWidget (TQWidget *);
~CoverWidget () {}
KJavaAppletWidget * appletWidget () const;
protected:
- void resizeEvent (QResizeEvent * e);
+ void resizeEvent (TQResizeEvent * e);
};
-inline CoverWidget::CoverWidget (QWidget * parent)
- : QWidget (parent, "KJavaAppletViewer Widget")
+inline CoverWidget::CoverWidget (TQWidget * parent)
+ : TQWidget (parent, "KJavaAppletViewer Widget")
{
m_appletwidget = new KJavaAppletWidget (this);
setFocusProxy (m_appletwidget);
@@ -190,27 +190,27 @@ inline KJavaAppletWidget * CoverWidget::appletWidget () const {
return m_appletwidget;
}
-void CoverWidget::resizeEvent (QResizeEvent * e) {
+void CoverWidget::resizeEvent (TQResizeEvent * e) {
m_appletwidget->resize (e->size().width(), e->size().height());
}
//-----------------------------------------------------------------------------
-class StatusBarIcon : public QLabel {
+class StatusBarIcon : public TQLabel {
public:
- StatusBarIcon (QWidget * parent) : QLabel (parent) {
- setPixmap (SmallIcon (QString ("java"), KJavaAppletViewerFactory::instance ()));
+ StatusBarIcon (TQWidget * parent) : TQLabel (parent) {
+ setPixmap (SmallIcon (TQString ("java"), KJavaAppletViewerFactory::instance ()));
}
protected:
- void mousePressEvent (QMouseEvent *) {
+ void mousePressEvent (TQMouseEvent *) {
serverMaintainer->server->showConsole ();
}
};
//-----------------------------------------------------------------------------
-KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
- QObject * parent, const char * name, const QStringList & args)
+KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *,
+ TQObject * parent, const char * name, const TQStringList & args)
: KParts::ReadOnlyPart (parent, name),
m_browserextension (new KJavaAppletViewerBrowserExtension (this)),
m_liveconnect (new KJavaAppletViewerLiveConnectExtension (this)),
@@ -223,49 +223,49 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
new KJavaServerMaintainer);
}
m_view = new CoverWidget (wparent);
- QString classname, classid, codebase, khtml_codebase, src_param;
+ TQString classname, classid, codebase, khtml_codebase, src_param;
int width = -1;
int height = -1;
KJavaApplet* const applet = m_view->appletWidget()->applet ();
- QStringList::const_iterator it = args.begin();
- const QStringList::const_iterator itEnd = args.end();
+ TQStringList::const_iterator it = args.begin();
+ const TQStringList::const_iterator itEnd = args.end();
for ( ; it != itEnd; ++it) {
const int equalPos = (*it).find("=");
if (equalPos > 0) {
- const QString name = (*it).left (equalPos).upper ();
- QString value = (*it).right ((*it).length () - equalPos - 1);
+ const TQString name = (*it).left (equalPos).upper ();
+ TQString value = (*it).right ((*it).length () - equalPos - 1);
if (value.at(0)=='\"')
value = value.right (value.length () - 1);
if (value.at (value.length () - 1) == '\"')
value.truncate (value.length () - 1);
kdDebug(6100) << "name=" << name << " value=" << value << endl;
if (!name.isEmpty()) {
- const QString name_lower = name.lower ();
+ const TQString name_lower = name.lower ();
if (name == "__KHTML__PLUGINBASEURL") {
- baseurl = KURL (KURL (value), QString (".")).url ();
+ baseurl = KURL (KURL (value), TQString (".")).url ();
} else if (name == "__KHTML__CODEBASE")
khtml_codebase = value;
- else if (name_lower == QString::fromLatin1("codebase") ||
- name_lower == QString::fromLatin1("java_codebase")) {
+ else if (name_lower == TQString::fromLatin1("codebase") ||
+ name_lower == TQString::fromLatin1("java_codebase")) {
if (!value.isEmpty ())
codebase = value;
} else if (name == "__KHTML__CLASSID")
- //else if (name.lower()==QString::fromLatin1("classid"))
+ //else if (name.lower()==TQString::fromLatin1("classid"))
classid = value;
- else if (name_lower == QString::fromLatin1("code") ||
- name_lower == QString::fromLatin1("java_code"))
+ else if (name_lower == TQString::fromLatin1("code") ||
+ name_lower == TQString::fromLatin1("java_code"))
classname = value;
- else if (name_lower == QString::fromLatin1("src"))
+ else if (name_lower == TQString::fromLatin1("src"))
src_param = value;
- else if (name_lower == QString::fromLatin1("archive") ||
- name_lower == QString::fromLatin1("java_archive") ||
+ else if (name_lower == TQString::fromLatin1("archive") ||
+ name_lower == TQString::fromLatin1("java_archive") ||
name_lower.startsWith ("cache_archive"))
applet->setArchives (value);
- else if (name_lower == QString::fromLatin1("name"))
+ else if (name_lower == TQString::fromLatin1("name"))
applet->setAppletName (value);
- else if (name_lower == QString::fromLatin1("width"))
+ else if (name_lower == TQString::fromLatin1("width"))
width = value.toInt();
- else if (name_lower == QString::fromLatin1("height"))
+ else if (name_lower == TQString::fromLatin1("height"))
height = value.toInt();
if (!name.startsWith ("__KHTML__")) {
applet->setParameter (name, value);
@@ -285,19 +285,19 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
if (classname.isEmpty ())
classname = src_param;
else if (!src_param.isEmpty ())
- applet->setParameter (QString ("SRC"), src_param);
+ applet->setParameter (TQString ("SRC"), src_param);
if (codebase.isEmpty ())
codebase = khtml_codebase;
if (baseurl.isEmpty ()) {
// not embeded in khtml
- QString pwd = QDir().absPath ();
- if (!pwd.endsWith (QChar (QDir::separator ())))
- pwd += QDir::separator ();
+ TQString pwd = TQDir().absPath ();
+ if (!pwd.endsWith (TQChar (TQDir::separator ())))
+ pwd += TQDir::separator ();
baseurl = KURL (KURL (pwd), codebase).url ();
}
if (width > 0 && height > 0) {
m_view->resize (width, height);
- applet->setSize( QSize( width, height ) );
+ applet->setSize( TQSize( width, height ) );
}
applet->setBaseURL (baseurl);
// check codebase first
@@ -316,23 +316,23 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
if (!server->usingKIO ()) {
/* if this page needs authentication */
KIO::AuthInfo info;
- QString errorMsg;
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQString errorMsg;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
KIO::AuthInfo authResult;
//(void) dcopClient(); // Make sure to have a dcop client.
info.url = baseurl;
info.verifyPath = true;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << m_view->topLevelWidget()->winId();
if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int)", params, replyType, reply ) ) {
kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl;
} else if ( replyType == "KIO::AuthInfo" ) {
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> authResult;
applet->setUser (authResult.username);
applet->setPassword (authResult.password);
@@ -347,18 +347,18 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
setInstance (KJavaAppletViewerFactory::instance ());
KParts::Part::setWidget (m_view);
- connect (applet->getContext(), SIGNAL(appletLoaded()), this, SLOT(appletLoaded()));
- connect (applet->getContext(), SIGNAL(showDocument(const QString&, const QString&)), m_browserextension, SLOT(showDocument(const QString&, const QString&)));
- connect (applet->getContext(), SIGNAL(showStatus(const QString &)), this, SLOT(infoMessage(const QString &)));
- connect (applet, SIGNAL(jsEvent (const QStringList &)), m_liveconnect, SLOT(jsEvent (const QStringList &)));
+ connect (applet->getContext(), TQT_SIGNAL(appletLoaded()), this, TQT_SLOT(appletLoaded()));
+ connect (applet->getContext(), TQT_SIGNAL(showDocument(const TQString&, const TQString&)), m_browserextension, TQT_SLOT(showDocument(const TQString&, const TQString&)));
+ connect (applet->getContext(), TQT_SIGNAL(showStatus(const TQString &)), this, TQT_SLOT(infoMessage(const TQString &)));
+ connect (applet, TQT_SIGNAL(jsEvent (const TQStringList &)), m_liveconnect, TQT_SLOT(jsEvent (const TQStringList &)));
}
-bool KJavaAppletViewer::eventFilter (QObject *o, QEvent *e) {
+bool KJavaAppletViewer::eventFilter (TQObject *o, TQEvent *e) {
if (m_liveconnect->jsSessions () > 0) {
switch (e->type()) {
- case QEvent::Destroy:
- case QEvent::Close:
- case QEvent::Quit:
+ case TQEvent::Destroy:
+ case TQEvent::Close:
+ case TQEvent::Quit:
return true;
default:
break;
@@ -404,7 +404,7 @@ bool KJavaAppletViewer::openURL (const KURL & url) {
if (applet->size().width() > 0 || m_view->isVisible())
w->showApplet ();
else
- QTimer::singleShot (10, this, SLOT (delayedCreateTimeOut ()));
+ TQTimer::singleShot (10, this, TQT_SLOT (delayedCreateTimeOut ()));
if (!applet->failed ())
emit started (0L);
return url.isValid ();
@@ -443,7 +443,7 @@ void KJavaAppletViewer::appletLoaded () {
emit completed();
}
-void KJavaAppletViewer::infoMessage (const QString & msg) {
+void KJavaAppletViewer::infoMessage (const TQString & msg) {
m_browserextension->infoMessage(msg);
}
@@ -457,7 +457,7 @@ KJavaAppletViewerBrowserExtension::KJavaAppletViewerBrowserExtension (KJavaApple
: KParts::BrowserExtension (parent, "KJavaAppletViewer Browser Extension") {
}
-void KJavaAppletViewerBrowserExtension::urlChanged (const QString & url) {
+void KJavaAppletViewerBrowserExtension::urlChanged (const TQString & url) {
emit setLocationBarURL (url);
}
@@ -468,24 +468,24 @@ void KJavaAppletViewerBrowserExtension::setLoadingProgress (int percentage) {
void KJavaAppletViewerBrowserExtension::setURLArgs (const KParts::URLArgs & /*args*/) {
}
-void KJavaAppletViewerBrowserExtension::saveState (QDataStream & stream) {
+void KJavaAppletViewerBrowserExtension::saveState (TQDataStream & stream) {
KJavaApplet* const applet = static_cast<KJavaAppletViewer*>(parent())->view()->appletWidget ()->applet ();
stream << applet->appletClass();
stream << applet->baseURL();
stream << applet->archives();
stream << applet->getParams().size ();
- QMap<QString,QString>::const_iterator it = applet->getParams().begin();
- const QMap<QString,QString>::const_iterator itEnd = applet->getParams().end();
+ TQMap<TQString,TQString>::const_iterator it = applet->getParams().begin();
+ const TQMap<TQString,TQString>::const_iterator itEnd = applet->getParams().end();
for ( ; it != itEnd; ++it) {
stream << it.key ();
stream << it.data ();
}
}
-void KJavaAppletViewerBrowserExtension::restoreState (QDataStream & stream) {
+void KJavaAppletViewerBrowserExtension::restoreState (TQDataStream & stream) {
KJavaAppletWidget* const w = static_cast<KJavaAppletViewer*>(parent())->view()->appletWidget();
KJavaApplet* const applet = w->applet ();
- QString key, val;
+ TQString key, val;
int paramcount;
stream >> val;
applet->setAppletClass (val);
@@ -505,8 +505,8 @@ void KJavaAppletViewerBrowserExtension::restoreState (QDataStream & stream) {
w->showApplet ();
}
-void KJavaAppletViewerBrowserExtension::showDocument (const QString & doc,
- const QString & frame) {
+void KJavaAppletViewerBrowserExtension::showDocument (const TQString & doc,
+ const TQString & frame) {
const KURL url (doc);
KParts::URLArgs args;
args.frameName = frame;
@@ -520,16 +520,16 @@ KJavaAppletViewerLiveConnectExtension::KJavaAppletViewerLiveConnectExtension(KJa
}
bool KJavaAppletViewerLiveConnectExtension::get (
- const unsigned long objid, const QString & name,
+ const unsigned long objid, const TQString & name,
KParts::LiveConnectExtension::Type & type,
- unsigned long & rid, QString & value)
+ unsigned long & rid, TQString & value)
{
if (!m_viewer->appletAlive ())
return false;
- QStringList args, ret_args;
+ TQStringList args, ret_args;
KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet ();
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
args.append (name);
m_jssessions++;
const bool ret = applet->getContext()->getMember (args, ret_args);
@@ -545,14 +545,14 @@ bool KJavaAppletViewerLiveConnectExtension::get (
return true;
}
-bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const QString & name, const QString & value)
+bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const TQString & name, const TQString & value)
{
if (!m_viewer->appletAlive ())
return false;
- QStringList args;
+ TQStringList args;
KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet ();
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
args.append (name);
args.append (value);
++m_jssessions;
@@ -561,19 +561,19 @@ bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const
return ret;
}
-bool KJavaAppletViewerLiveConnectExtension::call( const unsigned long objid, const QString & func, const QStringList & fargs, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, QString & value )
+bool KJavaAppletViewerLiveConnectExtension::call( const unsigned long objid, const TQString & func, const TQStringList & fargs, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value )
{
if (!m_viewer->appletAlive ())
return false;
KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet ();
- QStringList args, ret_args;
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ TQStringList args, ret_args;
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
args.append (func);
- args.append (QString::number ((int) fargs.size ()));
+ args.append (TQString::number ((int) fargs.size ()));
{
- QStringList::const_iterator it = fargs.begin();
- const QStringList::const_iterator itEnd = fargs.end();
+ TQStringList::const_iterator it = fargs.begin();
+ const TQStringList::const_iterator itEnd = fargs.end();
for ( ; it != itEnd; ++it)
args.append(*it);
}
@@ -602,27 +602,27 @@ void KJavaAppletViewerLiveConnectExtension::unregister(const unsigned long objid
// no need to send to the jvm
return;
}
- QStringList args;
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ TQStringList args;
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
applet->getContext()->derefObject (args);
}
-void KJavaAppletViewerLiveConnectExtension::jsEvent (const QStringList & args) {
+void KJavaAppletViewerLiveConnectExtension::jsEvent (const TQStringList & args) {
if (args.count () < 2 || !m_viewer->appletAlive ())
return;
bool ok;
- QStringList::ConstIterator it = args.begin();
- const QStringList::ConstIterator itEnd = args.end();
+ TQStringList::ConstIterator it = args.begin();
+ const TQStringList::ConstIterator itEnd = args.end();
const unsigned long objid = (*it).toInt(&ok);
++it;
- const QString event = (*it);
+ const TQString event = (*it);
++it;
KParts::LiveConnectExtension::ArgList arglist;
for (; it != itEnd; ++it) {
// take a deep breath here
- const QStringList::ConstIterator prev = it++;
+ const TQStringList::ConstIterator prev = it++;
arglist.push_back(KParts::LiveConnectExtension::ArgList::value_type((KParts::LiveConnectExtension::Type) (*prev).toInt(), (*it)));
}
emit partEvent (objid, event, arglist);
diff --git a/khtml/java/kjavaappletviewer.h b/khtml/java/kjavaappletviewer.h
index 4d8b676cd..16f837b45 100644
--- a/khtml/java/kjavaappletviewer.h
+++ b/khtml/java/kjavaappletviewer.h
@@ -29,9 +29,9 @@
#include <kparts/factory.h>
#include <kdialogbase.h>
#include <kurl.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include "kjavaappletwidget.h"
@@ -48,14 +48,14 @@ class KJavaAppletViewerBrowserExtension : public KParts::BrowserExtension {
Q_OBJECT
public:
KJavaAppletViewerBrowserExtension (KJavaAppletViewer *parent);
- void urlChanged (const QString & url);
+ void urlChanged (const TQString & url);
void setLoadingProgress (int percentage);
void setURLArgs (const KParts::URLArgs & args);
- void saveState (QDataStream & stream);
- void restoreState (QDataStream & stream);
+ void saveState (TQDataStream & stream);
+ void restoreState (TQDataStream & stream);
public slots:
- void showDocument (const QString & doc, const QString & frame);
+ void showDocument (const TQString & doc, const TQString & frame);
};
class KJavaAppletViewerLiveConnectExtension : public KParts::LiveConnectExtension {
@@ -63,16 +63,16 @@ class KJavaAppletViewerLiveConnectExtension : public KParts::LiveConnectExtensio
public:
KJavaAppletViewerLiveConnectExtension(KJavaAppletViewer * parent);
- bool get (const unsigned long objid, const QString & field, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, QString & value);
- bool put(const unsigned long, const QString & field, const QString & value);
- bool call (const unsigned long , const QString & func, const QStringList & args, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, QString & value);
+ bool get (const unsigned long objid, const TQString & field, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value);
+ bool put(const unsigned long, const TQString & field, const TQString & value);
+ bool call (const unsigned long , const TQString & func, const TQStringList & args, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value);
void unregister (const unsigned long objid);
int jsSessions () const { return m_jssessions; }
public slots:
- void jsEvent (const QStringList & args);
+ void jsEvent (const TQStringList & args);
signals:
- virtual void partEvent (const unsigned long objid, const QString & event, const KParts::LiveConnectExtension::ArgList & args);
+ virtual void partEvent (const unsigned long objid, const TQString & event, const KParts::LiveConnectExtension::ArgList & args);
private:
KJavaAppletViewer * m_viewer;
@@ -82,8 +82,8 @@ private:
class KJavaAppletViewer : public KParts::ReadOnlyPart {
Q_OBJECT
public:
- KJavaAppletViewer (QWidget * wparent, const char * wname,
- QObject * parent, const char * name, const QStringList &args);
+ KJavaAppletViewer (TQWidget * wparent, const char * wname,
+ TQObject * parent, const char * name, const TQStringList &args);
~KJavaAppletViewer ();
CoverWidget * view () const { return m_view; }
static KAboutData* createAboutData ();
@@ -93,27 +93,27 @@ public:
KParts::LiveConnectExtension * liveConnectExtension () const
{ return m_liveconnect; }
- bool eventFilter (QObject *o, QEvent *e);
+ bool eventFilter (TQObject *o, TQEvent *e);
bool appletAlive () const;
public slots:
virtual bool openURL (const KURL & url);
virtual bool closeURL ();
void appletLoaded ();
- void infoMessage (const QString &);
+ void infoMessage (const TQString &);
protected:
bool openFile();
private slots:
void delayedCreateTimeOut ();
private:
- QGuardedPtr <CoverWidget> m_view;
+ TQGuardedPtr <CoverWidget> m_view;
KConfig * m_config;
KJavaProcess * process;
KJavaAppletViewerBrowserExtension * m_browserextension;
KJavaAppletViewerLiveConnectExtension * m_liveconnect;
KParts::StatusBarExtension * m_statusbar;
- QGuardedPtr <QLabel> m_statusbar_icon;
- QString baseurl;
+ TQGuardedPtr <TQLabel> m_statusbar_icon;
+ TQString baseurl;
bool m_closed;
};
@@ -123,9 +123,9 @@ public:
KJavaAppletViewerFactory ();
virtual ~KJavaAppletViewerFactory ();
virtual KParts::Part *createPartObject
- (QWidget *wparent, const char *wname,
- QObject *parent, const char *name,
- const char *className, const QStringList &args);
+ (TQWidget *wparent, const char *wname,
+ TQObject *parent, const char *name,
+ const char *className, const TQStringList &args);
static KInstance * instance () { return s_instance; }
private:
static KInstance * s_instance;
@@ -139,7 +139,7 @@ protected slots:
void slotClose ();
private:
KJavaAppletWidget * m_appletWidget;
- QTable * table;
+ TQTable * table;
};
#endif
diff --git a/khtml/java/kjavaappletwidget.cpp b/khtml/java/kjavaappletwidget.cpp
index 31ce8b5e6..1299ce7e8 100644
--- a/khtml/java/kjavaappletwidget.cpp
+++ b/khtml/java/kjavaappletwidget.cpp
@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
// For future expansion
@@ -34,12 +34,12 @@ class KJavaAppletWidgetPrivate
{
friend class KJavaAppletWidget;
private:
- QLabel* tmplabel;
+ TQLabel* tmplabel;
};
int KJavaAppletWidget::appletCount = 0;
-KJavaAppletWidget::KJavaAppletWidget( QWidget* parent, const char* name )
+KJavaAppletWidget::KJavaAppletWidget( TQWidget* parent, const char* name )
: QXEmbed ( parent, name)
{
setProtocol(QXEmbed::XPLAIN);
@@ -48,10 +48,10 @@ KJavaAppletWidget::KJavaAppletWidget( QWidget* parent, const char* name )
d = new KJavaAppletWidgetPrivate;
m_kwm = new KWinModule( this );
- d->tmplabel = new QLabel( this );
+ d->tmplabel = new TQLabel( this );
d->tmplabel->setText( KJavaAppletServer::getAppletLabel() );
d->tmplabel->setAlignment( Qt::AlignCenter | Qt::WordBreak );
- d->tmplabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ d->tmplabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
d->tmplabel->show();
m_swallowTitle.sprintf( "KJAS Applet - Ticket number %u", appletCount++ );
@@ -66,8 +66,8 @@ KJavaAppletWidget::~KJavaAppletWidget()
void KJavaAppletWidget::showApplet()
{
- connect( m_kwm, SIGNAL( windowAdded( WId ) ),
- this, SLOT( setWindow( WId ) ) );
+ connect( m_kwm, TQT_SIGNAL( windowAdded( WId ) ),
+ this, TQT_SLOT( setWindow( WId ) ) );
m_kwm->doNotManage( m_swallowTitle );
@@ -89,8 +89,8 @@ void KJavaAppletWidget::setWindow( WId w )
d->tmplabel = 0;
// disconnect from KWM events
- disconnect( m_kwm, SIGNAL( windowAdded( WId ) ),
- this, SLOT( setWindow( WId ) ) );
+ disconnect( m_kwm, TQT_SIGNAL( windowAdded( WId ) ),
+ this, TQT_SLOT( setWindow( WId ) ) );
embed( w );
@@ -98,16 +98,16 @@ void KJavaAppletWidget::setWindow( WId w )
}
}
-QSize KJavaAppletWidget::sizeHint() const
+TQSize KJavaAppletWidget::sizeHint() const
{
kdDebug(6100) << "KJavaAppletWidget::sizeHint()" << endl;
- QSize rval = QXEmbed::sizeHint();
+ TQSize rval = QXEmbed::sizeHint();
if( rval.width() == 0 || rval.height() == 0 )
{
if( width() != 0 && height() != 0 )
{
- rval = QSize( width(), height() );
+ rval = TQSize( width(), height() );
}
}
@@ -121,13 +121,13 @@ void KJavaAppletWidget::resize( int w, int h )
if( d->tmplabel )
{
d->tmplabel->resize( w, h );
- m_applet->setSize( QSize( w, h ) );
+ m_applet->setSize( TQSize( w, h ) );
}
QXEmbed::resize( w, h );
}
-void KJavaAppletWidget::showEvent (QShowEvent * e) {
+void KJavaAppletWidget::showEvent (TQShowEvent * e) {
QXEmbed::showEvent(e);
if (!applet()->isCreated() && !applet()->appletClass().isEmpty()) {
// delayed showApplet
diff --git a/khtml/java/kjavaappletwidget.h b/khtml/java/kjavaappletwidget.h
index 24973c648..18f5be341 100644
--- a/khtml/java/kjavaappletwidget.h
+++ b/khtml/java/kjavaappletwidget.h
@@ -24,7 +24,7 @@
#ifndef KJAVAAPPLETWIDGET_H
#define KJAVAAPPLETWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#ifndef Q_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded
#include "java/kjavaappletcontext.h"
#include "java/kjavaapplet.h"
@@ -53,7 +53,7 @@
* This widget works by using the KJavaAppletServer, which fires off a
* Java server process with which it communicates using the
* KDE Java Applet Server (KJAS) protocol over stdin and stdout.
- * The applet windows are swallowed and attached to the QWidget, but they are
+ * The applet windows are swallowed and attached to the TQWidget, but they are
* actually running in a different process. This has the advantage of robustness
* and reusability. The details of the communication are hidden from the user
* in the KJASAppletServer class. Normally only a single server process is used for
@@ -79,7 +79,7 @@ class KJavaAppletWidget : public QXEmbed
{
Q_OBJECT
public:
- KJavaAppletWidget( QWidget* parent=0, const char* name=0 );
+ KJavaAppletWidget( TQWidget* parent=0, const char* name=0 );
~KJavaAppletWidget();
@@ -96,7 +96,7 @@ public:
*/
void showApplet();
- QSize sizeHint() const;
+ TQSize sizeHint() const;
void resize( int, int );
protected slots:
@@ -109,14 +109,14 @@ protected slots:
protected:
//The counter to generate ID's for the applets
static int appletCount;
- void showEvent (QShowEvent *);
+ void showEvent (TQShowEvent *);
private:
KJavaAppletWidgetPrivate* d;
KJavaApplet* m_applet;
KWinModule* m_kwm;
- QString m_swallowTitle;
+ TQString m_swallowTitle;
};
diff --git a/khtml/java/kjavadownloader.cpp b/khtml/java/kjavadownloader.cpp
index 8241fdea5..60334cbf0 100644
--- a/khtml/java/kjavadownloader.cpp
+++ b/khtml/java/kjavadownloader.cpp
@@ -26,7 +26,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
static const int DATA = 0;
static const int FINISHED = 1;
@@ -43,7 +43,7 @@ static const int KJAS_RESUME = 2;
KJavaKIOJob::~KJavaKIOJob() {}
-void KJavaKIOJob::data( const QByteArray& )
+void KJavaKIOJob::data( const TQByteArray& )
{
kdError(6100) << "Job id mixup" << endl;
}
@@ -63,14 +63,14 @@ public:
private:
int loaderID;
KURL* url;
- QByteArray file;
+ TQByteArray file;
KIO::TransferJob* job;
int responseCode;
bool isfirstdata;
};
-KJavaDownloader::KJavaDownloader( int ID, const QString& url )
+KJavaDownloader::KJavaDownloader( int ID, const TQString& url )
{
kdDebug(6100) << "KJavaDownloader(" << ID << ") = " << url << endl;
@@ -81,14 +81,14 @@ KJavaDownloader::KJavaDownloader( int ID, const QString& url )
d->job = KIO::get( *d->url, false, false );
d->job->addMetaData("PropagateHttpHeader", "true");
- connect( d->job, SIGNAL(data( KIO::Job*, const QByteArray& )),
- this, SLOT(slotData( KIO::Job*, const QByteArray& )) );
- connect( d->job, SIGNAL(connected(KIO::Job*)),
- this, SLOT(slotConnected(KIO::Job*)));
- connect( d->job, SIGNAL(mimetype(KIO::Job*, const QString&)),
- this, SLOT(slotMimetype(KIO::Job*, const QString&)));
- connect( d->job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotResult(KIO::Job*)) );
+ connect( d->job, TQT_SIGNAL(data( KIO::Job*, const TQByteArray& )),
+ this, TQT_SLOT(slotData( KIO::Job*, const TQByteArray& )) );
+ connect( d->job, TQT_SIGNAL(connected(KIO::Job*)),
+ this, TQT_SLOT(slotConnected(KIO::Job*)));
+ connect( d->job, TQT_SIGNAL(mimetype(KIO::Job*, const TQString&)),
+ this, TQT_SLOT(slotMimetype(KIO::Job*, const TQString&)));
+ connect( d->job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotResult(KIO::Job*)) );
}
KJavaDownloader::~KJavaDownloader()
@@ -96,13 +96,13 @@ KJavaDownloader::~KJavaDownloader()
delete d;
}
-void KJavaDownloader::slotData( KIO::Job*, const QByteArray& qb )
+void KJavaDownloader::slotData( KIO::Job*, const TQByteArray& qb )
{
//kdDebug(6100) << "slotData(" << d->loaderID << ")" << endl;
KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer();
if (d->isfirstdata) {
- QString headers = d->job->queryMetaData("HTTP-Headers");
+ TQString headers = d->job->queryMetaData("HTTP-Headers");
if (!headers.isEmpty()) {
d->file.resize( headers.length() );
memcpy( d->file.data(), headers.ascii(), headers.length() );
@@ -122,7 +122,7 @@ void KJavaDownloader::slotConnected(KIO::Job*)
d->responseCode = d->job->error();
}
-void KJavaDownloader::slotMimetype(KIO::Job*, const QString & type) {
+void KJavaDownloader::slotMimetype(KIO::Job*, const TQString & type) {
kdDebug(6100) << "slave mimetype " << type << endl;
}
@@ -137,7 +137,7 @@ void KJavaDownloader::slotResult( KIO::Job* )
int code = d->job->error();
if (!code)
code = 404;
- QString codestr = QString::number(code);
+ TQString codestr = TQString::number(code);
d->file.resize(codestr.length());
memcpy( d->file.data(), codestr.ascii(), codestr.length() );
kdDebug(6100) << "slave had an error = " << code << endl;
@@ -191,12 +191,12 @@ public:
}
int loaderID;
KURL* url;
- QByteArray file;
+ TQByteArray file;
KIO::TransferJob* job;
bool finished;
};
-KJavaUploader::KJavaUploader( int ID, const QString& url )
+KJavaUploader::KJavaUploader( int ID, const TQString& url )
{
kdDebug(6100) << "KJavaUploader(" << ID << ") = " << url << endl;
@@ -215,10 +215,10 @@ void KJavaUploader::start()
// create a suspended job
d->job = KIO::put( *d->url, -1, false, false, false );
d->job->suspend();
- connect( d->job, SIGNAL(dataReq( KIO::Job*, QByteArray& )),
- this, SLOT(slotDataRequest( KIO::Job*, QByteArray& )) );
- connect( d->job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotResult(KIO::Job*)) );
+ connect( d->job, TQT_SIGNAL(dataReq( KIO::Job*, TQByteArray& )),
+ this, TQT_SLOT(slotDataRequest( KIO::Job*, TQByteArray& )) );
+ connect( d->job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotResult(KIO::Job*)) );
server->sendURLData( d->loaderID, CONNECTED, d->file );
KJavaAppletServer::freeJavaServer();
}
@@ -228,7 +228,7 @@ KJavaUploader::~KJavaUploader()
delete d;
}
-void KJavaUploader::slotDataRequest( KIO::Job*, QByteArray& qb )
+void KJavaUploader::slotDataRequest( KIO::Job*, TQByteArray& qb )
{
// send our data and suspend
kdDebug(6100) << "slotDataRequest(" << d->loaderID << ") finished:" << d->finished << endl;
@@ -248,7 +248,7 @@ void KJavaUploader::slotDataRequest( KIO::Job*, QByteArray& qb )
KJavaAppletServer::freeJavaServer();
}
-void KJavaUploader::data( const QByteArray& qb )
+void KJavaUploader::data( const TQByteArray& qb )
{
kdDebug(6100) << "KJavaUploader::data(" << d->loaderID << ")" << endl;
d->file.resize( qb.size() );
@@ -266,7 +266,7 @@ void KJavaUploader::slotResult( KIO::Job* )
if (d->job->error())
{
int code = d->job->error();
- QString codestr = QString::number(code);
+ TQString codestr = TQString::number(code);
d->file.resize(codestr.length());
memcpy( d->file.data(), codestr.ascii(), codestr.length() );
kdDebug(6100) << "slave had an error " << code << ": " << d->job->errorString() << endl;
diff --git a/khtml/java/kjavadownloader.h b/khtml/java/kjavadownloader.h
index f49d8fe0c..d3cf0de41 100644
--- a/khtml/java/kjavadownloader.h
+++ b/khtml/java/kjavadownloader.h
@@ -22,7 +22,7 @@
#ifndef KJAVADOWNLOADER_H
#define KJAVADOWNLOADER_H
-#include <qobject.h>
+#include <tqobject.h>
/**
* @short A class for handling downloads from KIO
@@ -46,7 +46,7 @@ Q_OBJECT
public:
virtual ~KJavaKIOJob();
virtual void jobCommand( int cmd ) = 0;
- virtual void data( const QByteArray& qb );
+ virtual void data( const TQByteArray& qb );
};
class KJavaDownloader : public KJavaKIOJob
@@ -54,14 +54,14 @@ class KJavaDownloader : public KJavaKIOJob
Q_OBJECT
public:
- KJavaDownloader( int ID, const QString& url );
+ KJavaDownloader( int ID, const TQString& url );
~KJavaDownloader();
virtual void jobCommand( int cmd );
protected slots:
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotConnected( KIO::Job* );
- void slotMimetype( KIO::Job*, const QString& );
+ void slotMimetype( KIO::Job*, const TQString& );
void slotResult( KIO::Job* );
private:
@@ -74,14 +74,14 @@ class KJavaUploader : public KJavaKIOJob
Q_OBJECT
public:
- KJavaUploader( int ID, const QString& url );
+ KJavaUploader( int ID, const TQString& url );
~KJavaUploader();
virtual void jobCommand( int cmd );
- virtual void data( const QByteArray& qb );
+ virtual void data( const TQByteArray& qb );
void start();
protected slots:
- void slotDataRequest( KIO::Job*, QByteArray& );
+ void slotDataRequest( KIO::Job*, TQByteArray& );
void slotResult( KIO::Job* );
private:
KJavaUploaderPrivate* d;
diff --git a/khtml/java/kjavaprocess.cpp b/khtml/java/kjavaprocess.cpp
index cdc69bcc0..1c9f1b346 100644
--- a/khtml/java/kjavaprocess.cpp
+++ b/khtml/java/kjavaprocess.cpp
@@ -24,25 +24,25 @@
#include <kdebug.h>
#include <kio/kprotocolmanager.h>
-#include <qtextstream.h>
-#include <qmap.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
#include <config.h>
#include <unistd.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KJavaProcessPrivate
{
friend class KJavaProcess;
private:
- QString jvmPath;
- QString classPath;
- QString mainClass;
- QString extraArgs;
- QString classArgs;
- QPtrList<QByteArray> BufferList;
- QMap<QString, QString> systemProps;
+ TQString jvmPath;
+ TQString classPath;
+ TQString mainClass;
+ TQString extraArgs;
+ TQString classArgs;
+ TQPtrList<TQByteArray> BufferList;
+ TQMap<TQString, TQString> systemProps;
bool processKilled;
};
@@ -54,12 +54,12 @@ KJavaProcess::KJavaProcess() : KProcess()
javaProcess = this; //new KProcess();
- connect( javaProcess, SIGNAL( wroteStdin( KProcess * ) ),
- this, SLOT( slotWroteData() ) );
- connect( javaProcess, SIGNAL( receivedStdout( int, int& ) ),
- this, SLOT( slotReceivedData(int, int&) ) );
- connect( javaProcess, SIGNAL( processExited (KProcess *) ),
- this, SLOT( slotExited (KProcess *) ) );
+ connect( javaProcess, TQT_SIGNAL( wroteStdin( KProcess * ) ),
+ this, TQT_SLOT( slotWroteData() ) );
+ connect( javaProcess, TQT_SIGNAL( receivedStdout( int, int& ) ),
+ this, TQT_SLOT( slotReceivedData(int, int&) ) );
+ connect( javaProcess, TQT_SIGNAL( processExited (KProcess *) ),
+ this, TQT_SLOT( slotExited (KProcess *) ) );
d->jvmPath = "java";
d->mainClass = "-help";
@@ -92,47 +92,47 @@ void KJavaProcess::stopJava()
killJVM();
}
-void KJavaProcess::setJVMPath( const QString& path )
+void KJavaProcess::setJVMPath( const TQString& path )
{
d->jvmPath = path;
}
-void KJavaProcess::setClasspath( const QString& classpath )
+void KJavaProcess::setClasspath( const TQString& classpath )
{
d->classPath = classpath;
}
-void KJavaProcess::setSystemProperty( const QString& name,
- const QString& value )
+void KJavaProcess::setSystemProperty( const TQString& name,
+ const TQString& value )
{
d->systemProps.insert( name, value );
}
-void KJavaProcess::setMainClass( const QString& className )
+void KJavaProcess::setMainClass( const TQString& className )
{
d->mainClass = className;
}
-void KJavaProcess::setExtraArgs( const QString& args )
+void KJavaProcess::setExtraArgs( const TQString& args )
{
d->extraArgs = args;
}
-void KJavaProcess::setClassArgs( const QString& args )
+void KJavaProcess::setClassArgs( const TQString& args )
{
d->classArgs = args;
}
//Private Utility Functions used by the two send() methods
-QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
+TQByteArray* KJavaProcess::addArgs( char cmd_code, const TQStringList& args )
{
//the buffer to store stuff, etc.
- QByteArray* const buff = new QByteArray();
- QTextOStream output( *buff );
+ TQByteArray* const buff = new TQByteArray();
+ TQTextOStream output( *buff );
const char sep = 0;
//make space for the command size: 8 characters...
- const QCString space( " " );
+ const TQCString space( " " );
output << space;
//write command code
@@ -145,8 +145,8 @@ QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
}
else
{
- QStringList::ConstIterator it = args.begin();
- const QStringList::ConstIterator itEnd = args.end();
+ TQStringList::ConstIterator it = args.begin();
+ const TQStringList::ConstIterator itEnd = args.end();
for( ; it != itEnd; ++it )
{
if( !(*it).isEmpty() )
@@ -160,10 +160,10 @@ QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
return buff;
}
-void KJavaProcess::storeSize( QByteArray* buff )
+void KJavaProcess::storeSize( TQByteArray* buff )
{
const int size = buff->size() - 8; //subtract out the length of the size_str
- const QString size_str = QString("%1").arg( size, 8 );
+ const TQString size_str = TQString("%1").arg( size, 8 );
kdDebug(6100) << "KJavaProcess::storeSize, size = " << size_str << endl;
const char* size_ptr = size_str.latin1();
@@ -171,7 +171,7 @@ void KJavaProcess::storeSize( QByteArray* buff )
buff->at(i) = size_ptr[i];
}
-void KJavaProcess::sendBuffer( QByteArray* buff )
+void KJavaProcess::sendBuffer( TQByteArray* buff )
{
d->BufferList.append( buff );
if( d->BufferList.count() == 1)
@@ -180,25 +180,25 @@ void KJavaProcess::sendBuffer( QByteArray* buff )
}
}
-void KJavaProcess::send( char cmd_code, const QStringList& args )
+void KJavaProcess::send( char cmd_code, const TQStringList& args )
{
if( isRunning() )
{
- QByteArray* const buff = addArgs( cmd_code, args );
+ TQByteArray* const buff = addArgs( cmd_code, args );
storeSize( buff );
kdDebug(6100) << "<KJavaProcess::send " << (int)cmd_code << endl;
sendBuffer( buff );
}
}
-void KJavaProcess::send( char cmd_code, const QStringList& args,
- const QByteArray& data )
+void KJavaProcess::send( char cmd_code, const TQStringList& args,
+ const TQByteArray& data )
{
if( isRunning() )
{
kdDebug(6100) << "KJavaProcess::send, qbytearray is size = " << data.size() << endl;
- QByteArray* const buff = addArgs( cmd_code, args );
+ TQByteArray* const buff = addArgs( cmd_code, args );
const int cur_size = buff->size();
const int data_size = data.size();
buff->resize( cur_size + data_size );
@@ -211,7 +211,7 @@ void KJavaProcess::send( char cmd_code, const QStringList& args,
void KJavaProcess::popBuffer()
{
- QByteArray* const buf = d->BufferList.first();
+ TQByteArray* const buf = d->BufferList.first();
if( buf )
{
// DEBUG stuff...
@@ -261,12 +261,12 @@ bool KJavaProcess::invokeJVM()
}
//set the system properties, iterate through the qmap of system properties
- QMap<QString,QString>::ConstIterator it = d->systemProps.begin();
- const QMap<QString,QString>::ConstIterator itEnd = d->systemProps.end();
+ TQMap<TQString,TQString>::ConstIterator it = d->systemProps.begin();
+ const TQMap<TQString,TQString>::ConstIterator itEnd = d->systemProps.end();
for( ; it != itEnd; ++it )
{
- QString currarg;
+ TQString currarg;
if( !it.key().isEmpty() )
{
@@ -284,9 +284,9 @@ bool KJavaProcess::invokeJVM()
{
// BUG HERE: if an argument contains space (-Dname="My name")
// this parsing will fail. Need more sophisticated parsing -- use KShell?
- const QStringList args = QStringList::split( " ", d->extraArgs );
- QStringList::ConstIterator it = args.begin();
- const QStringList::ConstIterator itEnd = args.end();
+ const TQStringList args = TQStringList::split( " ", d->extraArgs );
+ TQStringList::ConstIterator it = args.begin();
+ const TQStringList::ConstIterator itEnd = args.end();
for ( ; it != itEnd; ++it )
*javaProcess << *it;
}
@@ -297,10 +297,10 @@ bool KJavaProcess::invokeJVM()
*javaProcess << d->classArgs;
kdDebug(6100) << "Invoking JVM now...with arguments = " << endl;
- QString argStr;
- QTextOStream stream( &argStr );
- const QValueList<QCString> args = javaProcess->args();
- qCopy( args.begin(), args.end(), QTextOStreamIterator<QCString>( stream, " " ) );
+ TQString argStr;
+ TQTextOStream stream( &argStr );
+ const TQValueList<TQCString> args = javaProcess->args();
+ qCopy( args.begin(), args.end(), TQTextOStreamIterator<TQCString>( stream, " " ) );
kdDebug(6100) << argStr << endl;
KProcess::Communication flags = (KProcess::Communication)
@@ -319,8 +319,8 @@ bool KJavaProcess::invokeJVM()
void KJavaProcess::killJVM()
{
d->processKilled = true;
- disconnect( javaProcess, SIGNAL( receivedStdout( int, int& ) ),
- this, SLOT( slotReceivedData(int, int&) ) );
+ disconnect( javaProcess, TQT_SIGNAL( receivedStdout( int, int& ) ),
+ this, TQT_SLOT( slotReceivedData(int, int&) ) );
javaProcess->kill();
}
@@ -355,7 +355,7 @@ void KJavaProcess::slotReceivedData( int fd, int& len )
return;
}
- const QString lengthstr( length );
+ const TQString lengthstr( length );
bool ok;
const int num_len = lengthstr.toInt( &ok );
if( !ok )
@@ -376,7 +376,7 @@ void KJavaProcess::slotReceivedData( int fd, int& len )
return;
}
- QByteArray qb;
+ TQByteArray qb;
emit received( qb.duplicate( msg, num_len ) );
delete[] msg;
len = num_bytes + num_bytes_msg;
diff --git a/khtml/java/kjavaprocess.h b/khtml/java/kjavaprocess.h
index 566e8fda5..3e877685a 100644
--- a/khtml/java/kjavaprocess.h
+++ b/khtml/java/kjavaprocess.h
@@ -25,7 +25,7 @@
#define KJAVAPROCESS_H
#include <kprocess.h>
-#include <qcstring.h>
+#include <tqcstring.h>
/**
* @short A class for invoking a Java VM
@@ -71,7 +71,7 @@ public:
/**
* Used to specify the path to the Java executable to be run.
*/
- void setJVMPath( const QString& path );
+ void setJVMPath( const TQString& path );
/**
* This will set the classpath the Java process will use. It's used as a the
@@ -80,42 +80,42 @@ public:
* users to simply drop the JSSE (Java Secure Sockets Extension classes into that directory
* without having to modify the jvm configuration files.
*/
- void setClasspath( const QString& classpath );
+ void setClasspath( const TQString& classpath );
/**
- * Set a property on the java command line as -Dname=value, or -Dname if value is QString::null.
+ * Set a property on the java command line as -Dname=value, or -Dname if value is TQString::null.
* For example, you could call setSystemProperty( "kjas.debug", "" ) to set the kjas.debug property.
*/
- void setSystemProperty( const QString& name, const QString& value );
+ void setSystemProperty( const TQString& name, const TQString& value );
/**
* The class to be called when startJava() is called.
*/
- void setMainClass( const QString& clazzName );
+ void setMainClass( const TQString& clazzName );
/**
* Extra flags passed to the JVM.
*/
- void setExtraArgs( const QString& args );
+ void setExtraArgs( const TQString& args );
/**
* Arguments passed to the main class. They will be very last in the java
* command line, after the main class.
*/
- void setClassArgs( const QString& classArgs );
+ void setClassArgs( const TQString& classArgs );
/**
* Sends a command to the KJAS Applet Server by building a QByteArray
* out of the data, and then writes it standard out.
*/
- void send( char cmd_code, const QStringList& args );
+ void send( char cmd_code, const TQStringList& args );
/**
* Sends a command to the KJAS Applet Server by building a QByteArray
* out of the data, and then writes it standard out. It adds each QString
* in the arg list, and then adds the data array.
*/
- void send( char cmd_code, const QStringList& args, const QByteArray& data );
+ void send( char cmd_code, const TQStringList& args, const TQByteArray& data );
/**
* Writes all pending data to JVM
@@ -145,15 +145,15 @@ protected:
virtual bool invokeJVM();
virtual void killJVM();
- QByteArray* addArgs( char cmd_code, const QStringList& args );
+ TQByteArray* addArgs( char cmd_code, const TQStringList& args );
void popBuffer();
- void sendBuffer( QByteArray* buff );
- void storeSize( QByteArray* buff );
+ void sendBuffer( TQByteArray* buff );
+ void storeSize( TQByteArray* buff );
KProcess* javaProcess;
signals:
- void received( const QByteArray& );
+ void received( const TQByteArray& );
void exited( int status );
private:
diff --git a/khtml/java/kqeventutil.cpp b/khtml/java/kqeventutil.cpp
index 588051617..ff15e97da 100644
--- a/khtml/java/kqeventutil.cpp
+++ b/khtml/java/kqeventutil.cpp
@@ -19,180 +19,180 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qevent.h>
+#include <tqevent.h>
#include "kqeventutil.h"
-QString KQEventUtil::getQtEventName( QEvent* e )
+TQString KQEventUtil::getQtEventName( TQEvent* e )
{
- QString s;
+ TQString s;
switch( e->type() )
{
- case QEvent::None:
+ case TQEvent::None:
s = "None";
break;
- case QEvent::Timer:
+ case TQEvent::Timer:
s = "Timer";
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
s = "MouseButtonPress";
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
s = "MouseButtonRelease";
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
s = "MouseButtonClick";
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
s = "MouseMove";
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
s = "KeyPress";
break;
- case QEvent::KeyRelease:
+ case TQEvent::KeyRelease:
s = "KeyRelease";
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
s = "FocusIn";
break;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
s = "FocusOut";
break;
- case QEvent::Enter:
+ case TQEvent::Enter:
s = "Enter";
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
s = "Leave";
break;
- case QEvent::Paint:
+ case TQEvent::Paint:
s = "Paint";
break;
- case QEvent::Move:
+ case TQEvent::Move:
s = "Move";
break;
- case QEvent::Resize:
+ case TQEvent::Resize:
s = "Resize";
break;
- case QEvent::Create:
+ case TQEvent::Create:
s = "Create";
break;
- case QEvent::Destroy:
+ case TQEvent::Destroy:
s = "Destroy";
break;
- case QEvent::Show:
+ case TQEvent::Show:
s = "Show";
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
s = "Hide";
break;
- case QEvent::Close:
+ case TQEvent::Close:
s = "Close";
break;
- case QEvent::Quit:
+ case TQEvent::Quit:
s = "Quit";
break;
- case QEvent::Reparent:
+ case TQEvent::Reparent:
s = "Reparent";
break;
- case QEvent::ShowMinimized:
+ case TQEvent::ShowMinimized:
s = "ShowMinimized";
break;
- case QEvent::ShowNormal:
+ case TQEvent::ShowNormal:
s = "ShowNormal";
break;
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
s = "WindowActivate";
break;
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowDeactivate:
s = "WindowDeactivate";
break;
- case QEvent::ShowToParent:
+ case TQEvent::ShowToParent:
s = "ShowToParent";
break;
- case QEvent::HideToParent:
+ case TQEvent::HideToParent:
s = "HideToParent";
break;
- case QEvent::ShowMaximized:
+ case TQEvent::ShowMaximized:
s = "ShowMaximized";
break;
- case QEvent::Accel:
+ case TQEvent::Accel:
s = "Accel";
break;
- case QEvent::Wheel:
+ case TQEvent::Wheel:
s = "Wheel";
break;
- case QEvent::AccelAvailable:
+ case TQEvent::AccelAvailable:
s = "AccelAvailable";
break;
- case QEvent::CaptionChange:
+ case TQEvent::CaptionChange:
s = "CaptionChange";
break;
- case QEvent::IconChange:
+ case TQEvent::IconChange:
s = "IconChange";
break;
- case QEvent::ParentFontChange:
+ case TQEvent::ParentFontChange:
s = "ParentFontChange";
break;
- case QEvent::ApplicationFontChange:
+ case TQEvent::ApplicationFontChange:
s = "ApplicationFontChange";
break;
- case QEvent::ParentPaletteChange:
+ case TQEvent::ParentPaletteChange:
s = "ParentPaletteChange";
break;
- case QEvent::ApplicationPaletteChange:
+ case TQEvent::ApplicationPaletteChange:
s = "ApplicationPaletteChange";
break;
- case QEvent::Clipboard:
+ case TQEvent::Clipboard:
s = "Clipboard";
break;
- case QEvent::Speech:
+ case TQEvent::Speech:
s = "Speech";
break;
- case QEvent::SockAct:
+ case TQEvent::SockAct:
s = "SockAct";
break;
- case QEvent::AccelOverride:
+ case TQEvent::AccelOverride:
s = "AccelOverride";
break;
- case QEvent::DragEnter:
+ case TQEvent::DragEnter:
s = "DragEnter";
break;
- case QEvent::DragMove:
+ case TQEvent::DragMove:
s = "DragMove";
break;
- case QEvent::DragLeave:
+ case TQEvent::DragLeave:
s = "DragLeave";
break;
- case QEvent::Drop:
+ case TQEvent::Drop:
s = "Drop";
break;
- case QEvent::DragResponse:
+ case TQEvent::DragResponse:
s = "DragResponse";
break;
- case QEvent::ChildInserted:
+ case TQEvent::ChildInserted:
s = "ChildInserted";
break;
- case QEvent::ChildRemoved:
+ case TQEvent::ChildRemoved:
s = "ChildRemoved";
break;
- case QEvent::LayoutHint:
+ case TQEvent::LayoutHint:
s = "LayoutHint";
break;
- case QEvent::ShowWindowRequest:
+ case TQEvent::ShowWindowRequest:
s = "ShowWindowRequest";
break;
- case QEvent::ActivateControl:
+ case TQEvent::ActivateControl:
s = "ActivateControl";
break;
- case QEvent::DeactivateControl:
+ case TQEvent::DeactivateControl:
s = "DeactivateControl";
break;
- case QEvent::User:
+ case TQEvent::User:
s = "User Event";
break;
default:
- s = "Undefined Event, value = " + QString::number( e->type() );
+ s = "Undefined Event, value = " + TQString::number( e->type() );
break;
}
diff --git a/khtml/java/kqeventutil.h b/khtml/java/kqeventutil.h
index fd199baa1..9f5194d90 100644
--- a/khtml/java/kqeventutil.h
+++ b/khtml/java/kqeventutil.h
@@ -23,12 +23,12 @@
#ifndef KQEVENTUTIL_H
#define KQEVENTUTIL_H
-#include <qstring.h>
+#include <tqstring.h>
class QEvent;
class KQEventUtil {
public:
- static QString getQtEventName(QEvent *e);
+ static TQString getQtEventName(TQEvent *e);
};
#endif
diff --git a/khtml/java/kxeventutil.cpp b/khtml/java/kxeventutil.cpp
index 0eea8a744..9afa5a5ac 100644
--- a/khtml/java/kxeventutil.cpp
+++ b/khtml/java/kxeventutil.cpp
@@ -23,14 +23,14 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kxeventutil.h"
-QString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
XAnyEvent *e = &xevent->xany;
- QString winname("window");
+ TQString winname("window");
switch (e->type) {
case GraphicsExpose:
case NoExpose:
@@ -49,7 +49,7 @@ QString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
default:
break;
}
- QString s("serial=%1 send_event=%2 display=0x%3 %4=%5");
+ TQString s("serial=%1 send_event=%2 display=0x%3 %4=%5");
return
s.arg(e->serial)
.arg(e->send_event)
@@ -57,10 +57,10 @@ QString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
.arg(winname)
.arg(e->window);
}
-QString KXEventUtil::getXButtonEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXButtonEventInfo(XEvent *xevent) {
XButtonEvent *e = &xevent->xbutton;
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 button=%9");
- QString t(" same_screen=%1");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 button=%9");
+ TQString t(" same_screen=%1");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -74,10 +74,10 @@ QString KXEventUtil::getXButtonEventInfo(XEvent *xevent) {
+t.arg(e->same_screen);
}
-QString KXEventUtil::getXKeyEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXKeyEventInfo(XEvent *xevent) {
XKeyEvent *e = &xevent->xkey;
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 keycode=%9");
- QString t(" same_screen=%1");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 keycode=%9");
+ TQString t(" same_screen=%1");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -91,10 +91,10 @@ QString KXEventUtil::getXKeyEventInfo(XEvent *xevent) {
+t.arg(e->same_screen);
}
-QString KXEventUtil::getXMotionEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXMotionEventInfo(XEvent *xevent) {
XMotionEvent *e = &xevent->xmotion;
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 is_hint=%9");
- QString t(" same_screen=%1");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 is_hint=%9");
+ TQString t(" same_screen=%1");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -107,9 +107,9 @@ QString KXEventUtil::getXMotionEventInfo(XEvent *xevent) {
.arg(e->is_hint)
+t.arg(e->same_screen);
}
-QString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
XCrossingEvent *e = &xevent->xcrossing;
- QString ms, ds;
+ TQString ms, ds;
switch (e->mode) {
case NotifyNormal: ms = "NotifyNormal"; break;
case NotifyGrab: ms = "NotifyGrab"; break;
@@ -125,8 +125,8 @@ QString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
default: ds="?";
}
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 mode=%8=%9 ");
- QString t("detail=%1=%2 same_screen=%3 focus=%4 state=%5");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 mode=%8=%9 ");
+ TQString t("detail=%1=%2 same_screen=%3 focus=%4 state=%5");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -142,16 +142,16 @@ QString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
.arg(e->focus)
.arg(e->state);
}
-QString KXEventUtil::getXFocusChangeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXFocusChangeEventInfo(XEvent *xevent) {
XFocusChangeEvent *e = &xevent->xfocus;
- QString s("mode=%1 detail=%2");
+ TQString s("mode=%1 detail=%2");
return
s.arg(e->mode)
.arg(e->detail);
}
-QString KXEventUtil::getXExposeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXExposeEventInfo(XEvent *xevent) {
XExposeEvent *e = &xevent->xexpose;
- QString s("x=%1 y=%2 width=%3 height=%4 count=%5");
+ TQString s("x=%1 y=%2 width=%3 height=%4 count=%5");
return
s.arg(e->x)
.arg(e->y)
@@ -162,9 +162,9 @@ QString KXEventUtil::getXExposeEventInfo(XEvent *xevent) {
-QString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) {
XGraphicsExposeEvent *e = &xevent->xgraphicsexpose;
- QString s("x=%1 y=%2 width=%3 height=%4 count=%5 major_code=%6 minor_code=%7");
+ TQString s("x=%1 y=%2 width=%3 height=%4 count=%5 major_code=%6 minor_code=%7");
return
s.arg(e->x)
.arg(e->y)
@@ -174,18 +174,18 @@ QString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) {
.arg(e->major_code)
.arg(e->minor_code);
}
-QString KXEventUtil::getXNoExposeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXNoExposeEventInfo(XEvent *xevent) {
XNoExposeEvent *e = &xevent->xnoexpose;
- QString s("major_code=%1 minor_code=%2");
+ TQString s("major_code=%1 minor_code=%2");
return
s.arg(e->major_code)
.arg(e->minor_code);
}
-QString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) {
XCreateWindowEvent *e = &xevent->xcreatewindow;
- QString s("window=%1 x=%2 y=%3 width=%4 height=%5 border_width=%6 override_redirect=%7");
+ TQString s("window=%1 x=%2 y=%3 width=%4 height=%5 border_width=%6 override_redirect=%7");
return
s.arg(e->window)
.arg(e->x)
@@ -196,47 +196,47 @@ QString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) {
.arg(e->override_redirect);
}
-QString KXEventUtil::getXDestroyWindowEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXDestroyWindowEventInfo(XEvent *xevent) {
XDestroyWindowEvent *e = &xevent->xdestroywindow;
- QString s("window=%1");
+ TQString s("window=%1");
return
s.arg(e->window);
}
-QString KXEventUtil::getXMapEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXMapEventInfo(XEvent *xevent) {
XMapEvent *e = &xevent->xmap;
- QString s("window=%1 override_redirect=%2");
+ TQString s("window=%1 override_redirect=%2");
return
s.arg(e->window)
.arg(e->override_redirect);
}
-QString KXEventUtil::getXMappingEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXMappingEventInfo(XEvent *xevent) {
XMappingEvent *e = &xevent->xmapping;
- QString s("request=%1 first_keycode=%2 count=%3");
+ TQString s("request=%1 first_keycode=%2 count=%3");
return
s.arg(e->request)
.arg(e->first_keycode)
.arg(e->count);
}
-QString KXEventUtil::getXReparentEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXReparentEventInfo(XEvent *xevent) {
XReparentEvent *e = &xevent->xreparent;
- QString s("window=%1 parent=%2 x=%3 y=%4");
+ TQString s("window=%1 parent=%2 x=%3 y=%4");
return
s.arg(e->window)
.arg(e->parent)
.arg(e->x)
.arg(e->y);
}
-QString KXEventUtil::getXUnmapEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXUnmapEventInfo(XEvent *xevent) {
XUnmapEvent *e = &xevent->xunmap;
- QString s("window=%1 from_configure=%2");
+ TQString s("window=%1 from_configure=%2");
return
s.arg(e->window)
.arg(e->from_configure);
}
-QString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) {
XConfigureEvent *e = &xevent->xconfigure;
- QString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 override_redirect=%7");
+ TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 override_redirect=%7");
return
s.arg(e->window)
.arg(e->x).arg(e->y)
@@ -246,10 +246,10 @@ QString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) {
.arg(e->override_redirect);
}
-QString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
XConfigureRequestEvent *e = &xevent->xconfigurerequest;
unsigned vm = e->value_mask;
- QStringList vml;
+ TQStringList vml;
if (vm & CWX) vml.append("CWX");
if (vm & CWY) vml.append("CWY");
if (vm & CWWidth) vml.append("CWWidth");
@@ -257,8 +257,8 @@ QString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
if (vm & CWBorderWidth) vml.append("CWBorderWidth");
if (vm & CWSibling) vml.append("CWSibling");
if (vm & CWStackMode) vml.append("CWStackMode");
- QString vms = vml.join("|");
- QString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_mask=0x%8=%9");
+ TQString vms = vml.join("|");
+ TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_mask=0x%8=%9");
return
s.arg(e->window)
.arg(e->x).arg(e->y)
@@ -269,11 +269,11 @@ QString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
.arg(e->value_mask, 0, 16)
.arg(vms);
}
-QString KXEventUtil::getX11EventInfo( XEvent* e )
+TQString KXEventUtil::getX11EventInfo( XEvent* e )
{
- QString anyInfo = getXAnyEventInfo(e);
- QString info = "";
- QString s;
+ TQString anyInfo = getXAnyEventInfo(e);
+ TQString info = "";
+ TQString s;
switch( e->type )
{
case KeyPress:
diff --git a/khtml/java/kxeventutil.h b/khtml/java/kxeventutil.h
index ea5a49bd1..6eb0bf14b 100644
--- a/khtml/java/kxeventutil.h
+++ b/khtml/java/kxeventutil.h
@@ -23,29 +23,29 @@
#include <X11/X.h>
#include <X11/Xlib.h>
-#include <qstring.h>
+#include <tqstring.h>
class KXEventUtil {
public:
- static QString getXEventName(XEvent *e);
- static QString getXAnyEventInfo(XEvent *xevent);
- static QString getXButtonEventInfo(XEvent *xevent);
- static QString getXKeyEventInfo(XEvent *xevent);
- static QString getXMotionEventInfo(XEvent *xevent);
- static QString getXCrossingEventInfo(XEvent *xevent);
- static QString getXFocusChangeEventInfo(XEvent *xevent);
- static QString getXExposeEventInfo(XEvent *xevent);
- static QString getXGraphicsExposeEventInfo(XEvent *xevent);
- static QString getXNoExposeEventInfo(XEvent *xevent);
- static QString getXCreateWindowEventInfo(XEvent *xevent);
- static QString getXDestroyWindowEventInfo(XEvent *xevent);
- static QString getXMapEventInfo(XEvent *xevent);
- static QString getXMappingEventInfo(XEvent *xevent);
- static QString getXReparentEventInfo(XEvent *xevent);
- static QString getXUnmapEventInfo(XEvent *xevent);
- static QString getXConfigureEventInfo(XEvent *xevent);
- static QString getXConfigureRequestEventInfo(XEvent *xevent);
- static QString getX11EventInfo( XEvent* e );
+ static TQString getXEventName(XEvent *e);
+ static TQString getXAnyEventInfo(XEvent *xevent);
+ static TQString getXButtonEventInfo(XEvent *xevent);
+ static TQString getXKeyEventInfo(XEvent *xevent);
+ static TQString getXMotionEventInfo(XEvent *xevent);
+ static TQString getXCrossingEventInfo(XEvent *xevent);
+ static TQString getXFocusChangeEventInfo(XEvent *xevent);
+ static TQString getXExposeEventInfo(XEvent *xevent);
+ static TQString getXGraphicsExposeEventInfo(XEvent *xevent);
+ static TQString getXNoExposeEventInfo(XEvent *xevent);
+ static TQString getXCreateWindowEventInfo(XEvent *xevent);
+ static TQString getXDestroyWindowEventInfo(XEvent *xevent);
+ static TQString getXMapEventInfo(XEvent *xevent);
+ static TQString getXMappingEventInfo(XEvent *xevent);
+ static TQString getXReparentEventInfo(XEvent *xevent);
+ static TQString getXUnmapEventInfo(XEvent *xevent);
+ static TQString getXConfigureEventInfo(XEvent *xevent);
+ static TQString getXConfigureRequestEventInfo(XEvent *xevent);
+ static TQString getX11EventInfo( XEvent* e );
};
#endif
diff --git a/khtml/java/tests/testkjavaappletserver.cpp b/khtml/java/tests/testkjavaappletserver.cpp
index f0c5da19a..63ec3ba3e 100644
--- a/khtml/java/tests/testkjavaappletserver.cpp
+++ b/khtml/java/tests/testkjavaappletserver.cpp
@@ -1,7 +1,7 @@
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <unistd.h>
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
KApplication app;
- QString path_to_kdelibs = "/build/wynnw/kde-src";
+ TQString path_to_kdelibs = "/build/wynnw/kde-src";
KJavaAppletWidget *a = new KJavaAppletWidget;