summaryrefslogtreecommitdiffstats
path: root/nsplugins
diff options
context:
space:
mode:
Diffstat (limited to 'nsplugins')
-rw-r--r--nsplugins/NSPluginCallbackIface.h10
-rw-r--r--nsplugins/kcm_nsplugins.cpp36
-rw-r--r--nsplugins/nspluginloader.cpp102
-rw-r--r--nsplugins/nspluginloader.h50
-rw-r--r--nsplugins/plugin_part.cpp78
-rw-r--r--nsplugins/plugin_part.h54
-rw-r--r--nsplugins/plugin_paths.cpp10
-rw-r--r--nsplugins/plugin_paths.h4
-rw-r--r--nsplugins/pluginscan.cpp152
-rw-r--r--nsplugins/sdk/npruntime.h2
-rw-r--r--nsplugins/test/testnsplugin.cpp38
-rw-r--r--nsplugins/test/testnsplugin.h14
-rw-r--r--nsplugins/viewer/NSPluginClassIface.h18
-rw-r--r--nsplugins/viewer/glibevents.cpp4
-rw-r--r--nsplugins/viewer/glibevents.h6
-rw-r--r--nsplugins/viewer/kxt.cpp72
-rw-r--r--nsplugins/viewer/kxt.h18
-rw-r--r--nsplugins/viewer/nsplugin.cpp242
-rw-r--r--nsplugins/viewer/nsplugin.h136
-rw-r--r--nsplugins/viewer/qxteventloop.cpp74
-rw-r--r--nsplugins/viewer/qxteventloop.h14
-rw-r--r--nsplugins/viewer/viewer.cpp28
22 files changed, 581 insertions, 581 deletions
diff --git a/nsplugins/NSPluginCallbackIface.h b/nsplugins/NSPluginCallbackIface.h
index 5c74bdd7b..33e9f85c3 100644
--- a/nsplugins/NSPluginCallbackIface.h
+++ b/nsplugins/NSPluginCallbackIface.h
@@ -24,7 +24,7 @@
#define __NSPluginCallbackIface_h__
-#include <qcstring.h>
+#include <tqcstring.h>
#include <dcopobject.h>
@@ -34,10 +34,10 @@ class NSPluginCallbackIface : virtual public DCOPObject
k_dcop:
- virtual ASYNC requestURL(QString url, QString target) = 0;
- virtual ASYNC postURL(QString url, QString target, QByteArray data, QString mime) = 0;
- virtual ASYNC statusMessage( QString msg ) = 0;
- virtual ASYNC evalJavaScript( Q_INT32 id, QString script ) = 0;
+ virtual ASYNC requestURL(TQString url, TQString target) = 0;
+ virtual ASYNC postURL(TQString url, TQString target, TQByteArray data, TQString mime) = 0;
+ virtual ASYNC statusMessage( TQString msg ) = 0;
+ virtual ASYNC evalJavaScript( Q_INT32 id, TQString script ) = 0;
};
diff --git a/nsplugins/kcm_nsplugins.cpp b/nsplugins/kcm_nsplugins.cpp
index 0e5c88e6c..dbb5cb1af 100644
--- a/nsplugins/kcm_nsplugins.cpp
+++ b/nsplugins/kcm_nsplugins.cpp
@@ -20,16 +20,16 @@
#include <stdio.h>
#include <unistd.h>
-#include <qregexp.h>
-#include <qlayout.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qwhatsthis.h>
-#include <qvgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqvgroupbox.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -38,38 +38,38 @@
#include "plugin_paths.h"
-static QDateTime lastChanged( QString dir )
+static TQDateTime lastChanged( TQString dir )
{
- QDateTime t = QFileInfo( dir ).lastModified();
+ TQDateTime t = TQFileInfo( dir ).lastModified();
if( t.isNull())
return t;
- QStringList subdirs = QDir( dir ).entryList();
- for( QStringList::ConstIterator it = subdirs.begin();
+ TQStringList subdirs = TQDir( dir ).entryList();
+ for( TQStringList::ConstIterator it = subdirs.begin();
it != subdirs.end();
++it )
{
if( *it == "." || *it == ".." )
continue;
- QDateTime t2 = lastChanged( *it );
+ TQDateTime t2 = lastChanged( *it );
if( !t2.isNull() && t2 > t )
t = t2;
}
return t;
}
-static bool checkSearchPathTimestamps( QStringList paths, QStringList timestamps )
+static bool checkSearchPathTimestamps( TQStringList paths, TQStringList timestamps )
{
- QStringList currentTimestamps;
+ TQStringList currentTimestamps;
bool changed = false;
- QStringList::ConstIterator t = timestamps.begin();
- for( QStringList::ConstIterator it = paths.begin();
+ TQStringList::ConstIterator t = timestamps.begin();
+ for( TQStringList::ConstIterator it = paths.begin();
it != paths.end();
++it, ++t )
{
- QDateTime current = lastChanged( *it );
+ TQDateTime current = lastChanged( *it );
// store non-existent directory as "N" string rather than empty string, KConfig
// has a bug with storing a list of empty items
- if( *t == "N" ? !current.isNull() : current != QDateTime::fromString( *t, Qt::ISODate ))
+ if( *t == "N" ? !current.isNull() : current != TQDateTime::fromString( *t, Qt::ISODate ))
changed = true;
currentTimestamps.append( current.isNull() ? "N" : current.toString( Qt::ISODate ));
}
@@ -98,9 +98,9 @@ extern "C"
// check if plugins have changed, as just ignoring everything and requiring the user
// to trigger the check manually is not reasonable - that probably actually obsoletes
// both options
- QStringList searchPaths = getSearchPaths();
- QStringList lastSearchPaths = config->readListEntry( "lastSearchPaths" );
- QStringList lastTimestamps = config->readListEntry ( "lastSearchTimestamps" );
+ TQStringList searchPaths = getSearchPaths();
+ TQStringList lastSearchPaths = config->readListEntry( "lastSearchPaths" );
+ TQStringList lastTimestamps = config->readListEntry ( "lastSearchTimestamps" );
if( searchPaths != lastSearchPaths || lastTimestamps.count() != lastSearchPaths.count())
{ // count changed, set empty timestamps, still call checkSearchPathTimestamps()
// in order to save the current timestamps for the next time
diff --git a/nsplugins/nspluginloader.cpp b/nsplugins/nspluginloader.cpp
index 91afa150d..e9c502169 100644
--- a/nsplugins/nspluginloader.cpp
+++ b/nsplugins/nspluginloader.cpp
@@ -24,7 +24,7 @@
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kapplication.h>
@@ -36,13 +36,13 @@
#include <kconfig.h>
#include <dcopclient.h>
#include <dcopstub.h>
-#include <qlayout.h>
-#include <qobject.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqobject.h>
+#include <tqpushbutton.h>
#include <qxembed.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include "nspluginloader.h"
#include "nspluginloader.moc"
@@ -55,21 +55,21 @@ NSPluginLoader *NSPluginLoader::s_instance = 0;
int NSPluginLoader::s_refCount = 0;
-NSPluginInstance::NSPluginInstance(QWidget *parent)
+NSPluginInstance::NSPluginInstance(TQWidget *parent)
: EMBEDCLASS(parent), _loader( NULL ), shown( false ), inited( false ), resize_count( 0 ), stub( NULL )
{
}
-void NSPluginInstance::init(const QCString& app, const QCString& obj)
+void NSPluginInstance::init(const TQCString& app, const TQCString& obj)
{
stub = new NSPluginInstanceIface_stub( app, obj );
- QGridLayout *_layout = new QGridLayout(this, 1, 1);
+ TQGridLayout *_layout = new TQGridLayout(this, 1, 1);
KConfig cfg("kcmnspluginrc", false);
cfg.setGroup("Misc");
if (cfg.readBoolEntry("demandLoad", false)) {
- _button = new QPushButton(i18n("Start Plugin"), dynamic_cast<EMBEDCLASS*>(this));
+ _button = new TQPushButton(i18n("Start Plugin"), dynamic_cast<EMBEDCLASS*>(this));
_layout->addWidget(_button, 0, 0);
- connect(_button, SIGNAL(clicked()), this, SLOT(loadPlugin()));
+ connect(_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadPlugin()));
show();
} else {
_button = 0L;
@@ -80,7 +80,7 @@ void NSPluginInstance::init(const QCString& app, const QCString& obj)
// and use 'resize_count' to wait for that one more resize to come (plus a timer
// for a possible timeout). Only then flash is actually initialized ('inited' is true).
resize_count = 1;
- QTimer::singleShot( 1000, this, SLOT( doLoadPlugin()));
+ TQTimer::singleShot( 1000, this, TQT_SLOT( doLoadPlugin()));
}
}
@@ -94,7 +94,7 @@ void NSPluginInstance::loadPlugin()
void NSPluginInstance::doLoadPlugin() {
if (!inited && !_button) {
_loader = NSPluginLoader::instance();
- setBackgroundMode(QWidget::NoBackground);
+ setBackgroundMode(TQWidget::NoBackground);
WId winid = stub->winId();
if( winid != 0 ) {
setProtocol(QXEmbed::XPLAIN);
@@ -127,7 +127,7 @@ NSPluginInstance::~NSPluginInstance()
void NSPluginInstance::windowChanged(WId w)
{
- setBackgroundMode(w == 0 ? QWidget::PaletteBackground : QWidget::NoBackground);
+ setBackgroundMode(w == 0 ? TQWidget::PaletteBackground : TQWidget::NoBackground);
if (w == 0) {
// FIXME: Put a notice here to tell the user that it crashed.
repaint();
@@ -135,7 +135,7 @@ void NSPluginInstance::windowChanged(WId w)
}
-void NSPluginInstance::resizeEvent(QResizeEvent *event)
+void NSPluginInstance::resizeEvent(TQResizeEvent *event)
{
if (shown == false) // ignore all resizes before being shown
return;
@@ -152,7 +152,7 @@ void NSPluginInstance::resizeEvent(QResizeEvent *event)
kdDebug() << "NSPluginInstance(client)::resizeEvent" << endl;
}
-void NSPluginInstance::showEvent(QShowEvent *event)
+void NSPluginInstance::showEvent(TQShowEvent *event)
{
EMBEDCLASS::showEvent(event);
shown = true;
@@ -162,12 +162,12 @@ void NSPluginInstance::showEvent(QShowEvent *event)
resizePlugin(width(), height());
}
-void NSPluginInstance::focusInEvent( QFocusEvent* event )
+void NSPluginInstance::focusInEvent( TQFocusEvent* event )
{
stub->gotFocusIn();
}
-void NSPluginInstance::focusOutEvent( QFocusEvent* event )
+void NSPluginInstance::focusOutEvent( TQFocusEvent* event )
{
stub->gotFocusOut();
}
@@ -194,7 +194,7 @@ void NSPluginInstance::shutdown()
NSPluginLoader::NSPluginLoader()
- : QObject(), _mapping(7, false), _viewer(0)
+ : TQObject(), _mapping(7, false), _viewer(0)
{
scanPlugins();
_mapping.setAutoDelete( true );
@@ -202,9 +202,9 @@ NSPluginLoader::NSPluginLoader()
// trap dcop register events
kapp->dcopClient()->setNotifications(true);
- QObject::connect(kapp->dcopClient(),
- SIGNAL(applicationRegistered(const QCString&)),
- this, SLOT(applicationRegistered(const QCString&)));
+ TQObject::connect(kapp->dcopClient(),
+ TQT_SIGNAL(applicationRegistered(const TQCString&)),
+ this, TQT_SLOT(applicationRegistered(const TQCString&)));
// load configuration
KConfig cfg("kcmnspluginrc", false);
@@ -248,19 +248,19 @@ NSPluginLoader::~NSPluginLoader()
void NSPluginLoader::scanPlugins()
{
- QRegExp version(";version=[^:]*:");
+ TQRegExp version(";version=[^:]*:");
// open the cache file
- QFile cachef(locate("data", "nsplugins/cache"));
+ TQFile cachef(locate("data", "nsplugins/cache"));
if (!cachef.open(IO_ReadOnly)) {
kdDebug() << "Could not load plugin cache file!" << endl;
return;
}
- QTextStream cache(&cachef);
+ TQTextStream cache(&cachef);
// read in cache
- QString line, plugin;
+ TQString line, plugin;
while (!cache.atEnd()) {
line = cache.readLine();
if (line.isEmpty() || (line.left(1) == "#"))
@@ -272,20 +272,20 @@ void NSPluginLoader::scanPlugins()
continue;
}
- QStringList desc = QStringList::split(':', line, TRUE);
- QString mime = desc[0].stripWhiteSpace();
- QStringList suffixes = QStringList::split(',', desc[1].stripWhiteSpace());
+ TQStringList desc = TQStringList::split(':', line, TRUE);
+ TQString mime = desc[0].stripWhiteSpace();
+ TQStringList suffixes = TQStringList::split(',', desc[1].stripWhiteSpace());
if (!mime.isEmpty())
{
// insert the mimetype -> plugin mapping
- _mapping.insert(mime, new QString(plugin));
+ _mapping.insert(mime, new TQString(plugin));
// insert the suffix -> mimetype mapping
- QStringList::Iterator suffix;
+ TQStringList::Iterator suffix;
for (suffix = suffixes.begin(); suffix != suffixes.end(); ++suffix) {
// strip whitspaces and any preceding '.'
- QString stripped = (*suffix).stripWhiteSpace();
+ TQString stripped = (*suffix).stripWhiteSpace();
unsigned p=0;
for ( ; p<stripped.length() && stripped[p]=='.'; p++ );
@@ -293,30 +293,30 @@ void NSPluginLoader::scanPlugins()
// add filetype to list
if ( !stripped.isEmpty() && !_filetype.find(stripped) )
- _filetype.insert( stripped, new QString(mime));
+ _filetype.insert( stripped, new TQString(mime));
}
}
}
}
-QString NSPluginLoader::lookupMimeType(const QString &url)
+TQString NSPluginLoader::lookupMimeType(const TQString &url)
{
- QDictIterator<QString> dit2(_filetype);
+ TQDictIterator<TQString> dit2(_filetype);
while (dit2.current())
{
- QString ext = QString(".")+dit2.currentKey();
+ TQString ext = TQString(".")+dit2.currentKey();
if (url.right(ext.length()) == ext)
return *dit2.current();
++dit2;
}
- return QString::null;
+ return TQString::null;
}
-QString NSPluginLoader::lookup(const QString &mimeType)
+TQString NSPluginLoader::lookup(const TQString &mimeType)
{
- QString plugin;
+ TQString plugin;
if ( _mapping[mimeType] )
plugin = *_mapping[mimeType];
@@ -337,11 +337,11 @@ bool NSPluginLoader::loadViewer()
int pid = (int)getpid();
_dcopid.sprintf("nspluginviewer-%d", pid);
- connect( _process, SIGNAL(processExited(KProcess*)),
- this, SLOT(processTerminated(KProcess*)) );
+ connect( _process, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(processTerminated(KProcess*)) );
// find the external viewer process
- QString viewer = KGlobal::dirs()->findExe("nspluginviewer");
+ TQString viewer = KGlobal::dirs()->findExe("nspluginviewer");
if (!viewer)
{
kdDebug() << "can't find nspluginviewer" << endl;
@@ -352,7 +352,7 @@ bool NSPluginLoader::loadViewer()
// find the external artsdsp process
if( _useArtsdsp ) {
kdDebug() << "trying to use artsdsp" << endl;
- QString artsdsp = KGlobal::dirs()->findExe("artsdsp");
+ TQString artsdsp = KGlobal::dirs()->findExe("artsdsp");
if (!artsdsp)
{
kdDebug() << "can't find artsdsp" << endl;
@@ -429,7 +429,7 @@ void NSPluginLoader::unloadViewer()
}
-void NSPluginLoader::applicationRegistered( const QCString& appId )
+void NSPluginLoader::applicationRegistered( const TQCString& appId )
{
kdDebug() << "DCOP application " << appId.data() << " just registered!" << endl;
@@ -454,10 +454,10 @@ void NSPluginLoader::processTerminated(KProcess *proc)
}
-NSPluginInstance *NSPluginLoader::newInstance(QWidget *parent, QString url,
- QString mimeType, bool embed,
- QStringList argn, QStringList argv,
- QString appId, QString callbackId, bool reload, bool doPost, QByteArray postData)
+NSPluginInstance *NSPluginLoader::newInstance(TQWidget *parent, TQString url,
+ TQString mimeType, bool embed,
+ TQStringList argn, TQStringList argv,
+ TQString appId, TQString callbackId, bool reload, bool doPost, TQByteArray postData)
{
kdDebug() << "-> NSPluginLoader::NewInstance( parent=" << (void*)parent << ", url=" << url << ", mime=" << mimeType << ", ...)" << endl;
@@ -474,7 +474,7 @@ NSPluginInstance *NSPluginLoader::newInstance(QWidget *parent, QString url,
}
// check the mime type
- QString mime = mimeType;
+ TQString mime = mimeType;
if (mime.isEmpty())
{
mime = lookupMimeType( url );
@@ -488,7 +488,7 @@ NSPluginInstance *NSPluginLoader::newInstance(QWidget *parent, QString url,
}
// lookup plugin for mime type
- QString plugin_name = lookup(mime);
+ TQString plugin_name = lookup(mime);
if (plugin_name.isEmpty())
{
kdDebug() << "No suitable plugin" << endl;
diff --git a/nsplugins/nspluginloader.h b/nsplugins/nspluginloader.h
index fab3c1364..c8baa7f5a 100644
--- a/nsplugins/nspluginloader.h
+++ b/nsplugins/nspluginloader.h
@@ -28,11 +28,11 @@
#define __NS_PLUGINLOADER_H__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqwidget.h>
#include <qxembed.h>
#include "NSPluginClassIface_stub.h"
@@ -48,28 +48,28 @@ class NSPluginInstance : public EMBEDCLASS
Q_OBJECT
public:
- NSPluginInstance(QWidget *parent);
- void init( const QCString& app, const QCString& obj );
+ NSPluginInstance(TQWidget *parent);
+ void init( const TQCString& app, const TQCString& obj );
~NSPluginInstance();
public: // wrappers
- void javascriptResult( int id, QString result ) { stub->javascriptResult( id, result ); }
+ void javascriptResult( int id, TQString result ) { stub->javascriptResult( id, result ); }
private slots:
void loadPlugin();
void doLoadPlugin();
protected:
- void resizeEvent(QResizeEvent *event);
- void showEvent (QShowEvent *);
+ void resizeEvent(TQResizeEvent *event);
+ void showEvent (TQShowEvent *);
void windowChanged(WId w);
- virtual void focusInEvent( QFocusEvent* event );
- virtual void focusOutEvent( QFocusEvent* event );
+ virtual void focusInEvent( TQFocusEvent* event );
+ virtual void focusOutEvent( TQFocusEvent* event );
class NSPluginLoader *_loader;
bool shown;
bool inited;
int resize_count;
- QPushButton *_button;
- QGridLayout *_layout;
+ TQPushButton *_button;
+ TQGridLayout *_layout;
NSPluginInstanceIface_stub* stub;
private: // wrappers
void displayPlugin();
@@ -86,11 +86,11 @@ public:
NSPluginLoader();
~NSPluginLoader();
- NSPluginInstance *newInstance(QWidget *parent,
- QString url, QString mimeType, bool embed,
- QStringList argn, QStringList argv,
- QString appId, QString callbackId, bool reload,
- bool doPost, QByteArray postData);
+ NSPluginInstance *newInstance(TQWidget *parent,
+ TQString url, TQString mimeType, bool embed,
+ TQStringList argn, TQStringList argv,
+ TQString appId, TQString callbackId, bool reload,
+ bool doPost, TQByteArray postData);
static NSPluginLoader *instance();
void release();
@@ -98,23 +98,23 @@ public:
protected:
void scanPlugins();
- QString lookup(const QString &mimeType);
- QString lookupMimeType(const QString &url);
+ TQString lookup(const TQString &mimeType);
+ TQString lookupMimeType(const TQString &url);
bool loadViewer();
void unloadViewer();
protected slots:
- void applicationRegistered( const QCString& appId );
+ void applicationRegistered( const TQCString& appId );
void processTerminated( KProcess *proc );
private:
- QStringList _searchPaths;
- QDict<QString> _mapping, _filetype;
+ TQStringList _searchPaths;
+ TQDict<TQString> _mapping, _filetype;
KProcess *_process;
bool _running;
- QCString _dcopid;
+ TQCString _dcopid;
NSPluginViewerIface_stub *_viewer;
bool _useArtsdsp;
diff --git a/nsplugins/plugin_part.cpp b/nsplugins/plugin_part.cpp
index 58dae2fc2..e7580db93 100644
--- a/nsplugins/plugin_part.cpp
+++ b/nsplugins/plugin_part.cpp
@@ -31,7 +31,7 @@
#include <kparts/browserinterface.h>
#include <kparts/browserextension.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "nspluginloader.h"
#include "plugin_part.h"
@@ -57,7 +57,7 @@ PluginLiveConnectExtension::PluginLiveConnectExtension(PluginPart* part)
PluginLiveConnectExtension::~PluginLiveConnectExtension() {
}
-bool PluginLiveConnectExtension::get(const unsigned long, const QString &field, Type &type, unsigned long &retobj, QString &value) {
+bool PluginLiveConnectExtension::get(const unsigned long, const TQString &field, Type &type, unsigned long &retobj, TQString &value) {
Q_UNUSED(type);
Q_UNUSED(retobj);
Q_UNUSED(value);
@@ -65,7 +65,7 @@ Q_UNUSED(value);
return false;
}
-bool PluginLiveConnectExtension::call(const unsigned long, const QString &func, const QStringList &args, Type &type, unsigned long &retobjid, QString &value) {
+bool PluginLiveConnectExtension::call(const unsigned long, const TQString &func, const TQStringList &args, Type &type, unsigned long &retobjid, TQString &value) {
Q_UNUSED(type);
Q_UNUSED(retobjid);
Q_UNUSED(value);
@@ -73,7 +73,7 @@ Q_UNUSED(value);
return false;
}
-bool PluginLiveConnectExtension::put( const unsigned long, const QString &field, const QString &value) {
+bool PluginLiveConnectExtension::put( const unsigned long, const TQString &field, const TQString &value) {
kdDebug(1432) << "PLUGIN:LiveConnect::put " << field << " " << value << endl;
if (_retval && field == "__nsplugin") {
*_retval = value;
@@ -85,15 +85,15 @@ bool PluginLiveConnectExtension::put( const unsigned long, const QString &field,
return false;
}
-QString PluginLiveConnectExtension::evalJavaScript( const QString & script )
+TQString PluginLiveConnectExtension::evalJavaScript( const TQString & script )
{
kdDebug(1432) << "PLUGIN:LiveConnect::evalJavaScript " << script << endl;
ArgList args;
- QString jscode;
- jscode.sprintf("this.__nsplugin=eval(\"%s\")", QString(script).replace('\\', "\\\\").replace('"', "\\\"").latin1());
+ TQString jscode;
+ jscode.sprintf("this.__nsplugin=eval(\"%s\")", TQString(script).replace('\\', "\\\\").replace('"', "\\\"").latin1());
//kdDebug(1432) << "String is [" << jscode << "]" << endl;
args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, jscode));
- QString nsplugin("Undefined");
+ TQString nsplugin("Undefined");
_retval = &nsplugin;
emit partEvent(0, "eval", args);
_retval = 0L;
@@ -119,25 +119,25 @@ NSPluginCallback::NSPluginCallback(PluginPart *part)
}
-void NSPluginCallback::postURL(QString url, QString target, QByteArray data, QString mime)
+void NSPluginCallback::postURL(TQString url, TQString target, TQByteArray data, TQString mime)
{
_part->postURL( url, target, data, mime );
}
-void NSPluginCallback::requestURL(QString url, QString target)
+void NSPluginCallback::requestURL(TQString url, TQString target)
{
_part->requestURL( url, target );
}
-void NSPluginCallback::statusMessage( QString msg )
+void NSPluginCallback::statusMessage( TQString msg )
{
_part->statusMessage( msg );
}
-void NSPluginCallback::evalJavaScript( int id, QString script )
+void NSPluginCallback::evalJavaScript( int id, TQString script )
{
_part->evalJavaScript( id, script );
}
@@ -171,9 +171,9 @@ PluginFactory::~PluginFactory()
s_instance = 0;
}
-KParts::Part * PluginFactory::createPartObject(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args)
+KParts::Part * PluginFactory::createPartObject(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args)
{
Q_UNUSED(classname)
kdDebug(1432) << "PluginFactory::create" << endl;
@@ -201,8 +201,8 @@ KAboutData *PluginFactory::aboutData()
/**************************************************************************/
-PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList &args)
+PluginPart::PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList &args)
: KParts::ReadOnlyPart(parent, name), _widget(0), _args(args),
_destructed(0L)
{
@@ -217,7 +217,7 @@ PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *p
// Only create this if we have no parent since the parent part is
// responsible for "Save As" then
if (!parent || !parent->inherits("Part")) {
- new KAction(i18n("&Save As..."), CTRL+Key_S, this, SLOT(saveAs()), actionCollection(), "saveDocument");
+ new KAction(i18n("&Save As..."), CTRL+Key_S, this, TQT_SLOT(saveAs()), actionCollection(), "saveDocument");
setXMLFile("nspluginpart.rc");
}
@@ -227,13 +227,13 @@ PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *p
// create a canvas to insert our widget
_canvas = new PluginCanvasWidget( parentWidget, widgetName );
- //_canvas->setFocusPolicy( QWidget::ClickFocus );
- _canvas->setFocusPolicy( QWidget::WheelFocus );
- _canvas->setBackgroundMode( QWidget::NoBackground );
+ //_canvas->setFocusPolicy( TQWidget::ClickFocus );
+ _canvas->setFocusPolicy( TQWidget::WheelFocus );
+ _canvas->setBackgroundMode( TQWidget::NoBackground );
setWidget(_canvas);
_canvas->show();
- QObject::connect( _canvas, SIGNAL(resized(int,int)),
- this, SLOT(pluginResized(int,int)) );
+ TQObject::connect( _canvas, TQT_SIGNAL(resized(int,int)),
+ this, TQT_SLOT(pluginResized(int,int)) );
}
@@ -254,23 +254,23 @@ bool PluginPart::openURL(const KURL &url)
kdDebug(1432) << "-> PluginPart::openURL" << endl;
m_url = url;
- QString surl = url.url();
- QString smime = _extension->urlArgs().serviceType;
+ TQString surl = url.url();
+ TQString smime = _extension->urlArgs().serviceType;
bool reload = _extension->urlArgs().reload;
bool embed = false;
bool post = _extension->urlArgs().doPost();
// handle arguments
- QStringList argn, argv;
+ TQStringList argn, argv;
- QStringList::Iterator it = _args.begin();
+ TQStringList::Iterator it = _args.begin();
for ( ; it != _args.end(); ) {
int equalPos = (*it).find("=");
if (equalPos>0) {
- QString name = (*it).left(equalPos).upper();
- QString value = (*it).mid(equalPos+1);
+ TQString name = (*it).left(equalPos).upper();
+ TQString value = (*it).mid(equalPos+1);
if (value[0] == '"' && value[value.length()-1] == '"')
value = value.mid(1, value.length()-2);
@@ -306,7 +306,7 @@ bool PluginPart::openURL(const KURL &url)
if ( inst ) {
_widget = inst;
} else {
- QLabel *label = new QLabel( i18n("Unable to load Netscape plugin for %1").arg(url.url()), _canvas );
+ TQLabel *label = new TQLabel( i18n("Unable to load Netscape plugin for %1").arg(url.url()), _canvas );
label->setAlignment( AlignCenter | WordBreak );
_widget = label;
}
@@ -334,7 +334,7 @@ void PluginPart::reloadPage()
_extension->browserInterface()->callMethod("goHistory(int)", 0);
}
-void PluginPart::postURL(const QString& url, const QString& target, const QByteArray& data, const QString& mime)
+void PluginPart::postURL(const TQString& url, const TQString& target, const TQByteArray& data, const TQString& mime)
{
kdDebug(1432) << "PluginPart::postURL( url=" << url
<< ", target=" << target << endl;
@@ -349,7 +349,7 @@ void PluginPart::postURL(const QString& url, const QString& target, const QByteA
emit _extension->openURLRequest(new_url, args);
}
-void PluginPart::requestURL(const QString& url, const QString& target)
+void PluginPart::requestURL(const TQString& url, const TQString& target)
{
kdDebug(1432) << "PluginPart::requestURL( url=" << url
<< ", target=" << target << endl;
@@ -362,14 +362,14 @@ void PluginPart::requestURL(const QString& url, const QString& target)
emit _extension->openURLRequest(new_url, args);
}
-void PluginPart::evalJavaScript(int id, const QString & script)
+void PluginPart::evalJavaScript(int id, const TQString & script)
{
kdDebug(1432) <<"evalJavascript: before widget check"<<endl;
if (_widget) {
bool destructed = false;
_destructed = &destructed;
kdDebug(1432) <<"evalJavascript: there is a widget" <<endl;
- QString rc = _liveconnect->evalJavaScript(script);
+ TQString rc = _liveconnect->evalJavaScript(script);
if (destructed)
return;
_destructed = 0L;
@@ -380,7 +380,7 @@ void PluginPart::evalJavaScript(int id, const QString & script)
}
}
-void PluginPart::statusMessage(QString msg)
+void PluginPart::statusMessage(TQString msg)
{
kdDebug(1422) << "PluginPart::statusMessage " << msg << endl;
emit setStatusBarText(msg);
@@ -397,21 +397,21 @@ void PluginPart::pluginResized(int w, int h)
}
-void PluginPart::changeSrc(const QString& url) {
+void PluginPart::changeSrc(const TQString& url) {
closeURL();
openURL(KURL( url ));
}
void PluginPart::saveAs() {
- KURL savefile = KFileDialog::getSaveURL(QString::null, QString::null, _widget);
+ KURL savefile = KFileDialog::getSaveURL(TQString::null, TQString::null, _widget);
KIO::NetAccess::copy(m_url, savefile, _widget);
}
-void PluginCanvasWidget::resizeEvent(QResizeEvent *ev)
+void PluginCanvasWidget::resizeEvent(TQResizeEvent *ev)
{
- QWidget::resizeEvent(ev);
+ TQWidget::resizeEvent(ev);
emit resized(width(), height());
}
diff --git a/nsplugins/plugin_part.h b/nsplugins/plugin_part.h
index a6ac548a2..910004c79 100644
--- a/nsplugins/plugin_part.h
+++ b/nsplugins/plugin_part.h
@@ -28,8 +28,8 @@
#include <kparts/factory.h>
#include <kparts/part.h>
#include <klibloader.h>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
class KAboutData;
class KInstance;
@@ -49,10 +49,10 @@ public:
NSPluginCallback(PluginPart *part);
ASYNC reloadPage();
- ASYNC requestURL(QString url, QString target);
- ASYNC postURL(QString url, QString target, QByteArray data, QString mime);
- ASYNC statusMessage( QString msg );
- ASYNC evalJavaScript( int id, QString script );
+ ASYNC requestURL(TQString url, TQString target);
+ ASYNC postURL(TQString url, TQString target, TQByteArray data, TQString mime);
+ ASYNC statusMessage( TQString msg );
+ ASYNC evalJavaScript( int id, TQString script );
private:
PluginPart *_part;
@@ -67,10 +67,10 @@ public:
PluginFactory();
virtual ~PluginFactory();
- virtual KParts::Part * createPartObject(QWidget *parentWidget = 0, const char *widgetName = 0,
- QObject *parent = 0, const char *name = 0,
+ virtual KParts::Part * createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
+ TQObject *parent = 0, const char *name = 0,
const char *classname = "KParts::Part",
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
static KInstance *instance();
static KAboutData *aboutData();
@@ -87,11 +87,11 @@ class PluginCanvasWidget : public QWidget
Q_OBJECT
public:
- PluginCanvasWidget(QWidget *parent=0, const char *name=0)
- : QWidget(parent,name) {}
+ PluginCanvasWidget(TQWidget *parent=0, const char *name=0)
+ : TQWidget(parent,name) {}
protected:
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
signals:
void resized(int,int);
@@ -102,17 +102,17 @@ class PluginPart: public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- PluginPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList &args = QStringList());
+ PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList &args = TQStringList());
virtual ~PluginPart();
- void postURL(const QString& url, const QString& target, const QByteArray& data, const QString& mime);
- void requestURL(const QString& url, const QString& target);
- void statusMessage( QString msg );
- void evalJavaScript( int id, const QString& script );
+ void postURL(const TQString& url, const TQString& target, const TQByteArray& data, const TQString& mime);
+ void requestURL(const TQString& url, const TQString& target);
+ void statusMessage( TQString msg );
+ void evalJavaScript( int id, const TQString& script );
void reloadPage();
- void changeSrc(const QString& url);
+ void changeSrc(const TQString& url);
protected:
virtual bool openURL(const KURL &url);
@@ -124,12 +124,12 @@ protected slots:
void saveAs();
private:
- QGuardedPtr<QWidget> _widget;
+ TQGuardedPtr<TQWidget> _widget;
PluginCanvasWidget *_canvas;
PluginBrowserExtension *_extension;
PluginLiveConnectExtension *_liveconnect;
NSPluginCallback *_callback;
- QStringList _args;
+ TQStringList _args;
class NSPluginLoader *_loader;
bool *_destructed;
};
@@ -141,18 +141,18 @@ Q_OBJECT
public:
PluginLiveConnectExtension(PluginPart* part);
virtual ~PluginLiveConnectExtension();
- virtual bool put(const unsigned long, const QString &field, const QString &value);
- virtual bool get(const unsigned long, const QString&, Type&, unsigned long&, QString&);
- virtual bool call(const unsigned long, const QString&, const QStringList&, Type&, unsigned long&, QString&);
+ virtual bool put(const unsigned long, const TQString &field, const TQString &value);
+ virtual bool get(const unsigned long, const TQString&, Type&, unsigned long&, TQString&);
+ virtual bool call(const unsigned long, const TQString&, const TQStringList&, Type&, unsigned long&, TQString&);
- QString evalJavaScript( const QString & script );
+ TQString evalJavaScript( const TQString & script );
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:
PluginPart *_part;
- QString *_retval;
+ TQString *_retval;
};
diff --git a/nsplugins/plugin_paths.cpp b/nsplugins/plugin_paths.cpp
index 2c228ac25..8406ecebc 100644
--- a/nsplugins/plugin_paths.cpp
+++ b/nsplugins/plugin_paths.cpp
@@ -28,16 +28,16 @@
#include <kconfig.h>
#include <stdlib.h>
-QStringList getSearchPaths()
+TQStringList getSearchPaths()
{
- QStringList searchPaths;
+ TQStringList searchPaths;
KConfig *config = new KConfig("kcmnspluginrc", false);
config->setGroup("Misc");
// setup default paths
if ( !config->hasKey("scanPaths") ) {
- QStringList paths;
+ TQStringList paths;
// keep sync with kdebase/kcontrol/konqhtml
paths.append("$HOME/.mozilla/plugins");
paths.append("$HOME/.netscape/plugins");
@@ -67,8 +67,8 @@ QStringList getSearchPaths()
delete config;
// append environment variable NPX_PLUGIN_PATH
- QStringList envs = QStringList::split(':', getenv("NPX_PLUGIN_PATH"));
- QStringList::Iterator it;
+ TQStringList envs = TQStringList::split(':', getenv("NPX_PLUGIN_PATH"));
+ TQStringList::Iterator it;
for (it = envs.begin(); it != envs.end(); ++it)
searchPaths.append(*it);
diff --git a/nsplugins/plugin_paths.h b/nsplugins/plugin_paths.h
index bd2cbbcf4..126d65665 100644
--- a/nsplugins/plugin_paths.h
+++ b/nsplugins/plugin_paths.h
@@ -1,8 +1,8 @@
#ifndef PLUGIN_PATHS_H
#define PLUGIN_PATHS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
-extern QStringList getSearchPaths();
+extern TQStringList getSearchPaths();
#endif
diff --git a/nsplugins/pluginscan.cpp b/nsplugins/pluginscan.cpp
index cfa544429..82a5defb2 100644
--- a/nsplugins/pluginscan.cpp
+++ b/nsplugins/pluginscan.cpp
@@ -32,11 +32,11 @@
#include <signal.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <dcopclient.h>
@@ -110,7 +110,7 @@ void pullInXt()
KConfig *infoConfig = 0;
-bool isPluginMimeType( QString fname )
+bool isPluginMimeType( TQString fname )
{
KDesktopFile cfg( fname, true );
cfg.setDesktopGroup();
@@ -121,9 +121,9 @@ bool isPluginMimeType( QString fname )
void deletePluginMimeTypes()
{
// iterate through local mime type directories
- QString dir = KGlobal::dirs()->saveLocation( "mime" );
+ TQString dir = KGlobal::dirs()->saveLocation( "mime" );
kdDebug(1433) << "Removing nsplugin MIME types in " << dir << endl;
- QDir dirs( dir, QString::null, QDir::Name|QDir::IgnoreCase, QDir::Dirs );
+ TQDir dirs( dir, TQString::null, TQDir::Name|TQDir::IgnoreCase, TQDir::Dirs );
if ( !dirs.exists() ) {
kdDebug(1433) << "Directory not found" << endl;
return;
@@ -134,8 +134,8 @@ void deletePluginMimeTypes()
// check all mime types for X-KDE-nsplugin flag
kdDebug(1433) << " - Looking in " << dirs[i] << endl;
- QDir files( dirs.absFilePath(dirs[i]), QString::null,
- QDir::Name|QDir::IgnoreCase, QDir::Files );
+ TQDir files( dirs.absFilePath(dirs[i]), TQString::null,
+ TQDir::Name|TQDir::IgnoreCase, TQDir::Files );
if ( files.exists( dir ) ) {
for (unsigned int i=0; i<files.count(); i++) {
@@ -155,13 +155,13 @@ void deletePluginMimeTypes()
}
-void generateMimeType( QString mime, QString extensions, QString pluginName, QString description )
+void generateMimeType( TQString mime, TQString extensions, TQString pluginName, TQString description )
{
kdDebug(1433) << "-> generateMimeType mime=" << mime << " ext="<< extensions << endl;
// get directory from mime string
- QString dir;
- QString name;
+ TQString dir;
+ TQString name;
int pos = mime.findRev('/');
if ( pos<0 ) {
kdDebug(1433) << "Invalid MIME type " << mime << endl;
@@ -172,11 +172,11 @@ void generateMimeType( QString mime, QString extensions, QString pluginName, QSt
name = mime.mid(pos);
// create mimelnk file
- QFile f( dir + name + ".desktop" );
+ TQFile f( dir + name + ".desktop" );
if ( f.open(IO_WriteOnly) ) {
// write .desktop file
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts << "[Desktop Entry]" << endl;
ts << "Type=MimeType" << endl;
@@ -187,9 +187,9 @@ void generateMimeType( QString mime, QString extensions, QString pluginName, QSt
ts << "X-KDE-nsplugin=true" << endl;
if (!extensions.isEmpty()) {
- QStringList exts = QStringList::split(",", extensions);
- QStringList patterns;
- for (QStringList::Iterator it=exts.begin(); it != exts.end(); ++it)
+ TQStringList exts = TQStringList::split(",", extensions);
+ TQStringList patterns;
+ for (TQStringList::Iterator it=exts.begin(); it != exts.end(); ++it)
patterns.append( "*." + (*it).stripWhiteSpace() );
ts << "Patterns=" << patterns.join( ";" ) << endl;
@@ -207,16 +207,16 @@ void generateMimeType( QString mime, QString extensions, QString pluginName, QSt
}
-void registerPlugin( const QString &name, const QString &description,
- const QString &file, const QString &mimeInfo )
+void registerPlugin( const TQString &name, const TQString &description,
+ const TQString &file, const TQString &mimeInfo )
{
// global stuff
- infoConfig->setGroup( QString::null );
+ infoConfig->setGroup( TQString::null );
int num = infoConfig->readNumEntry( "number", 0 );
infoConfig->writeEntry( "number", num+1 );
// create plugin info
- infoConfig->setGroup( QString::number(num) );
+ infoConfig->setGroup( TQString::number(num) );
infoConfig->writeEntry( "name", name );
infoConfig->writeEntry( "description", description );
infoConfig->writeEntry( "file", file );
@@ -228,9 +228,9 @@ static void segv_handler(int)
_exit(255);
}
-int tryCheck(int write_fd, const QString &absFile)
+int tryCheck(int write_fd, const TQString &absFile)
{
- KLibrary *_handle = KLibLoader::self()->library( QFile::encodeName(absFile) );
+ KLibrary *_handle = KLibLoader::self()->library( TQFile::encodeName(absFile) );
if (!_handle) {
kdDebug(1433) << " - open failed with message " <<
KLibLoader::self()->lastErrorMessage() << ", skipping " << endl;
@@ -238,8 +238,8 @@ int tryCheck(int write_fd, const QString &absFile)
}
// ask for name and description
- QString name = i18n("Unnamed plugin");
- QString description;
+ TQString name = i18n("Unnamed plugin");
+ TQString description;
NPError (*func_GetValue)(void *, NPPVariable, void *) =
(NPError(*)(void *, NPPVariable, void *))
@@ -251,14 +251,14 @@ int tryCheck(int write_fd, const QString &absFile)
NPError err = func_GetValue( 0, NPPVpluginNameString,
(void*)&buf );
if ( err==NPERR_NO_ERROR )
- name = QString::fromLatin1( buf );
+ name = TQString::fromLatin1( buf );
kdDebug() << "name = " << name << endl;
// get name
NPError nperr = func_GetValue( 0, NPPVpluginDescriptionString,
(void*)&buf );
if ( nperr==NPERR_NO_ERROR )
- description = QString::fromLatin1( buf );
+ description = TQString::fromLatin1( buf );
kdDebug() << "description = " << description << endl;
}
else
@@ -269,31 +269,31 @@ int tryCheck(int write_fd, const QString &absFile)
(char *(*)())_handle->symbol("NP_GetMIMEDescription");
if ( !func_GetMIMEDescription ) {
kdDebug(1433) << " - no GetMIMEDescription, skipping" << endl;
- KLibLoader::self()->unloadLibrary( QFile::encodeName(absFile) );
+ KLibLoader::self()->unloadLibrary( TQFile::encodeName(absFile) );
return 1;
}
// ask for mime information
- QString mimeInfo = func_GetMIMEDescription();
+ TQString mimeInfo = func_GetMIMEDescription();
if ( mimeInfo.isEmpty() ) {
kdDebug(1433) << " - no mime info returned, skipping" << endl;
- KLibLoader::self()->unloadLibrary( QFile::encodeName(absFile) );
+ KLibLoader::self()->unloadLibrary( TQFile::encodeName(absFile) );
return 1;
}
// remove version info, as it is not used at the moment
- QRegExp versionRegExp(";version=[^:]*:");
+ TQRegExp versionRegExp(";version=[^:]*:");
mimeInfo.replace( versionRegExp, ":");
// unload plugin lib
kdDebug(1433) << " - unloading plugin" << endl;
- KLibLoader::self()->unloadLibrary( QFile::encodeName(absFile) );
+ KLibLoader::self()->unloadLibrary( TQFile::encodeName(absFile) );
- // create a QDataStream for our IPC pipe (to send plugin info back to the parent)
+ // create a TQDataStream for our IPC pipe (to send plugin info back to the parent)
FILE *write_pipe = fdopen(write_fd, "w");
- QFile stream_file;
+ TQFile stream_file;
stream_file.open(IO_WriteOnly, write_pipe);
- QDataStream stream(&stream_file);
+ TQDataStream stream(&stream_file);
// return the gathered info to the parent
stream << name;
@@ -303,13 +303,13 @@ int tryCheck(int write_fd, const QString &absFile)
return 0;
}
-void scanDirectory( QString dir, QStringList &mimeInfoList,
- QTextStream &cache )
+void scanDirectory( TQString dir, TQStringList &mimeInfoList,
+ TQTextStream &cache )
{
kdDebug(1433) << "-> scanDirectory dir=" << dir << endl;
// iterate over all files
- QDir files( dir, QString::null, QDir::Name|QDir::IgnoreCase, QDir::Files );
+ TQDir files( dir, TQString::null, TQDir::Name|TQDir::IgnoreCase, TQDir::Files );
if ( !files.exists( dir ) ) {
kdDebug(1433) << "No files found" << endl;
kdDebug(1433) << "<- scanDirectory dir=" << dir << endl;
@@ -317,7 +317,7 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
}
for (unsigned int i=0; i<files.count(); i++) {
- QString extension;
+ TQString extension;
int j = files[i].findRev('.');
if (j > 0)
extension = files[i].mid(j+1);
@@ -340,7 +340,7 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
continue;
// get absolute file path
- QString absFile = files.absFilePath( files[i] );
+ TQString absFile = files.absFilePath( files[i] );
kdDebug(1433) << "Checking library " << absFile << endl;
// open the library and ask for the mimetype
@@ -363,11 +363,11 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
} else {
close(pipes[1]);
- QBuffer m_buffer;
+ TQBuffer m_buffer;
m_buffer.open(IO_WriteOnly);
FILE *read_pipe = fdopen(pipes[0], "r");
- QFile q_read_pipe;
+ TQFile q_read_pipe;
q_read_pipe.open(IO_ReadOnly, read_pipe);
char *data = (char *)malloc(4096);
@@ -386,12 +386,12 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
m_buffer.close();
m_buffer.open(IO_ReadOnly);
- // create a QDataStream for our buffer
- QDataStream stream(&m_buffer);
+ // create a TQDataStream for our buffer
+ TQDataStream stream(&m_buffer);
if (stream.atEnd()) continue;
- QString name, description, mimeInfo;
+ TQString name, description, mimeInfo;
stream >> name;
stream >> description;
stream >> mimeInfo;
@@ -399,14 +399,14 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
bool actuallyUsing = false;
// get mime types from string
- QStringList types = QStringList::split( ';', mimeInfo );
- QStringList::Iterator type;
+ TQStringList types = TQStringList::split( ';', mimeInfo );
+ TQStringList::Iterator type;
for ( type=types.begin(); type!=types.end(); ++type ) {
kdDebug(1433) << " - type=" << *type << endl;
name = name.replace( ':', "%3A" );
- QString entry = name + ":" + *type;
+ TQString entry = name + ":" + *type;
if ( !mimeInfoList.contains( entry ) ) {
if (!actuallyUsing) {
// note the plugin name
@@ -415,8 +415,8 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
}
// write into type cache
- QStringList tokens = QStringList::split(':', *type, TRUE);
- QStringList::Iterator token;
+ TQStringList tokens = TQStringList::split(':', *type, TRUE);
+ TQStringList::Iterator token;
token = tokens.begin();
cache << (*token).lower();
++token;
@@ -437,7 +437,7 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
// iterate over all sub directories
// NOTE: Mozilla doesn't iterate over subdirectories of the plugin dir.
// We still do (as Netscape 4 did).
- QDir dirs( dir, QString::null, QDir::Name|QDir::IgnoreCase, QDir::Dirs );
+ TQDir dirs( dir, TQString::null, TQDir::Name|TQDir::IgnoreCase, TQDir::Dirs );
if ( !dirs.exists() )
return;
@@ -453,16 +453,16 @@ void scanDirectory( QString dir, QStringList &mimeInfoList,
}
-void writeServicesFile( QStringList mimeTypes )
+void writeServicesFile( TQStringList mimeTypes )
{
- QString fname = KGlobal::dirs()->saveLocation("services", "")
+ TQString fname = KGlobal::dirs()->saveLocation("services", "")
+ "/nsplugin.desktop";
kdDebug(1433) << "Creating services file " << fname << endl;
- QFile f(fname);
+ TQFile f(fname);
if ( f.open(IO_WriteOnly) ) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts << "[Desktop Entry]" << endl;
ts << "Name=" << i18n("Netscape plugin viewer") << endl;
@@ -483,12 +483,12 @@ void writeServicesFile( QStringList mimeTypes )
}
-void removeExistingExtensions( QString &extension )
+void removeExistingExtensions( TQString &extension )
{
- QStringList filtered;
- QStringList exts = QStringList::split( ",", extension );
- for ( QStringList::Iterator it=exts.begin(); it!=exts.end(); ++it ) {
- QString ext = (*it).stripWhiteSpace();
+ TQStringList filtered;
+ TQStringList exts = TQStringList::split( ",", extension );
+ for ( TQStringList::Iterator it=exts.begin(); it!=exts.end(); ++it ) {
+ TQString ext = (*it).stripWhiteSpace();
if ( ext == "*" ) // some plugins have that, but we don't want to associate a mimetype with *.*!
continue;
@@ -563,20 +563,20 @@ int main( int argc, char **argv )
pullInXt();
// set up the paths used to look for plugins
- QStringList searchPaths = getSearchPaths();
- QStringList mimeInfoList;
+ TQStringList searchPaths = getSearchPaths();
+ TQStringList mimeInfoList;
infoConfig = new KConfig( KGlobal::dirs()->saveLocation("data", "nsplugins") +
"/pluginsinfo" );
infoConfig->writeEntry( "number", 0 );
// open the cache file for the mime information
- QString cacheName = KGlobal::dirs()->saveLocation("data", "nsplugins")+"/cache";
+ TQString cacheName = KGlobal::dirs()->saveLocation("data", "nsplugins")+"/cache";
kdDebug(1433) << "Creating MIME cache file " << cacheName << endl;
- QFile cachef(cacheName);
+ TQFile cachef(cacheName);
if (!cachef.open(IO_WriteOnly))
return -1;
- QTextStream cache(&cachef);
+ TQTextStream cache(&cachef);
if (showProgress) {
printf("20\n"); fflush(stdout);
}
@@ -585,7 +585,7 @@ int main( int argc, char **argv )
kdDebug(1433) << "Scanning directories" << endl;
int count = searchPaths.count();
int i = 0;
- for ( QStringList::Iterator it = searchPaths.begin();
+ for ( TQStringList::Iterator it = searchPaths.begin();
it != searchPaths.end(); ++it, ++i)
{
scanDirectory( *it, mimeInfoList, cache );
@@ -606,18 +606,18 @@ int main( int argc, char **argv )
// write mimetype files
kdDebug(1433) << "Creating MIME type descriptions" << endl;
- QStringList mimeTypes;
- for ( QStringList::Iterator it=mimeInfoList.begin();
+ TQStringList mimeTypes;
+ for ( TQStringList::Iterator it=mimeInfoList.begin();
it!=mimeInfoList.end(); ++it) {
kdDebug(1433) << "Handling MIME type " << *it << endl;
- QStringList info = QStringList::split(":", *it, true);
+ TQStringList info = TQStringList::split(":", *it, true);
if ( info.count()==4 ) {
- QString pluginName = info[0];
- QString type = info[1].lower();
- QString extension = info[2];
- QString desc = info[3];
+ TQString pluginName = info[0];
+ TQString type = info[1].lower();
+ TQString extension = info[2];
+ TQString desc = info[3];
// append to global mime type list
if ( !mimeTypes.contains(type) ) {
@@ -625,7 +625,7 @@ int main( int argc, char **argv )
mimeTypes.append( type );
// check mimelnk file
- QString fname = KGlobal::dirs()->findResource("mime", type+".desktop");
+ TQString fname = KGlobal::dirs()->findResource("mime", type+".desktop");
if ( fname.isEmpty() || isPluginMimeType(fname) ) {
kdDebug(1433) << " - creating MIME type description" << endl;
removeExistingExtensions( extension );
@@ -657,5 +657,5 @@ int main( int argc, char **argv )
if ( !dcc->isAttached() )
dcc->attach();
// Tel kded to update sycoca database.
- dcc->send("kded", "kbuildsycoca", "recreate()", QByteArray());
+ dcc->send("kded", "kbuildsycoca", "recreate()", TQByteArray());
}
diff --git a/nsplugins/sdk/npruntime.h b/nsplugins/sdk/npruntime.h
index a6f3e81ad..5a8423390 100644
--- a/nsplugins/sdk/npruntime.h
+++ b/nsplugins/sdk/npruntime.h
@@ -65,7 +65,7 @@
#ifndef _NP_RUNTIME_H_
#define _NP_RUNTIME_H_
-#include <qglobal.h>
+#include <tqglobal.h>
typedef Q_UINT32 uint32_t;
#ifdef __cplusplus
diff --git a/nsplugins/test/testnsplugin.cpp b/nsplugins/test/testnsplugin.cpp
index 561b4d02d..0d9eadf29 100644
--- a/nsplugins/test/testnsplugin.cpp
+++ b/nsplugins/test/testnsplugin.cpp
@@ -20,7 +20,7 @@
*/
#include <stdio.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <dcopclient.h>
@@ -38,15 +38,15 @@ TestNSPlugin::TestNSPlugin()
m_loader = NSPluginLoader::instance();
// client area
- m_client = new QWidget( this, "m_client" );
+ m_client = new TQWidget( this, "m_client" );
setCentralWidget( m_client );
m_client->show();
- m_layout = new QHBoxLayout( m_client );
+ m_layout = new TQHBoxLayout( m_client );
// file menu
- KStdAction::openNew( this, SLOT(newView()), actionCollection());
- KStdAction::close( this, SLOT(closeView()), actionCollection());
- KStdAction::quit( kapp, SLOT(quit()), actionCollection());
+ KStdAction::openNew( this, TQT_SLOT(newView()), actionCollection());
+ KStdAction::close( this, TQT_SLOT(closeView()), actionCollection());
+ KStdAction::quit( kapp, TQT_SLOT(quit()), actionCollection());
createGUI( "testnspluginui.rc" );
}
@@ -62,34 +62,34 @@ TestNSPlugin::~TestNSPlugin()
void TestNSPlugin::newView()
{
- QStringList _argn, _argv;
+ TQStringList _argn, _argv;
- //QString src = "file:/home/sschimanski/kimble_themovie.swf";
- //QString src = "file:/home/sschimanski/in_ani.swf";
- //QString src = "http://homepages.tig.com.au/~dkl/swf/promo.swf";
- //QString mime = "application/x-shockwave-flash";
+ //TQString src = "file:/home/sschimanski/kimble_themovie.swf";
+ //TQString src = "file:/home/sschimanski/in_ani.swf";
+ //TQString src = "http://homepages.tig.com.au/~dkl/swf/promo.swf";
+ //TQString mime = "application/x-shockwave-flash";
_argn << "name" << "controls" << "console";
_argv << "audio" << "ControlPanel" << "Clip1";
- QString src = "http://welt.is-kunden.de:554/ramgen/welt/avmedia/realaudio/0701lw177135.rm";
-// QString src = "nothing";
- QString mime = "audio/x-pn-realaudio-plugin";
+ TQString src = "http://welt.is-kunden.de:554/ramgen/welt/avmedia/realaudio/0701lw177135.rm";
+// TQString src = "nothing";
+ TQString mime = "audio/x-pn-realaudio-plugin";
_argn << "SRC" << "TYPE" << "WIDTH" << "HEIGHT";
_argv << src << mime << "400" << "100";
- QWidget *win = m_loader->newInstance( m_client, src, mime, 1, _argn, _argv, "appid", "callbackid" );
+ TQWidget *win = m_loader->newInstance( m_client, src, mime, 1, _argn, _argv, "appid", "callbackid" );
/*
_argn << "TYPE" << "WIDTH" << "HEIGHT" << "java_docbase" << "CODE";
_argv << "application/x-java-applet" << "450" << "350" << "file:///none" << "sun/plugin/panel/ControlPanelApplet.class";
- QWidget *win = loader->NewInstance(0, "", "application/x-java-applet", 1, _argn, _argv);
+ TQWidget *win = loader->NewInstance(0, "", "application/x-java-applet", 1, _argn, _argv);
*/
if ( win )
{
m_plugins.append( win );
- connect( win, SIGNAL(destroyed(NSPluginInstance *)),
- this, SLOT(viewDestroyed(NSPluginInstance *)) );
+ connect( win, TQT_SIGNAL(destroyed(NSPluginInstance *)),
+ this, TQT_SLOT(viewDestroyed(NSPluginInstance *)) );
m_layout->addWidget( win );
win->show();
} else
@@ -101,7 +101,7 @@ void TestNSPlugin::newView()
void TestNSPlugin::closeView()
{
kdDebug() << "closeView" << endl;
- QWidget *win = m_plugins.last();
+ TQWidget *win = m_plugins.last();
if ( win )
{
m_plugins.remove( win );
diff --git a/nsplugins/test/testnsplugin.h b/nsplugins/test/testnsplugin.h
index ac123c175..949de2986 100644
--- a/nsplugins/test/testnsplugin.h
+++ b/nsplugins/test/testnsplugin.h
@@ -23,11 +23,11 @@
#ifndef __TESTNSPLUGIN_H__
#define __TESTNSPLUGIN_H__
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kmainwindow.h>
-#include <qlayout.h>
-#include <qptrlist.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
class NSPluginLoader;
class NSPluginInstance;
@@ -47,9 +47,9 @@ public slots:
protected:
NSPluginLoader *m_loader;
- QPtrList<QWidget> m_plugins;
- QWidget *m_client;
- QBoxLayout *m_layout;
+ TQPtrList<TQWidget> m_plugins;
+ TQWidget *m_client;
+ TQBoxLayout *m_layout;
};
diff --git a/nsplugins/viewer/NSPluginClassIface.h b/nsplugins/viewer/NSPluginClassIface.h
index 20fd6ed03..7eb71f27d 100644
--- a/nsplugins/viewer/NSPluginClassIface.h
+++ b/nsplugins/viewer/NSPluginClassIface.h
@@ -25,8 +25,8 @@
#define __NSPluginClassIface_h__
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <dcopobject.h>
#include <dcopref.h>
@@ -37,7 +37,7 @@ class NSPluginViewerIface : virtual public DCOPObject
k_dcop:
virtual void shutdown() = 0;
- virtual DCOPRef newClass(QString plugin) = 0;
+ virtual DCOPRef newClass(TQString plugin) = 0;
};
@@ -47,11 +47,11 @@ class NSPluginClassIface : virtual public DCOPObject
k_dcop:
- virtual DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed,
- QStringList argn, QStringList argv,
- QString appId, QString callbackId, Q_INT8 reload,
- Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed) = 0;
- virtual QString getMIMEDescription() = 0;
+ virtual DCOPRef newInstance(TQString url, TQString mimeType, Q_INT8 embed,
+ TQStringList argn, TQStringList argv,
+ TQString appId, TQString callbackId, Q_INT8 reload,
+ Q_INT8 doPost, TQByteArray postData, Q_UINT32 xembed) = 0;
+ virtual TQString getMIMEDescription() = 0;
};
@@ -70,7 +70,7 @@ k_dcop:
virtual void resizePlugin(Q_INT32 w, Q_INT32 h) = 0;
- virtual void javascriptResult(Q_INT32 id, QString result) = 0;
+ virtual void javascriptResult(Q_INT32 id, TQString result) = 0;
virtual void displayPlugin() = 0;
diff --git a/nsplugins/viewer/glibevents.cpp b/nsplugins/viewer/glibevents.cpp
index b1012675b..fe059d1ee 100644
--- a/nsplugins/viewer/glibevents.cpp
+++ b/nsplugins/viewer/glibevents.cpp
@@ -19,12 +19,12 @@
#include "glibevents.h"
-#include <qapplication.h>
+#include <tqapplication.h>
GlibEvents::GlibEvents()
{
g_main_context_ref( g_main_context_default());
- connect( &timer, SIGNAL( timeout()), SLOT( process()));
+ connect( &timer, TQT_SIGNAL( timeout()), TQT_SLOT( process()));
// TODO Poll for now
timer.start( 10 );
}
diff --git a/nsplugins/viewer/glibevents.h b/nsplugins/viewer/glibevents.h
index 8a890807b..396273a85 100644
--- a/nsplugins/viewer/glibevents.h
+++ b/nsplugins/viewer/glibevents.h
@@ -20,8 +20,8 @@
#ifndef GLIBEVENTS_H
#define GLIBEVENTS_H
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <glib.h>
@@ -35,7 +35,7 @@ class GlibEvents
private slots:
void process();
private:
- QTimer timer;
+ TQTimer timer;
};
#endif
diff --git a/nsplugins/viewer/kxt.cpp b/nsplugins/viewer/kxt.cpp
index 7f2e04b54..9f5f43d51 100644
--- a/nsplugins/viewer/kxt.cpp
+++ b/nsplugins/viewer/kxt.cpp
@@ -44,15 +44,15 @@
**
*****************************************************************************/
-#include <qglobal.h>
+#include <tqglobal.h>
#if QT_VERSION < 0x030100
#include <kapplication.h>
-#include <qwidget.h>
-#include <qobjectlist.h>
-#include <qwidgetlist.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
+#include <tqwidgetlist.h>
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kxt.h"
@@ -136,15 +136,15 @@ typedef struct _QWidgetRec {
static
-void reparentChildrenOf(QWidget* parent)
+void reparentChildrenOf(TQWidget* parent)
{
if ( !parent->children() )
return; // nothing to do
- for ( QObjectListIt it( *parent->children() ); it.current(); ++it ) {
+ for ( TQObjectListIt it( *parent->children() ); it.current(); ++it ) {
if ( it.current()->isWidgetType() ) {
- QWidget* widget = (QWidget*)it.current();
+ TQWidget* widget = (TQWidget*)it.current();
XReparentWindow( qt_xdisplay(),
widget->winId(),
parent->winId(),
@@ -177,7 +177,7 @@ static
QWidgetClassRec qwidgetClassRec = {
{ /* core fields */
/* superclass */ (WidgetClass) &widgetClassRec,
- /* class_name */ (char*)"QWidget",
+ /* class_name */ (char*)"TQWidget",
/* widget_size */ sizeof(QWidgetRec),
/* class_initialize */ 0,
/* class_part_initialize */ 0,
@@ -249,7 +249,7 @@ void removeXtEventFilters()
filters_installed = FALSE;
}
-// When we are in an event loop of QApplication rather than the browser's
+// When we are in an event loop of TQApplication rather than the browser's
// event loop (eg. for a modal dialog), we still send events to Xt.
static
void np_event_proc( XEvent* e )
@@ -263,7 +263,7 @@ void np_event_proc( XEvent* e )
static void np_set_timer( int interval )
{
- // Ensure we only have one timeout in progress - QApplication is
+ // Ensure we only have one timeout in progress - TQApplication is
// computing the one amount of time we need to wait.
if ( qt_np_timerid ) {
XtRemoveTimeOut( qt_np_timerid );
@@ -302,7 +302,7 @@ static void np_do_timers( void*, void* )
static bool my_xt;
/*!
- Constructs a QApplication and initializes the Xt toolkit.
+ Constructs a TQApplication and initializes the Xt toolkit.
The \a appclass, \a options, \a num_options, and \a resources
arguments are passed on to XtAppSetFallbackResources and
XtDisplayInitialize.
@@ -311,7 +311,7 @@ static bool my_xt;
needs to use some existing Xt/Motif widgets.
*/
KXtApplication::KXtApplication(int& argc, char** argv,
- const QCString& rAppName, bool allowStyles, bool GUIenabled,
+ const TQCString& rAppName, bool allowStyles, bool GUIenabled,
XrmOptionDescRec *options, int num_options,
char** resources)
: KApplication(argc, argv, rAppName, allowStyles, GUIenabled)
@@ -327,14 +327,14 @@ KXtApplication::KXtApplication(int& argc, char** argv,
}
/*!
- Constructs a QApplication from the \a display of an already-initialized
+ Constructs a TQApplication from the \a display of an already-initialized
Xt application.
Use this constructor when introducing Qt widgets into an existing
Xt/Motif application.
*/
KXtApplication::KXtApplication(Display* dpy, int& argc, char** argv,
- const QCString& rAppName, bool allowStyles, bool GUIenabled)
+ const TQCString& rAppName, bool allowStyles, bool GUIenabled)
: KApplication(dpy, argc, argv, rAppName, allowStyles, GUIenabled)
{
my_xt = FALSE;
@@ -367,7 +367,7 @@ void KXtApplication::init()
qt_np_add_timer_setter(np_set_timer);
qt_np_add_event_proc(np_event_proc);
qt_np_count++;
-/* QTimer *timer = new QTimer( this );
+/* TQTimer *timer = new TQTimer( this );
timer->start(500);*/
}
@@ -381,11 +381,11 @@ void KXtApplication::init()
Xt widgets, it can be a QWidget
based on a Xt widget class. For including Qt widgets in an existing
Xt/Motif application, it can be a special Xt widget class that is
- a QWidget. See the constructors for the different behaviors.
+ a TQWidget. See the constructors for the different behaviors.
*/
void KXtWidget::init(const char* name, WidgetClass widget_class,
- Widget parent, QWidget* qparent,
+ Widget parent, TQWidget* qparent,
ArgList args, Cardinal num_args,
bool managed)
{
@@ -438,14 +438,14 @@ void KXtWidget::init(const char* name, WidgetClass widget_class,
/*!
Constructs a KXtWidget of the special Xt widget class known as
- "QWidget" to the resource manager.
+ "TQWidget" to the resource manager.
Use this constructor to utilize Qt widgets in an Xt/Motif
- application. The KXtWidget is a QWidget, so you can create
+ application. The KXtWidget is a TQWidget, so you can create
subwidgets, layouts, etc. using Qt functionality.
*/
KXtWidget::KXtWidget(const char* name, Widget parent, bool managed) :
- QWidget( 0, name, WResizeNoErase )
+ TQWidget( 0, name, WResizeNoErase )
{
init(name, qWidgetClass, parent, 0, 0, 0, managed);
Arg reqargs[20];
@@ -460,21 +460,21 @@ KXtWidget::KXtWidget(const char* name, Widget parent, bool managed) :
Use this constructor to utilize Xt or Motif widgets in a Qt
application. The KXtWidget looks and behaves
- like the Xt class, but can be used like any QWidget.
+ like the Xt class, but can be used like any TQWidget.
Note that Xt requires that the most toplevel Xt widget is a shell.
That means, if \a parent is a KXtWidget, the \a widget_class can be
of any kind. If there isn't a parent or the parent is just a normal
- QWidget, \a widget_class should be something like \c
+ TQWidget, \a widget_class should be something like \c
topLevelShellWidgetClass.
If the \a managed parameter is TRUE and \a parent in not NULL,
XtManageChild it used to manage the child.
*/
KXtWidget::KXtWidget(const char* name, WidgetClass widget_class,
- QWidget *parent, ArgList args, Cardinal num_args,
+ TQWidget *parent, ArgList args, Cardinal num_args,
bool managed) :
- QWidget( parent, name, WResizeNoErase )
+ TQWidget( parent, name, WResizeNoErase )
{
if ( !parent )
init(name, widget_class, 0, 0, args, num_args, managed);
@@ -492,11 +492,11 @@ KXtWidget::~KXtWidget()
{
// Delete children first, as Xt will destroy their windows
//
- QObjectList* list = queryList("QWidget", 0, FALSE, FALSE);
+ TQObjectList* list = queryList("TQWidget", 0, FALSE, FALSE);
if ( list ) {
- QWidget* c;
- QObjectListIt it( *list );
- while ( (c = (QWidget*)it.current()) ) {
+ TQWidget* c;
+ TQObjectListIt it( *list );
+ while ( (c = (TQWidget*)it.current()) ) {
delete c;
++it;
}
@@ -530,7 +530,7 @@ bool KXtWidget::x11Event( XEvent * e )
if ( xtparent )
setActiveWindow();
}
- return QWidget::x11Event( e );
+ return TQWidget::x11Event( e );
}
@@ -540,7 +540,7 @@ bool KXtWidget::x11Event( XEvent * e )
void KXtWidget::setActiveWindow()
{
if ( xtparent ) {
- if ( !QWidget::isActiveWindow() && isActiveWindow() ) {
+ if ( !TQWidget::isActiveWindow() && isActiveWindow() ) {
XFocusChangeEvent e;
e.type = FocusIn;
e.window = winId();
@@ -549,12 +549,12 @@ void KXtWidget::setActiveWindow()
XSendEvent( qt_xdisplay(), e.window, TRUE, NoEventMask, (XEvent*)&e );
}
} else {
- QWidget::setActiveWindow();
+ TQWidget::setActiveWindow();
}
}
/*!
- Different from QWidget::isActiveWindow()
+ Different from TQWidget::isActiveWindow()
*/
bool KXtWidget::isActiveWindow() const
{
@@ -564,7 +564,7 @@ bool KXtWidget::isActiveWindow() const
if ( win == None) return FALSE;
- QWidget *w = find( (WId)win );
+ TQWidget *w = find( (WId)win );
if ( w ) {
// We know that window
return w->topLevelWidget() == topLevelWidget();
@@ -586,7 +586,7 @@ bool KXtWidget::isActiveWindow() const
/*!\reimp
*/
-void KXtWidget::moveEvent( QMoveEvent* )
+void KXtWidget::moveEvent( TQMoveEvent* )
{
if ( xtparent )
return;
@@ -605,7 +605,7 @@ void KXtWidget::moveEvent( QMoveEvent* )
/*!\reimp
*/
-void KXtWidget::resizeEvent( QResizeEvent* )
+void KXtWidget::resizeEvent( TQResizeEvent* )
{
if ( xtparent )
return;
diff --git a/nsplugins/viewer/kxt.h b/nsplugins/viewer/kxt.h
index 1d594b328..44f05db19 100644
--- a/nsplugins/viewer/kxt.h
+++ b/nsplugins/viewer/kxt.h
@@ -46,11 +46,11 @@
#ifndef KXT_H
#define KXT_H
-#include <qglobal.h>
+#include <tqglobal.h>
#if QT_VERSION < 0x030100
#include <kapplication.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <X11/Intrinsic.h>
class KXtApplication : public KApplication {
@@ -59,20 +59,20 @@ class KXtApplication : public KApplication {
public:
KXtApplication(int& argc, char** argv,
- const QCString& rAppName, bool allowStyles=true, bool GUIenabled=true,
+ const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true,
XrmOptionDescRec *options=0, int num_options=0, char** resources=0);
- KXtApplication(Display*, int& argc, char** argv, const QCString& rAppName,
+ KXtApplication(Display*, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles=true, bool GUIenabled=true);
~KXtApplication();
};
-class KXtWidget : public QWidget {
+class KXtWidget : public TQWidget {
Q_OBJECT
Widget xtw;
Widget xtparent;
bool need_reroot;
void init(const char* name, WidgetClass widget_class,
- Widget parent, QWidget* qparent,
+ Widget parent, TQWidget* qparent,
ArgList args, Cardinal num_args,
bool managed);
friend void qwidget_realize( Widget widget, XtValueMask* mask,
@@ -81,7 +81,7 @@ class KXtWidget : public QWidget {
public:
KXtWidget(const char* name, Widget parent, bool managed=FALSE);
KXtWidget(const char* name, WidgetClass widget_class,
- QWidget *parent=0, ArgList args=0, Cardinal num_args=0,
+ TQWidget *parent=0, ArgList args=0, Cardinal num_args=0,
bool managed=FALSE);
~KXtWidget();
@@ -90,8 +90,8 @@ public:
void setActiveWindow();
protected:
- void moveEvent( QMoveEvent* );
- void resizeEvent( QResizeEvent* );
+ void moveEvent( TQMoveEvent* );
+ void resizeEvent( TQResizeEvent* );
bool x11Event( XEvent * );
};
diff --git a/nsplugins/viewer/nsplugin.cpp b/nsplugins/viewer/nsplugin.cpp
index cb39aa107..be313b52b 100644
--- a/nsplugins/viewer/nsplugin.cpp
+++ b/nsplugins/viewer/nsplugin.cpp
@@ -30,10 +30,10 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include "kxt.h"
#include "nsplugin.h"
@@ -252,8 +252,8 @@ NPError g_NPN_GetURL(NPP instance, const char *url, const char *target)
NSPluginInstance *inst = static_cast<NSPluginInstance*>(instance->ndata);
if (inst) {
- inst->requestURL( QString::fromLatin1(url), QString::null,
- QString::fromLatin1(target), 0 );
+ inst->requestURL( TQString::fromLatin1(url), TQString::null,
+ TQString::fromLatin1(target), 0 );
}
return NPERR_NO_ERROR;
@@ -267,8 +267,8 @@ NPError g_NPN_GetURLNotify(NPP instance, const char *url, const char *target,
NSPluginInstance *inst = static_cast<NSPluginInstance*>(instance->ndata);
if (inst) {
kdDebug(1431) << "g_NPN_GetURLNotify: ndata=" << (void*)inst << endl;
- inst->requestURL( QString::fromLatin1(url), QString::null,
- QString::fromLatin1(target), notifyData, true );
+ inst->requestURL( TQString::fromLatin1(url), TQString::null,
+ TQString::fromLatin1(target), notifyData, true );
}
return NPERR_NO_ERROR;
@@ -281,7 +281,7 @@ NPError g_NPN_PostURLNotify(NPP instance, const char* url, const char* target,
// http://devedge.netscape.com/library/manuals/2002/plugin/1.0/npn_api14.html
kdDebug(1431) << "g_NPN_PostURLNotify() [incomplete]" << endl;
kdDebug(1431) << "url=[" << url << "] target=[" << target << "]" << endl;
- QByteArray postdata;
+ TQByteArray postdata;
KParts::URLArgs args;
if (len == 0) {
@@ -289,7 +289,7 @@ NPError g_NPN_PostURLNotify(NPP instance, const char* url, const char* target,
}
if (file) { // buf is a filename
- QFile f(buf);
+ TQFile f(buf);
if (!f.open(IO_ReadOnly)) {
return NPERR_FILE_NOT_FOUND;
}
@@ -318,7 +318,7 @@ NPError g_NPN_PostURLNotify(NPP instance, const char* url, const char* target,
break;
}
- QString thisLine = QString::fromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace();
+ TQString thisLine = TQString::fromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace();
previousStart = &buf[l];
previousCR = true;
@@ -337,7 +337,7 @@ NPError g_NPN_PostURLNotify(NPP instance, const char* url, const char* target,
kdDebug(1431) << "Post data: " << postdata.size() << " bytes" << endl;
#if 0
- QFile f("/tmp/nspostdata");
+ TQFile f("/tmp/nspostdata");
f.open(IO_WriteOnly);
f.writeBlock(postdata);
f.close();
@@ -360,9 +360,9 @@ NPError g_NPN_PostURLNotify(NPP instance, const char* url, const char* target,
}
NSPluginInstance *inst = static_cast<NSPluginInstance*>(instance->ndata);
- if (inst && !inst->normalizedURL(QString::fromLatin1(url)).isNull()) {
- inst->postURL( QString::fromLatin1(url), postdata, args.contentType(),
- QString::fromLatin1(target), notifyData, args, true );
+ if (inst && !inst->normalizedURL(TQString::fromLatin1(url)).isNull()) {
+ inst->postURL( TQString::fromLatin1(url), postdata, args.contentType(),
+ TQString::fromLatin1(target), notifyData, args, true );
} else {
// Unsupported / insecure
return NPERR_INVALID_URL;
@@ -378,7 +378,7 @@ NPError g_NPN_PostURL(NPP instance, const char* url, const char* target,
// http://devedge.netscape.com/library/manuals/2002/plugin/1.0/npn_api13.html
kdDebug(1431) << "g_NPN_PostURL()" << endl;
kdDebug(1431) << "url=[" << url << "] target=[" << target << "]" << endl;
- QByteArray postdata;
+ TQByteArray postdata;
KParts::URLArgs args;
if (len == 0) {
@@ -386,7 +386,7 @@ NPError g_NPN_PostURL(NPP instance, const char* url, const char* target,
}
if (file) { // buf is a filename
- QFile f(buf);
+ TQFile f(buf);
if (!f.open(IO_ReadOnly)) {
return NPERR_FILE_NOT_FOUND;
}
@@ -415,7 +415,7 @@ NPError g_NPN_PostURL(NPP instance, const char* url, const char* target,
break;
}
- QString thisLine = QString::fromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace();
+ TQString thisLine = TQString::fromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace();
previousStart = &buf[l];
previousCR = true;
@@ -434,7 +434,7 @@ NPError g_NPN_PostURL(NPP instance, const char* url, const char* target,
kdDebug(1431) << "Post data: " << postdata.size() << " bytes" << endl;
#if 0
- QFile f("/tmp/nspostdata");
+ TQFile f("/tmp/nspostdata");
f.open(IO_WriteOnly);
f.writeBlock(postdata);
f.close();
@@ -457,9 +457,9 @@ NPError g_NPN_PostURL(NPP instance, const char* url, const char* target,
}
NSPluginInstance *inst = static_cast<NSPluginInstance*>(instance->ndata);
- if (inst && !inst->normalizedURL(QString::fromLatin1(url)).isNull()) {
- inst->postURL( QString::fromLatin1(url), postdata, args.contentType(),
- QString::fromLatin1(target), 0L, args, false );
+ if (inst && !inst->normalizedURL(TQString::fromLatin1(url)).isNull()) {
+ inst->postURL( TQString::fromLatin1(url), postdata, args.contentType(),
+ TQString::fromLatin1(target), 0L, args, false );
} else {
// Unsupported / insecure
return NPERR_INVALID_URL;
@@ -488,7 +488,7 @@ void g_NPN_Status(NPP instance, const char *message)
const char *g_NPN_UserAgent(NPP /*instance*/)
{
KProtocolManager kpm;
- QString agent = kpm.userAgentForHost("nspluginviewer");
+ TQString agent = kpm.userAgentForHost("nspluginviewer");
kdDebug(1431) << "g_NPN_UserAgent() = " << agent << endl;
// flash crashes without Firefox UA
agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/2007101500 Firefox/2.0.0.10";
@@ -589,11 +589,11 @@ NSPluginInstance::forwarder(Widget w, XtPointer cl_data, XEvent * event, Boolean
NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs,
KLibrary *handle, int width, int height,
- QString src, QString /*mime*/,
- QString appId, QString callbackId,
+ TQString src, TQString /*mime*/,
+ TQString appId, TQString callbackId,
bool embed, WId xembed,
- QObject *parent, const char* name )
- : DCOPObject(), QObject( parent, name )
+ TQObject *parent, const char* name )
+ : DCOPObject(), TQObject( parent, name )
{
Q_UNUSED(embed);
_visible = false;
@@ -611,13 +611,13 @@ NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs,
_toplevel = _form = 0;
KURL base(src);
- base.setFileName( QString::null );
+ base.setFileName( TQString::null );
_baseURL = base.url();
memcpy(&_pluginFuncs, pluginFuncs, sizeof(_pluginFuncs));
- _timer = new QTimer( this );
- connect( _timer, SIGNAL(timeout()), SLOT(timer()) );
+ _timer = new TQTimer( this );
+ connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(timer()) );
kdDebug(1431) << "NSPluginInstance::NSPluginInstance" << endl;
kdDebug(1431) << "pdata = " << _npp->pdata << endl;
@@ -651,9 +651,9 @@ NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs,
// Create form window that is searched for by flash plugin
_form = XtVaCreateWidget("form", compositeWidgetClass, _toplevel, NULL);
- XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++;
- XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++;
- XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++;
+ XtSetArg(args[nargs], XtNvisual, TQPaintDevice::x11AppVisual()); nargs++;
+ XtSetArg(args[nargs], XtNdepth, TQPaintDevice::x11AppDepth()); nargs++;
+ XtSetArg(args[nargs], XtNcolormap, TQPaintDevice::x11AppColormap()); nargs++;
XtSetValues(_form, args, nargs);
XSync(qt_xdisplay(), false);
@@ -772,7 +772,7 @@ void NSPluginInstance::timer()
Request req( *_waitingRequests.head() );
_waitingRequests.remove();
- QString url;
+ TQString url;
// make absolute url
if ( req.url.left(11).lower()=="javascript:" )
@@ -810,8 +810,8 @@ void NSPluginInstance::timer()
if (req.post) {
// create stream
NSPluginStream *s = new NSPluginStream( this );
- connect( s, SIGNAL(finished(NSPluginStreamBase*)),
- SLOT(streamFinished(NSPluginStreamBase*)) );
+ connect( s, TQT_SIGNAL(finished(NSPluginStreamBase*)),
+ TQT_SLOT(streamFinished(NSPluginStreamBase*)) );
_streams.append( s );
kdDebug() << "posting to " << url << endl;
@@ -829,8 +829,8 @@ void NSPluginInstance::timer()
} else {
// create stream
NSPluginStream *s = new NSPluginStream( this );
- connect( s, SIGNAL(finished(NSPluginStreamBase*)),
- SLOT(streamFinished(NSPluginStreamBase*)) );
+ connect( s, TQT_SIGNAL(finished(NSPluginStreamBase*)),
+ TQT_SLOT(streamFinished(NSPluginStreamBase*)) );
_streams.append( s );
kdDebug() << "getting " << url << endl;
@@ -846,7 +846,7 @@ void NSPluginInstance::timer()
}
-QString NSPluginInstance::normalizedURL(const QString& url) const {
+TQString NSPluginInstance::normalizedURL(const TQString& url) const {
KURL bu( _baseURL );
KURL inURL(bu, url);
KConfig cfg("kcmnspluginrc", true);
@@ -861,15 +861,15 @@ QString NSPluginInstance::normalizedURL(const QString& url) const {
// Allow: javascript:, http, https, or no protocol (match loading)
kdDebug(1431) << "NSPluginInstance::normalizedURL - I don't think so. http or https only!" << endl;
- return QString::null;
+ return TQString::null;
}
-void NSPluginInstance::requestURL( const QString &url, const QString &mime,
- const QString &target, void *notify, bool forceNotify, bool reload )
+void NSPluginInstance::requestURL( const TQString &url, const TQString &mime,
+ const TQString &target, void *notify, bool forceNotify, bool reload )
{
// Generally this should already be done, but let's be safe for now.
- QString nurl = normalizedURL(url);
+ TQString nurl = normalizedURL(url);
if (nurl.isNull()) {
return;
}
@@ -880,13 +880,13 @@ void NSPluginInstance::requestURL( const QString &url, const QString &mime,
}
-void NSPluginInstance::postURL( const QString &url, const QByteArray& data,
- const QString &mime,
- const QString &target, void *notify,
+void NSPluginInstance::postURL( const TQString &url, const TQByteArray& data,
+ const TQString &mime,
+ const TQString &target, void *notify,
const KParts::URLArgs& args, bool forceNotify )
{
// Generally this should already be done, but let's be safe for now.
- QString nurl = normalizedURL(url);
+ TQString nurl = normalizedURL(url);
if (nurl.isNull()) {
return;
}
@@ -897,7 +897,7 @@ void NSPluginInstance::postURL( const QString &url, const QByteArray& data,
}
-void NSPluginInstance::emitStatus(const QString &message)
+void NSPluginInstance::emitStatus(const TQString &message)
{
if( _callback )
_callback->statusMessage( message );
@@ -907,7 +907,7 @@ void NSPluginInstance::emitStatus(const QString &message)
void NSPluginInstance::streamFinished( NSPluginStreamBase* strm )
{
kdDebug(1431) << "-> NSPluginInstance::streamFinished" << endl;
- emitStatus( QString::null );
+ emitStatus( TQString::null );
_streams.setAutoDelete(false); // Don't delete it yet!! we get called from
// its slot!
_streams.remove(strm);
@@ -998,9 +998,9 @@ void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h)
Cardinal nargs = 0;
XtSetArg(args[nargs], XtNwidth, _width); nargs++;
XtSetArg(args[nargs], XtNheight, _height); nargs++;
- XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++;
- XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++;
- XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++;
+ XtSetArg(args[nargs], XtNvisual, TQPaintDevice::x11AppVisual()); nargs++;
+ XtSetArg(args[nargs], XtNdepth, TQPaintDevice::x11AppDepth()); nargs++;
+ XtSetArg(args[nargs], XtNcolormap, TQPaintDevice::x11AppColormap()); nargs++;
XtSetArg(args[nargs], XtNborderWidth, 0); nargs++;
XtSetValues(_toplevel, args, nargs);
@@ -1021,27 +1021,27 @@ void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h)
}
-void NSPluginInstance::javascriptResult(Q_INT32 id, QString result) {
- QMap<int, Request*>::iterator i = _jsrequests.find( id );
+void NSPluginInstance::javascriptResult(Q_INT32 id, TQString result) {
+ TQMap<int, Request*>::iterator i = _jsrequests.find( id );
if (i != _jsrequests.end()) {
Request *req = i.data();
_jsrequests.remove( i );
NSPluginStream *s = new NSPluginStream( this );
- connect( s, SIGNAL(finished(NSPluginStreamBase*)),
- SLOT(streamFinished(NSPluginStreamBase*)) );
+ connect( s, TQT_SIGNAL(finished(NSPluginStreamBase*)),
+ TQT_SLOT(streamFinished(NSPluginStreamBase*)) );
_streams.append( s );
int len = result.length();
- s->create( req->url, QString("text/plain"), req->notify, req->forceNotify );
+ s->create( req->url, TQString("text/plain"), req->notify, req->forceNotify );
kdDebug(1431) << "javascriptResult has been called with: "<<result<<endl;
if (len > 0) {
- QByteArray data(len + 1);
+ TQByteArray data(len + 1);
memcpy(data.data(), result.latin1(), len);
data[len] = 0;
s->process(data, 0);
} else {
len = 7; // "unknown"
- QByteArray data(len + 1);
+ TQByteArray data(len + 1);
memcpy(data.data(), "unknown", len);
data[len] = 0;
s->process(data, 0);
@@ -1190,7 +1190,7 @@ int32 NSPluginInstance::NPWriteReady(NPStream *stream)
}
-void NSPluginInstance::NPURLNotify(QString url, NPReason reason, void *notifyData)
+void NSPluginInstance::NPURLNotify(TQString url, NPReason reason, void *notifyData)
{
if (!_pluginFuncs.urlnotify)
return;
@@ -1249,15 +1249,15 @@ int XQueryKeymap( Display* dpy, char k[32] )
/***************************************************************************/
-NSPluginViewer::NSPluginViewer( QCString dcopId,
- QObject *parent, const char *name )
- : DCOPObject(dcopId), QObject( parent, name )
+NSPluginViewer::NSPluginViewer( TQCString dcopId,
+ TQObject *parent, const char *name )
+ : DCOPObject(dcopId), TQObject( parent, name )
{
_classes.setAutoDelete( true );
connect(KApplication::dcopClient(),
- SIGNAL(applicationRemoved(const QCString&)),
+ TQT_SIGNAL(applicationRemoved(const TQCString&)),
this,
- SLOT(appUnregistered(const QCString&)));
+ TQT_SLOT(appUnregistered(const TQCString&)));
}
@@ -1267,15 +1267,15 @@ NSPluginViewer::~NSPluginViewer()
}
-void NSPluginViewer::appUnregistered(const QCString& id) {
+void NSPluginViewer::appUnregistered(const TQCString& id) {
if (id.isEmpty()) {
return;
}
- QDictIterator<NSPluginClass> it(_classes);
+ TQDictIterator<NSPluginClass> it(_classes);
NSPluginClass *c;
while ( (c = it.current()) ) {
- QString key = it.currentKey();
+ TQString key = it.currentKey();
++it;
if (c->app() == id) {
_classes.remove(key);
@@ -1300,7 +1300,7 @@ void NSPluginViewer::shutdown()
}
-DCOPRef NSPluginViewer::newClass( QString plugin )
+DCOPRef NSPluginViewer::newClass( TQString plugin )
{
kdDebug(1431) << "NSPluginViewer::NewClass( " << plugin << ")" << endl;
@@ -1309,7 +1309,7 @@ DCOPRef NSPluginViewer::newClass( QString plugin )
if ( !cls ) {
// create new class
cls = new NSPluginClass( plugin, this );
- QCString id = "";
+ TQCString id = "";
DCOPClient *dc = callingDcopClient();
if (dc) {
id = dc->senderId();
@@ -1331,12 +1331,12 @@ DCOPRef NSPluginViewer::newClass( QString plugin )
/****************************************************************************/
-NSPluginClass::NSPluginClass( const QString &library,
- QObject *parent, const char *name )
- : DCOPObject(), QObject( parent, name )
+NSPluginClass::NSPluginClass( const TQString &library,
+ TQObject *parent, const char *name )
+ : DCOPObject(), TQObject( parent, name )
{
// initialize members
- _handle = KLibLoader::self()->library(QFile::encodeName(library));
+ _handle = KLibLoader::self()->library(TQFile::encodeName(library));
_libname = library;
_constructed = false;
_error = true;
@@ -1345,8 +1345,8 @@ NSPluginClass::NSPluginClass( const QString &library,
_NP_Initialize = 0;
_NP_Shutdown = 0;
- _timer = new QTimer( this );
- connect( _timer, SIGNAL(timeout()), SLOT(timer()) );
+ _timer = new TQTimer( this );
+ connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(timer()) );
// check lib handle
if (!_handle) {
@@ -1444,7 +1444,7 @@ int NSPluginClass::initialize()
}
-QString NSPluginClass::getMIMEDescription()
+TQString NSPluginClass::getMIMEDescription()
{
return _NP_GetMIMEDescription();
}
@@ -1458,10 +1458,10 @@ void NSPluginClass::shutdown()
}
-DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, Q_INT8 embed,
- QStringList argn, QStringList argv,
- QString appId, QString callbackId,
- Q_INT8 reload, Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed )
+DCOPRef NSPluginClass::newInstance( TQString url, TQString mimeType, Q_INT8 embed,
+ TQStringList argn, TQStringList argv,
+ TQString appId, TQString callbackId,
+ Q_INT8 reload, Q_INT8 doPost, TQByteArray postData, Q_UINT32 xembed )
{
kdDebug(1431) << "-> NSPluginClass::NewInstance" << endl;
@@ -1472,15 +1472,15 @@ DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, Q_INT8 embed,
unsigned int argc = argn.count();
char **_argn = new char*[argc];
char **_argv = new char*[argc];
- QString src = url;
+ TQString src = url;
int width = 0;
int height = 0;
- QString baseURL = url;
+ TQString baseURL = url;
for (unsigned int i=0; i<argc; i++)
{
- QCString encN = argn[i].utf8();
- QCString encV = argv[i].utf8();
+ TQCString encN = argn[i].utf8();
+ TQCString encV = argv[i].utf8();
const char *n = encN;
const char *v = encV;
@@ -1540,9 +1540,9 @@ DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, Q_INT8 embed,
// create source stream
if ( !src.isEmpty() ) {
if (doPost) {
- inst->postURL(src, postData, mimeType, QString::null, 0, KParts::URLArgs(), false);
+ inst->postURL(src, postData, mimeType, TQString::null, 0, KParts::URLArgs(), false);
} else {
- inst->requestURL( src, mimeType, QString::null, 0, false, reload );
+ inst->requestURL( src, mimeType, TQString::null, 0, false, reload );
}
}
@@ -1561,7 +1561,7 @@ void NSPluginClass::destroyInstance( NSPluginInstance* inst )
/****************************************************************************/
NSPluginStreamBase::NSPluginStreamBase( NSPluginInstance *instance )
- : QObject( instance ), _instance(instance), _stream(0), _tempFile(0L),
+ : TQObject( instance ), _instance(instance), _stream(0), _tempFile(0L),
_pos(0), _queue(0), _queuePos(0), _error(false)
{
_informed = false;
@@ -1632,7 +1632,7 @@ void NSPluginStreamBase::inform()
}
-bool NSPluginStreamBase::create( const QString& url, const QString& mimeType, void *notify, bool forceNotify)
+bool NSPluginStreamBase::create( const TQString& url, const TQString& mimeType, void *notify, bool forceNotify)
{
if ( _stream )
return false;
@@ -1667,7 +1667,7 @@ void NSPluginStreamBase::updateURL( const KURL& newURL )
_stream->url = strdup(_url.url().ascii());
}
-int NSPluginStreamBase::process( const QByteArray &data, int start )
+int NSPluginStreamBase::process( const TQByteArray &data, int start )
{
int32 max, sent, to_sent, len;
char *d = data.data() + start;
@@ -1742,7 +1742,7 @@ bool NSPluginStreamBase::pump()
}
-void NSPluginStreamBase::queue( const QByteArray &data )
+void NSPluginStreamBase::queue( const TQByteArray &data )
{
_queue = data;
_queue.detach();
@@ -1811,8 +1811,8 @@ void NSPluginStreamBase::finish( bool err )
NSPluginBufStream::NSPluginBufStream( class NSPluginInstance *instance )
: NSPluginStreamBase( instance )
{
- _timer = new QTimer( this );
- connect( _timer, SIGNAL(timeout()), this, SLOT(timer()) );
+ _timer = new TQTimer( this );
+ connect( _timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timer()) );
}
@@ -1822,8 +1822,8 @@ NSPluginBufStream::~NSPluginBufStream()
}
-bool NSPluginBufStream::get( const QString& url, const QString& mimeType,
- const QByteArray &buf, void *notifyData,
+bool NSPluginBufStream::get( const TQString& url, const TQString& mimeType,
+ const TQByteArray &buf, void *notifyData,
bool singleShot )
{
_singleShot = singleShot;
@@ -1857,8 +1857,8 @@ void NSPluginBufStream::timer()
NSPluginStream::NSPluginStream( NSPluginInstance *instance )
: NSPluginStreamBase( instance ), _job(0)
{
- _resumeTimer = new QTimer( this );
- connect(_resumeTimer, SIGNAL(timeout()), this, SLOT(resume()));
+ _resumeTimer = new TQTimer( this );
+ connect(_resumeTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(resume()));
}
@@ -1869,7 +1869,7 @@ NSPluginStream::~NSPluginStream()
}
-bool NSPluginStream::get( const QString& url, const QString& mimeType,
+bool NSPluginStream::get( const TQString& url, const TQString& mimeType,
void *notify, bool reload )
{
// create new stream
@@ -1881,23 +1881,23 @@ bool NSPluginStream::get( const QString& url, const QString& mimeType,
if (reload) {
_job->addMetaData("cache", "reload");
}
- connect(_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(data(KIO::Job *, const QByteArray &)));
- connect(_job, SIGNAL(result(KIO::Job *)), SLOT(result(KIO::Job *)));
- connect(_job, SIGNAL(totalSize(KIO::Job *, KIO::filesize_t )),
- SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
- connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
- SLOT(mimetype(KIO::Job *, const QString &)));
- connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)),
- SLOT(redirection(KIO::Job *, const KURL&)));
+ connect(_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(data(KIO::Job *, const TQByteArray &)));
+ connect(_job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(result(KIO::Job *)));
+ connect(_job, TQT_SIGNAL(totalSize(KIO::Job *, KIO::filesize_t )),
+ TQT_SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
+ connect(_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
+ TQT_SLOT(mimetype(KIO::Job *, const TQString &)));
+ connect(_job, TQT_SIGNAL(redirection(KIO::Job *, const KURL&)),
+ TQT_SLOT(redirection(KIO::Job *, const KURL&)));
}
return false;
}
-bool NSPluginStream::post( const QString& url, const QByteArray& data,
- const QString& mimeType, void *notify, const KParts::URLArgs& args )
+bool NSPluginStream::post( const TQString& url, const TQByteArray& data,
+ const TQString& mimeType, void *notify, const KParts::URLArgs& args )
{
// create new stream
if ( create( url, mimeType, notify ) ) {
@@ -1906,22 +1906,22 @@ bool NSPluginStream::post( const QString& url, const QByteArray& data,
_job->addMetaData("content-type", args.contentType());
_job->addMetaData("errorPage", "false");
_job->addMetaData("AllowCompressedPage", "false");
- connect(_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(data(KIO::Job *, const QByteArray &)));
- connect(_job, SIGNAL(result(KIO::Job *)), SLOT(result(KIO::Job *)));
- connect(_job, SIGNAL(totalSize(KIO::Job *, KIO::filesize_t )),
- SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
- connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
- SLOT(mimetype(KIO::Job *, const QString &)));
- connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)),
- SLOT(redirection(KIO::Job *, const KURL&)));
+ connect(_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(data(KIO::Job *, const TQByteArray &)));
+ connect(_job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(result(KIO::Job *)));
+ connect(_job, TQT_SIGNAL(totalSize(KIO::Job *, KIO::filesize_t )),
+ TQT_SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
+ connect(_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
+ TQT_SLOT(mimetype(KIO::Job *, const TQString &)));
+ connect(_job, TQT_SIGNAL(redirection(KIO::Job *, const KURL&)),
+ TQT_SLOT(redirection(KIO::Job *, const KURL&)));
}
return false;
}
-void NSPluginStream::data(KIO::Job * job, const QByteArray &data)
+void NSPluginStream::data(KIO::Job * job, const TQByteArray &data)
{
//kdDebug(1431) << "NSPluginStream::data - job=" << (void*)job << " data size=" << data.size() << endl;
queue( data );
@@ -1942,9 +1942,9 @@ void NSPluginStream::totalSize(KIO::Job * job, KIO::filesize_t size)
_stream->end = size;
}
-void NSPluginStream::mimetype(KIO::Job * job, const QString &mimeType)
+void NSPluginStream::mimetype(KIO::Job * job, const TQString &mimeType)
{
- kdDebug(1431) << "NSPluginStream::QByteArray - job=" << (void*)job << " mimeType=" << mimeType << endl;
+ kdDebug(1431) << "NSPluginStream::TQByteArray - job=" << (void*)job << " mimeType=" << mimeType << endl;
_mimeType = mimeType;
}
diff --git a/nsplugins/viewer/nsplugin.h b/nsplugins/viewer/nsplugin.h
index 76d2e659b..c68eb1bcf 100644
--- a/nsplugins/viewer/nsplugin.h
+++ b/nsplugins/viewer/nsplugin.h
@@ -32,14 +32,14 @@
#include "NSPluginCallbackIface_stub.h"
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrqueue.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qintdict.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrqueue.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqintdict.h>
+#include <tqguardedptr.h>
#include <kparts/browserextension.h> // for URLArgs
#include <kio/job.h>
@@ -82,8 +82,8 @@ protected:
void finish( bool err );
bool pump();
bool error() { return _error; }
- void queue( const QByteArray &data );
- bool create( const QString& url, const QString& mimeType, void *notify, bool forceNotify = false );
+ void queue( const TQByteArray &data );
+ bool create( const TQString& url, const TQString& mimeType, void *notify, bool forceNotify = false );
int tries() { return _tries; }
void inform( );
void updateURL( const KURL& newURL );
@@ -93,16 +93,16 @@ protected:
NPStream *_stream;
void *_notifyData;
KURL _url;
- QString _fileURL;
- QString _mimeType;
- QByteArray _data;
+ TQString _fileURL;
+ TQString _mimeType;
+ TQByteArray _data;
class KTempFile *_tempFile;
private:
- int process( const QByteArray &data, int start );
+ int process( const TQByteArray &data, int start );
unsigned int _pos;
- QByteArray _queue;
+ TQByteArray _queue;
unsigned int _queuePos;
int _tries;
bool _onlyAsFile;
@@ -120,20 +120,20 @@ public:
NSPluginStream( class NSPluginInstance *instance );
~NSPluginStream();
- bool get(const QString& url, const QString& mimeType, void *notifyData, bool reload = false);
- bool post(const QString& url, const QByteArray& data, const QString& mimeType, void *notifyData, const KParts::URLArgs& args);
+ bool get(const TQString& url, const TQString& mimeType, void *notifyData, bool reload = false);
+ bool post(const TQString& url, const TQByteArray& data, const TQString& mimeType, void *notifyData, const KParts::URLArgs& args);
protected slots:
- void data(KIO::Job *job, const QByteArray &data);
+ void data(KIO::Job *job, const TQByteArray &data);
void totalSize(KIO::Job *job, KIO::filesize_t size);
- void mimetype(KIO::Job * job, const QString &mimeType);
+ void mimetype(KIO::Job * job, const TQString &mimeType);
void result(KIO::Job *job);
void redirection(KIO::Job *job, const KURL& url);
void resume();
protected:
- QGuardedPtr<KIO::TransferJob> _job;
- QTimer *_resumeTimer;
+ TQGuardedPtr<KIO::TransferJob> _job;
+ TQTimer *_resumeTimer;
};
@@ -145,18 +145,18 @@ public:
NSPluginBufStream( class NSPluginInstance *instance );
~NSPluginBufStream();
- bool get( const QString& url, const QString& mimeType, const QByteArray &buf, void *notifyData, bool singleShot=false );
+ bool get( const TQString& url, const TQString& mimeType, const TQByteArray &buf, void *notifyData, bool singleShot=false );
protected slots:
void timer();
protected:
- QTimer *_timer;
+ TQTimer *_timer;
bool _singleShot;
};
-class NSPluginInstance : public QObject, public virtual NSPluginInstanceIface
+class NSPluginInstance : public TQObject, public virtual NSPluginInstanceIface
{
Q_OBJECT
@@ -164,9 +164,9 @@ public:
// constructor, destructor
NSPluginInstance( NPP privateData, NPPluginFuncs *pluginFuncs, KLibrary *handle,
- int width, int height, QString src, QString mime,
- QString appId, QString callbackId, bool embed, WId xembed,
- QObject *parent, const char* name=0 );
+ int width, int height, TQString src, TQString mime,
+ TQString appId, TQString callbackId, bool embed, WId xembed,
+ TQObject *parent, const char* name=0 );
~NSPluginInstance();
// DCOP functions
@@ -174,7 +174,7 @@ public:
int winId() { return _form != 0 ? XtWindow(_form) : 0; }
int setWindow(Q_INT8 remove=0);
void resizePlugin(Q_INT32 w, Q_INT32 h);
- void javascriptResult(Q_INT32 id, QString result);
+ void javascriptResult(Q_INT32 id, TQString result);
void displayPlugin();
void gotFocusIn();
void gotFocusOut();
@@ -194,19 +194,19 @@ public:
int32 NPWriteReady(NPStream *stream);
// URL functions
- void NPURLNotify(QString url, NPReason reason, void *notifyData);
+ void NPURLNotify(TQString url, NPReason reason, void *notifyData);
// Event handling
uint16 HandleEvent(void *event);
// signal emitters
- void emitStatus( const QString &message);
- void requestURL( const QString &url, const QString &mime,
- const QString &target, void *notify, bool forceNotify = false, bool reload = false );
- void postURL( const QString &url, const QByteArray& data, const QString &mime,
- const QString &target, void *notify, const KParts::URLArgs& args, bool forceNotify = false );
+ void emitStatus( const TQString &message);
+ void requestURL( const TQString &url, const TQString &mime,
+ const TQString &target, void *notify, bool forceNotify = false, bool reload = false );
+ void postURL( const TQString &url, const TQByteArray& data, const TQString &mime,
+ const TQString &target, void *notify, const KParts::URLArgs& args, bool forceNotify = false );
- QString normalizedURL(const QString& url) const;
+ TQString normalizedURL(const TQString& url) const;
public slots:
void streamFinished( NSPluginStreamBase *strm );
@@ -224,40 +224,40 @@ private:
bool _destroyed;
bool _visible;
void addTempFile(KTempFile *tmpFile);
- QPtrList<KTempFile> _tempFiles;
+ TQPtrList<KTempFile> _tempFiles;
NSPluginCallbackIface_stub *_callback;
- QPtrList<NSPluginStreamBase> _streams;
+ TQPtrList<NSPluginStreamBase> _streams;
KLibrary *_handle;
- QTimer *_timer;
+ TQTimer *_timer;
NPP _npp;
NPPluginFuncs _pluginFuncs;
Widget _area, _form, _toplevel;
WId _xembed_window;
- QString _baseURL;
+ TQString _baseURL;
int _width, _height;
struct Request
{
// A GET request
- Request( const QString &_url, const QString &_mime,
- const QString &_target, void *_notify, bool _forceNotify = false,
+ Request( const TQString &_url, const TQString &_mime,
+ const TQString &_target, void *_notify, bool _forceNotify = false,
bool _reload = false)
{ url=_url; mime=_mime; target=_target; notify=_notify; post=false; forceNotify = _forceNotify; reload = _reload; }
// A POST request
- Request( const QString &_url, const QByteArray& _data,
- const QString &_mime, const QString &_target, void *_notify,
+ Request( const TQString &_url, const TQByteArray& _data,
+ const TQString &_mime, const TQString &_target, void *_notify,
const KParts::URLArgs& _args, bool _forceNotify = false)
{ url=_url; mime=_mime; target=_target;
notify=_notify; post=true; data=_data; args=_args;
forceNotify = _forceNotify; }
- QString url;
- QString mime;
- QString target;
- QByteArray data;
+ TQString url;
+ TQString mime;
+ TQString target;
+ TQByteArray data;
bool post;
bool forceNotify;
bool reload;
@@ -267,29 +267,29 @@ private:
NPWindow _win;
NPSetWindowCallbackStruct _win_info;
- QPtrQueue<Request> _waitingRequests;
- QMap<int, Request*> _jsrequests;
+ TQPtrQueue<Request> _waitingRequests;
+ TQMap<int, Request*> _jsrequests;
};
-class NSPluginClass : public QObject, virtual public NSPluginClassIface
+class NSPluginClass : public TQObject, virtual public NSPluginClassIface
{
Q_OBJECT
public:
- NSPluginClass( const QString &library, QObject *parent, const char *name=0 );
+ NSPluginClass( const TQString &library, TQObject *parent, const char *name=0 );
~NSPluginClass();
- QString getMIMEDescription();
- DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed,
- QStringList argn, QStringList argv,
- QString appId, QString callbackId, Q_INT8 reload, Q_INT8 post,
- QByteArray postData, Q_UINT32 xembed );
+ TQString getMIMEDescription();
+ DCOPRef newInstance(TQString url, TQString mimeType, Q_INT8 embed,
+ TQStringList argn, TQStringList argv,
+ TQString appId, TQString callbackId, Q_INT8 reload, Q_INT8 post,
+ TQByteArray postData, Q_UINT32 xembed );
void destroyInstance( NSPluginInstance* inst );
bool error() { return _error; }
- void setApp(const QCString& app) { _app = app; }
- const QCString& app() const { return _app; }
+ void setApp(const TQCString& app) { _app = app; }
+ const TQCString& app() const { return _app; }
protected slots:
void timer();
@@ -299,10 +299,10 @@ private:
void shutdown();
KLibrary *_handle;
- QString _libname;
+ TQString _libname;
bool _constructed;
bool _error;
- QTimer *_timer;
+ TQTimer *_timer;
NP_GetMIMEDescriptionUPP *_NP_GetMIMEDescription;
NP_InitializeUPP *_NP_Initialize;
@@ -311,28 +311,28 @@ private:
NPPluginFuncs _pluginFuncs;
NPNetscapeFuncs _nsFuncs;
- QPtrList<NSPluginInstance> _instances;
- QPtrList<NSPluginInstance> _trash;
+ TQPtrList<NSPluginInstance> _instances;
+ TQPtrList<NSPluginInstance> _trash;
- QCString _app;
+ TQCString _app;
};
-class NSPluginViewer : public QObject, virtual public NSPluginViewerIface
+class NSPluginViewer : public TQObject, virtual public NSPluginViewerIface
{
Q_OBJECT
public:
- NSPluginViewer( QCString dcopId, QObject *parent, const char *name=0 );
+ NSPluginViewer( TQCString dcopId, TQObject *parent, const char *name=0 );
virtual ~NSPluginViewer();
void shutdown();
- DCOPRef newClass( QString plugin );
+ DCOPRef newClass( TQString plugin );
private slots:
- void appUnregistered(const QCString& id);
+ void appUnregistered(const TQCString& id);
private:
- QDict<NSPluginClass> _classes;
+ TQDict<NSPluginClass> _classes;
};
diff --git a/nsplugins/viewer/qxteventloop.cpp b/nsplugins/viewer/qxteventloop.cpp
index 856cfe67c..b34c1e03c 100644
--- a/nsplugins/viewer/qxteventloop.cpp
+++ b/nsplugins/viewer/qxteventloop.cpp
@@ -1,5 +1,5 @@
/****************************************************************************
-** Implementation of QWidget class
+** Implementation of TQWidget class
**
** Created : 931031
**
@@ -39,11 +39,11 @@
#if QT_VERSION >= 0x030100
-#include <qapplication.h>
-#include <qwidgetintdict.h>
+#include <tqapplication.h>
+#include <tqwidgetintdict.h>
#include <kglobal.h>
-// resolve the conflict between X11's FocusIn and QEvent::FocusIn
+// resolve the conflict between X11's FocusIn and TQEvent::FocusIn
const int XFocusOut = FocusOut;
const int XFocusIn = FocusIn;
#undef FocusOut
@@ -65,10 +65,10 @@ public:
void unhook();
XtAppContext appContext, ownContext;
- QMemArray<XtEventDispatchProc> dispatchers;
- QWidgetIntDict mapper;
+ TQMemArray<XtEventDispatchProc> dispatchers;
+ TQWidgetIntDict mapper;
- QIntDict<QSocketNotifier> socknotDict;
+ TQIntDict<TQSocketNotifier> socknotDict;
bool activate_timers;
XtIntervalId timerid;
@@ -87,7 +87,7 @@ static XEvent* last_xevent = 0;
Rationale: An XEvent handled by Qt does not go through the Xt event
handlers, and the internal state of Xt/Motif widgets will not be
updated. This function should only be used if an event delivered by
- Qt to a QWidget needs to be sent to an Xt/Motif widget.
+ Qt to a TQWidget needs to be sent to an Xt/Motif widget.
*/
bool QXtEventLoop::redeliverEvent( XEvent *event )
{
@@ -123,7 +123,7 @@ void QXtEventLoopPrivate::hookMeUp()
int et;
for ( et = 2; et < LASTEvent; et++ )
dispatchers[ et ] =
- XtSetEventDispatcher( QPaintDevice::x11AppDisplay(),
+ XtSetEventDispatcher( TQPaintDevice::x11AppDisplay(),
et, ::qmotif_event_dispatcher );
}
@@ -135,29 +135,29 @@ void QXtEventLoopPrivate::unhook()
// ### TODO extensions?
int et;
for ( et = 2; et < LASTEvent; et++ )
- (void) XtSetEventDispatcher( QPaintDevice::x11AppDisplay(),
+ (void) XtSetEventDispatcher( TQPaintDevice::x11AppDisplay(),
et, dispatchers[ et ] );
dispatchers.resize( 0 );
/*
We cannot destroy the app context here because it closes the X
- display, something QApplication does as well a bit later.
+ display, something TQApplication does as well a bit later.
if ( ownContext )
XtDestroyApplicationContext( ownContext );
*/
appContext = ownContext = 0;
}
-extern bool qt_try_modal( QWidget *, XEvent * ); // defined in qapplication_x11.cpp
+extern bool qt_try_modal( TQWidget *, XEvent * ); // defined in qapplication_x11.cpp
Boolean qmotif_event_dispatcher( XEvent *event )
{
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
- QWidgetIntDict *mapper = &static_d->mapper;
- QWidget* qMotif = mapper->find( event->xany.window );
- if ( !qMotif && QWidget::find( event->xany.window) == 0 ) {
+ TQWidgetIntDict *mapper = &static_d->mapper;
+ TQWidget* qMotif = mapper->find( event->xany.window );
+ if ( !qMotif && TQWidget::find( event->xany.window) == 0 ) {
// event is not for Qt, try Xt
- Display* dpy = QPaintDevice::x11AppDisplay();
+ Display* dpy = TQPaintDevice::x11AppDisplay();
Widget w = XtWindowToWidget( dpy, event->xany.window );
while ( w && ! ( qMotif = mapper->find( XtWindow( w ) ) ) ) {
if ( XtIsShell( w ) ) {
@@ -201,11 +201,11 @@ Boolean qmotif_event_dispatcher( XEvent *event )
return True;
- if ( QApplication::activePopupWidget() )
+ if ( TQApplication::activePopupWidget() )
// we get all events through the popup grabs. discard the event
return True;
- if ( qMotif && QApplication::activeModalWidget() ) {
+ if ( qMotif && TQApplication::activeModalWidget() ) {
if ( !qt_try_modal(qMotif, event) )
return True;
@@ -229,13 +229,13 @@ Boolean qmotif_event_dispatcher( XEvent *event )
QXtEventLoop only provides a few public functions, but is the brains
behind the integration. QXtEventLoop is responsible for initializing
the Xt toolkit and the Xt application context. It does not open a
- connection to the X server, this is done by using QApplication.
+ connection to the X server, this is done by using TQApplication.
The only member function in QXtEventLoop that depends on an X server
connection is QXtEventLoop::initialize(). QXtEventLoop must be created before
- QApplication.
+ TQApplication.
- Example usage of QXtEventLoop and QApplication:
+ Example usage of QXtEventLoop and TQApplication:
\code
static char *resources[] = {
@@ -247,7 +247,7 @@ Boolean qmotif_event_dispatcher( XEvent *event )
QXtEventLoop integrator( "AppClass" );
XtAppSetFallbackResources( integrator.applicationContext(),
resources );
- QApplication app( argc, argv );
+ TQApplication app( argc, argv );
...
@@ -264,7 +264,7 @@ Boolean qmotif_event_dispatcher( XEvent *event )
All arguments passed to this function (\a applicationClass, \a
options and \a numOptions) are used to call XtDisplayInitialize()
- after QApplication has been constructed.
+ after TQApplication has been constructed.
*/
@@ -311,7 +311,7 @@ void QXtEventLoop::appStartingUp()
{
int argc = qApp->argc();
XtDisplayInitialize( d->appContext,
- QPaintDevice::x11AppDisplay(),
+ TQPaintDevice::x11AppDisplay(),
qApp->name(),
d->applicationClass,
d->options,
@@ -329,7 +329,7 @@ void QXtEventLoop::appClosingDown()
/*!\internal
*/
-void QXtEventLoop::registerWidget( QWidget* w )
+void QXtEventLoop::registerWidget( TQWidget* w )
{
if ( !static_d )
return;
@@ -339,7 +339,7 @@ void QXtEventLoop::registerWidget( QWidget* w )
/*!\internal
*/
-void QXtEventLoop::unregisterWidget( QWidget* w )
+void QXtEventLoop::unregisterWidget( TQWidget* w )
{
if ( !static_d )
return;
@@ -352,7 +352,7 @@ void QXtEventLoop::unregisterWidget( QWidget* w )
void qmotif_socknot_handler( XtPointer pointer, int *, XtInputId *id )
{
QXtEventLoop *eventloop = (QXtEventLoop *) pointer;
- QSocketNotifier *socknot = static_d->socknotDict.find( *id );
+ TQSocketNotifier *socknot = static_d->socknotDict.find( *id );
if ( ! socknot ) // this shouldn't happen
return;
eventloop->setSocketNotifierPending( socknot );
@@ -360,19 +360,19 @@ void qmotif_socknot_handler( XtPointer pointer, int *, XtInputId *id )
/*! \reimp
*/
-void QXtEventLoop::registerSocketNotifier( QSocketNotifier *notifier )
+void QXtEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
{
XtInputMask mask;
switch ( notifier->type() ) {
- case QSocketNotifier::Read:
+ case TQSocketNotifier::Read:
mask = XtInputReadMask;
break;
- case QSocketNotifier::Write:
+ case TQSocketNotifier::Write:
mask = XtInputWriteMask;
break;
- case QSocketNotifier::Exception:
+ case TQSocketNotifier::Exception:
mask = XtInputExceptMask;
break;
@@ -386,14 +386,14 @@ void QXtEventLoop::registerSocketNotifier( QSocketNotifier *notifier )
qmotif_socknot_handler, this );
d->socknotDict.insert( id, notifier );
- QEventLoop::registerSocketNotifier( notifier );
+ TQEventLoop::registerSocketNotifier( notifier );
}
/*! \reimp
*/
-void QXtEventLoop::unregisterSocketNotifier( QSocketNotifier *notifier )
+void QXtEventLoop::unregisterSocketNotifier( TQSocketNotifier *notifier )
{
- QIntDictIterator<QSocketNotifier> it( d->socknotDict );
+ TQIntDictIterator<TQSocketNotifier> it( d->socknotDict );
while ( it.current() && notifier != it.current() )
++it;
if ( ! it.current() ) {
@@ -405,7 +405,7 @@ void QXtEventLoop::unregisterSocketNotifier( QSocketNotifier *notifier )
XtRemoveInput( it.currentKey() );
d->socknotDict.remove( it.currentKey() );
- QEventLoop::unregisterSocketNotifier( notifier );
+ TQEventLoop::unregisterSocketNotifier( notifier );
}
/*! \internal
@@ -422,7 +422,7 @@ bool QXtEventLoop::processEvents( ProcessEventsFlags flags )
{
// Qt uses posted events to do lots of delayed operations, like repaints... these
// need to be delivered before we go to sleep
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
// make sure we fire off Qt's timers
int ttw = timeToWait();
diff --git a/nsplugins/viewer/qxteventloop.h b/nsplugins/viewer/qxteventloop.h
index 0bed590b2..02ed69541 100644
--- a/nsplugins/viewer/qxteventloop.h
+++ b/nsplugins/viewer/qxteventloop.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Implementation of QWidget class
+** Implementation of TQWidget class
**
** Created : 931031
**
@@ -36,10 +36,10 @@
#ifndef QXTEVENTLOOP_H
#define QXTEVENTLOOP_H
-#include <qglobal.h>
+#include <tqglobal.h>
#if QT_VERSION >= 0x030100
-#include <qeventloop.h>
+#include <tqeventloop.h>
@@ -57,11 +57,11 @@ public:
XtAppContext applicationContext() const;
- void registerSocketNotifier( QSocketNotifier * );
- void unregisterSocketNotifier( QSocketNotifier * );
+ void registerSocketNotifier( TQSocketNotifier * );
+ void unregisterSocketNotifier( TQSocketNotifier * );
- static void registerWidget( QWidget* );
- static void unregisterWidget( QWidget* );
+ static void registerWidget( TQWidget* );
+ static void unregisterWidget( TQWidget* );
static bool redeliverEvent( XEvent *event );
static XEvent* lastEvent();
diff --git a/nsplugins/viewer/viewer.cpp b/nsplugins/viewer/viewer.cpp
index 3e23a944a..ba14b0990 100644
--- a/nsplugins/viewer/viewer.cpp
+++ b/nsplugins/viewer/viewer.cpp
@@ -34,8 +34,8 @@
#include <kglobal.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qptrlist.h>
-#include <qsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqsocketnotifier.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <sys/time.h>
@@ -85,7 +85,7 @@ static int x_errhandler(Display *dpy, XErrorEvent *error)
* the "old style" and keep lot's of global vars. :-)
*/
-static QCString g_dcopId;
+static TQCString g_dcopId;
/**
* parseCommandLine - get command line parameters
@@ -122,11 +122,11 @@ void quitXt()
struct SocketNot
{
int fd;
- QObject *obj;
+ TQObject *obj;
XtInputId id;
};
-QPtrList<SocketNot> _notifiers[3];
+TQPtrList<SocketNot> _notifiers[3];
/**
* socketCallback - send event to the socket notifier
@@ -136,10 +136,10 @@ void socketCallback(void *client_data, int* /*source*/, XtInputId* /*id*/)
{
kdDebug(1430) << "-> socketCallback( client_data=" << client_data << " )" << endl;
- QEvent event( QEvent::SockAct );
+ TQEvent event( TQEvent::SockAct );
SocketNot *socknot = (SocketNot *)client_data;
kdDebug(1430) << "obj=" << (void*)socknot->obj << endl;
- QApplication::sendEvent( socknot->obj, &event );
+ TQApplication::sendEvent( socknot->obj, &event );
kdDebug(1430) << "<- socketCallback" << endl;
}
@@ -151,12 +151,12 @@ void socketCallback(void *client_data, int* /*source*/, XtInputId* /*id*/)
* the original one in Qt. I hope this works with every dynamic library loader on any OS.
*
*/
-extern bool qt_set_socket_handler( int, int, QObject *, bool );
-bool qt_set_socket_handler( int sockfd, int type, QObject *obj, bool enable )
+extern bool qt_set_socket_handler( int, int, TQObject *, bool );
+bool qt_set_socket_handler( int sockfd, int type, TQObject *obj, bool enable )
{
if ( sockfd < 0 || type < 0 || type > 2 || obj == 0 ) {
#if defined(CHECK_RANGE)
- qWarning( "QSocketNotifier: Internal error" );
+ qWarning( "TQSocketNotifier: Internal error" );
#endif
return FALSE;
}
@@ -164,9 +164,9 @@ bool qt_set_socket_handler( int sockfd, int type, QObject *obj, bool enable )
XtPointer inpMask = 0;
switch (type) {
- case QSocketNotifier::Read: inpMask = (XtPointer)XtInputReadMask; break;
- case QSocketNotifier::Write: inpMask = (XtPointer)XtInputWriteMask; break;
- case QSocketNotifier::Exception: inpMask = (XtPointer)XtInputExceptMask; break;
+ case TQSocketNotifier::Read: inpMask = (XtPointer)XtInputReadMask; break;
+ case TQSocketNotifier::Write: inpMask = (XtPointer)XtInputWriteMask; break;
+ case TQSocketNotifier::Exception: inpMask = (XtPointer)XtInputExceptMask; break;
default: return FALSE;
}
@@ -185,7 +185,7 @@ bool qt_set_socket_handler( int sockfd, int type, QObject *obj, bool enable )
#if defined(CHECK_STATE)
if ( p && p->fd==sockfd ) {
static const char *t[] = { "read", "write", "exception" };
- qWarning( "QSocketNotifier: Multiple socket notifiers for "
+ qWarning( "TQSocketNotifier: Multiple socket notifiers for "
"same socket %d and type %s", sockfd, t[type] );
}
#endif