diff options
Diffstat (limited to 'nsplugins')
-rw-r--r-- | nsplugins/NSPluginCallbackIface.h | 2 | ||||
-rw-r--r-- | nsplugins/nspluginloader.cpp | 8 | ||||
-rw-r--r-- | nsplugins/nspluginloader.h | 2 | ||||
-rw-r--r-- | nsplugins/plugin_part.cpp | 16 | ||||
-rw-r--r-- | nsplugins/plugin_part.h | 6 | ||||
-rw-r--r-- | nsplugins/pluginscan.cpp | 22 | ||||
-rw-r--r-- | nsplugins/sdk/jni.h | 6 | ||||
-rw-r--r-- | nsplugins/sdk/jri.h | 4 | ||||
-rw-r--r-- | nsplugins/sdk/npruntime.h | 6 | ||||
-rw-r--r-- | nsplugins/sdk/npupp.h | 4 | ||||
-rw-r--r-- | nsplugins/viewer/NSPluginClassIface.h | 12 | ||||
-rw-r--r-- | nsplugins/viewer/kxt.cpp | 6 | ||||
-rw-r--r-- | nsplugins/viewer/nsplugin.cpp | 50 | ||||
-rw-r--r-- | nsplugins/viewer/nsplugin.h | 14 | ||||
-rw-r--r-- | nsplugins/viewer/qxteventloop.cpp | 16 | ||||
-rw-r--r-- | nsplugins/viewer/qxteventloop.h | 7 | ||||
-rw-r--r-- | nsplugins/viewer/viewer.cpp | 2 | ||||
-rw-r--r-- | nsplugins/wrapper/wrapper.c | 16 |
18 files changed, 100 insertions, 99 deletions
diff --git a/nsplugins/NSPluginCallbackIface.h b/nsplugins/NSPluginCallbackIface.h index 33e9f85c3..6b23e87a9 100644 --- a/nsplugins/NSPluginCallbackIface.h +++ b/nsplugins/NSPluginCallbackIface.h @@ -37,7 +37,7 @@ k_dcop: 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; + virtual ASYNC evalJavaScript( TQ_INT32 id, TQString script ) = 0; }; diff --git a/nsplugins/nspluginloader.cpp b/nsplugins/nspluginloader.cpp index 3824334c0..9cd60d77c 100644 --- a/nsplugins/nspluginloader.cpp +++ b/nsplugins/nspluginloader.cpp @@ -130,7 +130,7 @@ void NSPluginInstance::windowChanged(WId w) setBackgroundMode(w == 0 ? TQWidget::PaletteBackground : TQWidget::NoBackground); if (w == 0) { // FIXME: Put a notice here to tell the user that it crashed. - repaint(); + tqrepaint(); } } @@ -174,13 +174,13 @@ void NSPluginInstance::focusOutEvent( TQFocusEvent* event ) void NSPluginInstance::displayPlugin() { - qApp->syncX(); // process pending X commands + tqApp->syncX(); // process pending X commands stub->displayPlugin(); } void NSPluginInstance::resizePlugin( int w, int h ) { - qApp->syncX(); + tqApp->syncX(); stub->resizePlugin( w, h ); } @@ -292,7 +292,7 @@ void NSPluginLoader::scanPlugins() stripped = stripped.right( stripped.length()-p ); // add filetype to list - if ( !stripped.isEmpty() && !_filetype.find(stripped) ) + if ( !stripped.isEmpty() && !_filetype.tqfind(stripped) ) _filetype.insert( stripped, new TQString(mime)); } } diff --git a/nsplugins/nspluginloader.h b/nsplugins/nspluginloader.h index 1748bb504..13e77093d 100644 --- a/nsplugins/nspluginloader.h +++ b/nsplugins/nspluginloader.h @@ -78,7 +78,7 @@ private: // wrappers }; -class NSPluginLoader : public QObject +class NSPluginLoader : public TQObject { Q_OBJECT diff --git a/nsplugins/plugin_part.cpp b/nsplugins/plugin_part.cpp index e7580db93..f55f6469b 100644 --- a/nsplugins/plugin_part.cpp +++ b/nsplugins/plugin_part.cpp @@ -90,7 +90,7 @@ TQString PluginLiveConnectExtension::evalJavaScript( const TQString & script ) kdDebug(1432) << "PLUGIN:LiveConnect::evalJavaScript " << script << endl; ArgList args; TQString jscode; - jscode.sprintf("this.__nsplugin=eval(\"%s\")", TQString(script).replace('\\', "\\\\").replace('"', "\\\"").latin1()); + jscode.sprintf("this.__nsplugin=eval(\"%s\")", TQString(script).tqreplace('\\', "\\\\").tqreplace('"', "\\\"").latin1()); //kdDebug(1432) << "String is [" << jscode << "]" << endl; args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, jscode)); TQString nsplugin("Undefined"); @@ -171,13 +171,13 @@ PluginFactory::~PluginFactory() s_instance = 0; } -KParts::Part * PluginFactory::createPartObject(TQWidget *parentWidget, const char *widgetName, +KParts::Part * PluginFactory::createPartObject(TQWidget *tqparentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args) { Q_UNUSED(classname) kdDebug(1432) << "PluginFactory::create" << endl; - KParts::Part *obj = new PluginPart(parentWidget, widgetName, parent, name, args); + KParts::Part *obj = new PluginPart(tqparentWidget, widgetName, parent, name, args); return obj; } @@ -201,7 +201,7 @@ KAboutData *PluginFactory::aboutData() /**************************************************************************/ -PluginPart::PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +PluginPart::PluginPart(TQWidget *tqparentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList &args) : KParts::ReadOnlyPart(parent, name), _widget(0), _args(args), _destructed(0L) @@ -226,9 +226,9 @@ PluginPart::PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject _callback = new NSPluginCallback(this); // create a canvas to insert our widget - _canvas = new PluginCanvasWidget( parentWidget, widgetName ); + _canvas = new PluginCanvasWidget( tqparentWidget, widgetName ); //_canvas->setFocusPolicy( TQWidget::ClickFocus ); - _canvas->setFocusPolicy( TQWidget::WheelFocus ); + _canvas->setFocusPolicy( TQ_WheelFocus ); _canvas->setBackgroundMode( TQWidget::NoBackground ); setWidget(_canvas); _canvas->show(); @@ -266,7 +266,7 @@ bool PluginPart::openURL(const KURL &url) TQStringList::Iterator it = _args.begin(); for ( ; it != _args.end(); ) { - int equalPos = (*it).find("="); + int equalPos = (*it).tqfind("="); if (equalPos>0) { TQString name = (*it).left(equalPos).upper(); @@ -307,7 +307,7 @@ bool PluginPart::openURL(const KURL &url) _widget = inst; } else { TQLabel *label = new TQLabel( i18n("Unable to load Netscape plugin for %1").arg(url.url()), _canvas ); - label->setAlignment( AlignCenter | WordBreak ); + label->tqsetAlignment( AlignCenter | WordBreak ); _widget = label; } diff --git a/nsplugins/plugin_part.h b/nsplugins/plugin_part.h index 012d5443f..6173eeed8 100644 --- a/nsplugins/plugin_part.h +++ b/nsplugins/plugin_part.h @@ -67,7 +67,7 @@ public: PluginFactory(); virtual ~PluginFactory(); - virtual KParts::Part * createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0, + virtual KParts::Part * createPartObject(TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList()); @@ -82,7 +82,7 @@ private: }; -class PluginCanvasWidget : public QWidget +class PluginCanvasWidget : public TQWidget { Q_OBJECT public: @@ -102,7 +102,7 @@ class PluginPart: public KParts::ReadOnlyPart { Q_OBJECT public: - PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + PluginPart(TQWidget *tqparentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList &args = TQStringList()); virtual ~PluginPart(); diff --git a/nsplugins/pluginscan.cpp b/nsplugins/pluginscan.cpp index 6914deb93..91da2dd52 100644 --- a/nsplugins/pluginscan.cpp +++ b/nsplugins/pluginscan.cpp @@ -130,7 +130,7 @@ void deletePluginMimeTypes() } for ( unsigned int i=0; i<dirs.count(); i++ ) { - if ( !dirs[i].contains(".") ) { + if ( !dirs[i].tqcontains(".") ) { // check all mime types for X-KDE-nsplugin flag kdDebug(1433) << " - Looking in " << dirs[i] << endl; @@ -162,7 +162,7 @@ void generateMimeType( TQString mime, TQString extensions, TQString pluginName, // get directory from mime string TQString dir; TQString name; - int pos = mime.findRev('/'); + int pos = mime.tqfindRev('/'); if ( pos<0 ) { kdDebug(1433) << "Invalid MIME type " << mime << endl; kdDebug(1433) << "<- generateMimeType" << endl; @@ -251,14 +251,14 @@ int tryCheck(int write_fd, const TQString &absFile) NPError err = func_GetValue( 0, NPPVpluginNameString, (void*)&buf ); if ( err==NPERR_NO_ERROR ) - name = TQString::fromLatin1( buf ); + name = TQString::tqfromLatin1( buf ); kdDebug() << "name = " << name << endl; // get name NPError nperr = func_GetValue( 0, NPPVpluginDescriptionString, (void*)&buf ); if ( nperr==NPERR_NO_ERROR ) - description = TQString::fromLatin1( buf ); + description = TQString::tqfromLatin1( buf ); kdDebug() << "description = " << description << endl; } else @@ -283,7 +283,7 @@ int tryCheck(int write_fd, const TQString &absFile) // remove version info, as it is not used at the moment TQRegExp versionRegExp(";version=[^:]*:"); - mimeInfo.replace( versionRegExp, ":"); + mimeInfo.tqreplace( versionRegExp, ":"); // unload plugin lib kdDebug(1433) << " - unloading plugin" << endl; @@ -318,7 +318,7 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, for (unsigned int i=0; i<files.count(); i++) { TQString extension; - int j = files[i].findRev('.'); + int j = files[i].tqfindRev('.'); if (j > 0) extension = files[i].mid(j+1); @@ -346,7 +346,7 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, // open the library and ask for the mimetype kdDebug(1433) << " - opening " << absFile << endl; - cache.device()->flush(); + cache.tqdevice()->flush(); // fork, so that a crash in the plugin won't stop the scanning of other plugins int pipes[2]; if (pipe(pipes) != 0) continue; @@ -404,10 +404,10 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, for ( type=types.begin(); type!=types.end(); ++type ) { kdDebug(1433) << " - type=" << *type << endl; - name = name.replace( ':', "%3A" ); + name = name.tqreplace( ':', "%3A" ); TQString entry = name + ":" + *type; - if ( !mimeInfoList.contains( entry ) ) { + if ( !mimeInfoList.tqcontains( entry ) ) { if (!actuallyUsing) { // note the plugin name cache << "[" << absFile << "]" << endl; @@ -444,7 +444,7 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, static int depth = 0; // avoid recursion because of symlink circles depth++; for ( unsigned int i=0; i<dirs.count(); i++ ) { - if ( depth<8 && !dirs[i].contains(".") ) + if ( depth<8 && !dirs[i].tqcontains(".") ) scanDirectory( dirs.absFilePath(dirs[i]), mimeInfoList, cache ); } depth--; @@ -620,7 +620,7 @@ int main( int argc, char **argv ) TQString desc = info[3]; // append to global mime type list - if ( !mimeTypes.contains(type) ) { + if ( !mimeTypes.tqcontains(type) ) { kdDebug(1433) << " - mimeType=" << type << endl; mimeTypes.append( type ); diff --git a/nsplugins/sdk/jni.h b/nsplugins/sdk/jni.h index 863075afa..7ef133a51 100644 --- a/nsplugins/sdk/jni.h +++ b/nsplugins/sdk/jni.h @@ -580,7 +580,7 @@ struct JNINativeInterface_ { (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); jstring (JNICALL *NewString) - (JNIEnv *env, const jchar *unicode, jsize len); + (JNIEnv *env, const jchar *tqunicode, jsize len); jsize (JNICALL *GetStringLength) (JNIEnv *env, jstring str); const jchar *(JNICALL *GetStringChars) @@ -1508,8 +1508,8 @@ struct JNIEnv_ { functions->SetStaticDoubleField(this,clazz,fieldID,value); } - jstring NewString(const jchar *unicode, jsize len) { - return functions->NewString(this,unicode,len); + jstring NewString(const jchar *tqunicode, jsize len) { + return functions->NewString(this,tqunicode,len); } jsize GetStringLength(jstring str) { return functions->GetStringLength(this,str); diff --git a/nsplugins/sdk/jri.h b/nsplugins/sdk/jri.h index f29945b94..62d542a8b 100644 --- a/nsplugins/sdk/jri.h +++ b/nsplugins/sdk/jri.h @@ -341,8 +341,8 @@ typedef const JRIEnvInterface* JRIEnv; #define JRI_SetStaticFieldDouble(env, clazz, fieldID, value) \ (((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value)) -#define JRI_NewString(env, unicode, len) \ - (((*(env))->NewString)(env, JRI_NewString_op, unicode, len)) +#define JRI_NewString(env, tqunicode, len) \ + (((*(env))->NewString)(env, JRI_NewString_op, tqunicode, len)) #define JRI_GetStringLength(env, string) \ (((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string)) diff --git a/nsplugins/sdk/npruntime.h b/nsplugins/sdk/npruntime.h index 5a8423390..06a8e1ee6 100644 --- a/nsplugins/sdk/npruntime.h +++ b/nsplugins/sdk/npruntime.h @@ -66,7 +66,7 @@ #define _NP_RUNTIME_H_ #include <tqglobal.h> -typedef Q_UINT32 uint32_t; +typedef TQ_UINT32 uint32_t; #ifdef __cplusplus extern "C" { @@ -306,7 +306,7 @@ typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, NPInvalidateFunctionPtr is called by the scripting environment when the native code is shutdown. Any attempt to message a - NPObject instance after the invalidate callback has been + NPObject instance after the tqinvalidate callback has been called will result in undefined behavior, even if the native code is still retaining those NPObject instances. (The runtime will typically return immediately, with 0 or NULL, from an attempt @@ -318,7 +318,7 @@ struct NPClass uint32_t structVersion; NPAllocateFunctionPtr allocate; NPDeallocateFunctionPtr deallocate; - NPInvalidateFunctionPtr invalidate; + NPInvalidateFunctionPtr tqinvalidate; NPHasMethodFunctionPtr hasMethod; NPInvokeFunctionPtr invoke; NPInvokeDefaultFunctionPtr invokeDefault; diff --git a/nsplugins/sdk/npupp.h b/nsplugins/sdk/npupp.h index dff545d9f..4ba50e5ae 100644 --- a/nsplugins/sdk/npupp.h +++ b/nsplugins/sdk/npupp.h @@ -1690,8 +1690,8 @@ typedef struct _NPNetscapeFuncs { NPN_PostURLNotifyUPP posturlnotify; NPN_GetValueUPP getvalue; NPN_SetValueUPP setvalue; - NPN_InvalidateRectUPP invalidaterect; - NPN_InvalidateRegionUPP invalidateregion; + NPN_InvalidateRectUPP tqinvalidaterect; + NPN_InvalidateRegionUPP tqinvalidateregion; NPN_ForceRedrawUPP forceredraw; NPN_GetStringIdentifierUPP getstringidentifier; NPN_GetStringIdentifiersUPP getstringidentifiers; diff --git a/nsplugins/viewer/NSPluginClassIface.h b/nsplugins/viewer/NSPluginClassIface.h index 7eb71f27d..c9051821d 100644 --- a/nsplugins/viewer/NSPluginClassIface.h +++ b/nsplugins/viewer/NSPluginClassIface.h @@ -47,10 +47,10 @@ class NSPluginClassIface : virtual public DCOPObject k_dcop: - virtual DCOPRef newInstance(TQString url, TQString mimeType, Q_INT8 embed, + virtual DCOPRef newInstance(TQString url, TQString mimeType, TQ_INT8 embed, TQStringList argn, TQStringList argv, - TQString appId, TQString callbackId, Q_INT8 reload, - Q_INT8 doPost, TQByteArray postData, Q_UINT32 xembed) = 0; + TQString appId, TQString callbackId, TQ_INT8 reload, + TQ_INT8 doPost, TQByteArray postData, TQ_UINT32 xembed) = 0; virtual TQString getMIMEDescription() = 0; }; @@ -66,11 +66,11 @@ k_dcop: virtual int winId() = 0; - virtual int setWindow(Q_INT8 remove=0) = 0; + virtual int setWindow(TQ_INT8 remove=0) = 0; - virtual void resizePlugin(Q_INT32 w, Q_INT32 h) = 0; + virtual void resizePlugin(TQ_INT32 w, TQ_INT32 h) = 0; - virtual void javascriptResult(Q_INT32 id, TQString result) = 0; + virtual void javascriptResult(TQ_INT32 id, TQString result) = 0; virtual void displayPlugin() = 0; diff --git a/nsplugins/viewer/kxt.cpp b/nsplugins/viewer/kxt.cpp index 9f5f43d51..dbc865fb5 100644 --- a/nsplugins/viewer/kxt.cpp +++ b/nsplugins/viewer/kxt.cpp @@ -255,7 +255,7 @@ static void np_event_proc( XEvent* e ) { Widget xtw = XtWindowToWidget( e->xany.display, e->xany.window ); - if ( xtw && qApp->loopLevel() > 0 ) { + if ( xtw && tqApp->loopLevel() > 0 ) { // Allow Xt to process the event qt_np_cascade_event_handler[e->type]( e ); } @@ -505,7 +505,7 @@ KXtWidget::~KXtWidget() if ( need_reroot ) { hide(); - XReparentWindow(qt_xdisplay(), winId(), qApp->desktop()->winId(), + XReparentWindow(qt_xdisplay(), winId(), tqApp->desktop()->winId(), x(), y()); } @@ -567,7 +567,7 @@ bool KXtWidget::isActiveWindow() const TQWidget *w = find( (WId)win ); if ( w ) { // We know that window - return w->topLevelWidget() == topLevelWidget(); + return w->tqtopLevelWidget() == tqtopLevelWidget(); } else { // Window still may be a parent (if top-level is foreign window) Window root, parent; diff --git a/nsplugins/viewer/nsplugin.cpp b/nsplugins/viewer/nsplugin.cpp index be313b52b..f91e3fd9f 100644 --- a/nsplugins/viewer/nsplugin.cpp +++ b/nsplugins/viewer/nsplugin.cpp @@ -138,7 +138,7 @@ void g_NPN_ForceRedraw(NPP /*instance*/) } -// invalidate rect +// tqinvalidate rect void g_NPN_InvalidateRect(NPP /*instance*/, NPRect* /*invalidRect*/) { // http://devedge.netscape.com/library/manuals/2002/plugin/1.0/npn_api7.html#999503 @@ -147,7 +147,7 @@ void g_NPN_InvalidateRect(NPP /*instance*/, NPRect* /*invalidRect*/) } -// invalidate region +// tqinvalidate region void g_NPN_InvalidateRegion(NPP /*instance*/, NPRegion /*invalidRegion*/) { // http://devedge.netscape.com/library/manuals/2002/plugin/1.0/npn_api8.html#999528 @@ -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( TQString::fromLatin1(url), TQString::null, - TQString::fromLatin1(target), 0 ); + inst->requestURL( TQString::tqfromLatin1(url), TQString::null, + TQString::tqfromLatin1(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( TQString::fromLatin1(url), TQString::null, - TQString::fromLatin1(target), notifyData, true ); + inst->requestURL( TQString::tqfromLatin1(url), TQString::null, + TQString::tqfromLatin1(target), notifyData, true ); } return NPERR_NO_ERROR; @@ -318,7 +318,7 @@ NPError g_NPN_PostURLNotify(NPP instance, const char* url, const char* target, break; } - TQString thisLine = TQString::fromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace(); + TQString thisLine = TQString::tqfromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace(); previousStart = &buf[l]; previousCR = true; @@ -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(TQString::fromLatin1(url)).isNull()) { - inst->postURL( TQString::fromLatin1(url), postdata, args.contentType(), - TQString::fromLatin1(target), notifyData, args, true ); + if (inst && !inst->normalizedURL(TQString::tqfromLatin1(url)).isNull()) { + inst->postURL( TQString::tqfromLatin1(url), postdata, args.contentType(), + TQString::tqfromLatin1(target), notifyData, args, true ); } else { // Unsupported / insecure return NPERR_INVALID_URL; @@ -415,7 +415,7 @@ NPError g_NPN_PostURL(NPP instance, const char* url, const char* target, break; } - TQString thisLine = TQString::fromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace(); + TQString thisLine = TQString::tqfromLatin1(previousStart, &buf[l-1] - previousStart).stripWhiteSpace(); previousStart = &buf[l]; previousCR = true; @@ -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(TQString::fromLatin1(url)).isNull()) { - inst->postURL( TQString::fromLatin1(url), postdata, args.contentType(), - TQString::fromLatin1(target), 0L, args, false ); + if (inst && !inst->normalizedURL(TQString::tqfromLatin1(url)).isNull()) { + inst->postURL( TQString::tqfromLatin1(url), postdata, args.contentType(), + TQString::tqfromLatin1(target), 0L, args, false ); } else { // Unsupported / insecure return NPERR_INVALID_URL; @@ -820,7 +820,7 @@ void NSPluginInstance::timer() s->post( url, req.data, req.mime, req.notify, req.args ); } else if (url.lower().startsWith("javascript:")){ if (_callback) { - static Q_INT32 _jsrequestid = 0; + static TQ_INT32 _jsrequestid = 0; _jsrequests.insert(_jsrequestid, new Request(req)); _callback->evalJavaScript(_jsrequestid++, url.mid(11)); } else { @@ -916,7 +916,7 @@ void NSPluginInstance::streamFinished( NSPluginStreamBase* strm ) _timer->start( 100, true ); } -int NSPluginInstance::setWindow(Q_INT8 remove) +int NSPluginInstance::setWindow(TQ_INT8 remove) { if (remove) { @@ -980,7 +980,7 @@ static void resizeWidgets(Window w, int width, int height) { } -void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h) +void NSPluginInstance::resizePlugin(TQ_INT32 w, TQ_INT32 h) { if (w == _width && h == _height) return; @@ -1021,8 +1021,8 @@ void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h) } -void NSPluginInstance::javascriptResult(Q_INT32 id, TQString result) { - TQMap<int, Request*>::iterator i = _jsrequests.find( id ); +void NSPluginInstance::javascriptResult(TQ_INT32 id, TQString result) { + TQMap<int, Request*>::iterator i = _jsrequests.tqfind( id ); if (i != _jsrequests.end()) { Request *req = i.data(); _jsrequests.remove( i ); @@ -1295,7 +1295,7 @@ void NSPluginViewer::shutdown() #if QT_VERSION < 0x030100 quitXt(); #else - qApp->quit(); + tqApp->quit(); #endif } @@ -1434,8 +1434,8 @@ int NSPluginClass::initialize() _nsFuncs.posturlnotify = g_NPN_PostURLNotify; _nsFuncs.getvalue = g_NPN_GetValue; _nsFuncs.setvalue = g_NPN_SetValue; - _nsFuncs.invalidaterect = g_NPN_InvalidateRect; - _nsFuncs.invalidateregion = g_NPN_InvalidateRegion; + _nsFuncs.tqinvalidaterect = g_NPN_InvalidateRect; + _nsFuncs.tqinvalidateregion = g_NPN_InvalidateRegion; _nsFuncs.forceredraw = g_NPN_ForceRedraw; // initialize plugin @@ -1458,10 +1458,10 @@ void NSPluginClass::shutdown() } -DCOPRef NSPluginClass::newInstance( TQString url, TQString mimeType, Q_INT8 embed, +DCOPRef NSPluginClass::newInstance( TQString url, TQString mimeType, TQ_INT8 embed, TQStringList argn, TQStringList argv, TQString appId, TQString callbackId, - Q_INT8 reload, Q_INT8 doPost, TQByteArray postData, Q_UINT32 xembed ) + TQ_INT8 reload, TQ_INT8 doPost, TQByteArray postData, TQ_UINT32 xembed ) { kdDebug(1431) << "-> NSPluginClass::NewInstance" << endl; @@ -1670,7 +1670,7 @@ void NSPluginStreamBase::updateURL( const KURL& newURL ) int NSPluginStreamBase::process( const TQByteArray &data, int start ) { int32 max, sent, to_sent, len; - char *d = data.data() + start; + char *d = const_cast<TQByteArray&>(data).data() + start; to_sent = data.size() - start; while (to_sent > 0) diff --git a/nsplugins/viewer/nsplugin.h b/nsplugins/viewer/nsplugin.h index da92edd76..e968eb684 100644 --- a/nsplugins/viewer/nsplugin.h +++ b/nsplugins/viewer/nsplugin.h @@ -63,7 +63,7 @@ class KLibrary; class TQTimer; -class NSPluginStreamBase : public QObject +class NSPluginStreamBase : public TQObject { Q_OBJECT friend class NSPluginInstance; @@ -172,9 +172,9 @@ public: // DCOP functions void shutdown(); 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, TQString result); + int setWindow(TQ_INT8 remove=0); + void resizePlugin(TQ_INT32 w, TQ_INT32 h); + void javascriptResult(TQ_INT32 id, TQString result); void displayPlugin(); void gotFocusIn(); void gotFocusOut(); @@ -281,10 +281,10 @@ public: ~NSPluginClass(); TQString getMIMEDescription(); - DCOPRef newInstance(TQString url, TQString mimeType, Q_INT8 embed, + DCOPRef newInstance(TQString url, TQString mimeType, TQ_INT8 embed, TQStringList argn, TQStringList argv, - TQString appId, TQString callbackId, Q_INT8 reload, Q_INT8 post, - TQByteArray postData, Q_UINT32 xembed ); + TQString appId, TQString callbackId, TQ_INT8 reload, TQ_INT8 post, + TQByteArray postData, TQ_UINT32 xembed ); void destroyInstance( NSPluginInstance* inst ); bool error() { return _error; } diff --git a/nsplugins/viewer/qxteventloop.cpp b/nsplugins/viewer/qxteventloop.cpp index b34c1e03c..327eaa77e 100644 --- a/nsplugins/viewer/qxteventloop.cpp +++ b/nsplugins/viewer/qxteventloop.cpp @@ -154,12 +154,12 @@ Boolean qmotif_event_dispatcher( XEvent *event ) TQApplication::sendPostedEvents(); TQWidgetIntDict *mapper = &static_d->mapper; - TQWidget* qMotif = mapper->find( event->xany.window ); + TQWidget* qMotif = mapper->tqfind( event->xany.window ); if ( !qMotif && TQWidget::find( event->xany.window) == 0 ) { // event is not for Qt, try Xt Display* dpy = TQPaintDevice::x11AppDisplay(); Widget w = XtWindowToWidget( dpy, event->xany.window ); - while ( w && ! ( qMotif = mapper->find( XtWindow( w ) ) ) ) { + while ( w && ! ( qMotif = mapper->tqfind( XtWindow( w ) ) ) ) { if ( XtIsShell( w ) ) { break; } @@ -174,7 +174,7 @@ Boolean qmotif_event_dispatcher( XEvent *event ) } last_xevent = event; - bool delivered = ( qApp->x11ProcessEvent( event ) != -1 ); + bool delivered = ( tqApp->x11ProcessEvent( event ) != -1 ); last_xevent = 0; if ( qMotif ) { switch ( event->type ) { @@ -309,15 +309,15 @@ XtAppContext QXtEventLoop::applicationContext() const void QXtEventLoop::appStartingUp() { - int argc = qApp->argc(); + int argc = tqApp->argc(); XtDisplayInitialize( d->appContext, TQPaintDevice::x11AppDisplay(), - qApp->name(), + tqApp->name(), d->applicationClass, d->options, d->numOptions, &argc, - qApp->argv() ); + tqApp->argv() ); d->hookMeUp(); } @@ -352,7 +352,7 @@ void QXtEventLoop::unregisterWidget( TQWidget* w ) void qmotif_socknot_handler( XtPointer pointer, int *, XtInputId *id ) { QXtEventLoop *eventloop = (QXtEventLoop *) pointer; - TQSocketNotifier *socknot = static_d->socknotDict.find( *id ); + TQSocketNotifier *socknot = static_d->socknotDict.tqfind( *id ); if ( ! socknot ) // this shouldn't happen return; eventloop->setSocketNotifierPending( socknot ); @@ -420,7 +420,7 @@ void qmotif_timeout_handler( XtPointer, XtIntervalId * ) */ bool QXtEventLoop::processEvents( ProcessEventsFlags flags ) { - // Qt uses posted events to do lots of delayed operations, like repaints... these + // Qt uses posted events to do lots of delayed operations, like tqrepaints... these // need to be delivered before we go to sleep TQApplication::sendPostedEvents(); diff --git a/nsplugins/viewer/qxteventloop.h b/nsplugins/viewer/qxteventloop.h index 02ed69541..31351f201 100644 --- a/nsplugins/viewer/qxteventloop.h +++ b/nsplugins/viewer/qxteventloop.h @@ -38,7 +38,7 @@ #include <tqglobal.h> -#if QT_VERSION >= 0x030100 +// #if QT_VERSION >= 0x030100 #include <tqeventloop.h> @@ -47,9 +47,10 @@ class QXtEventLoopPrivate; -class QXtEventLoop : public QEventLoop +class QXtEventLoop : public TQEventLoop { Q_OBJECT + TQ_OBJECT public: QXtEventLoop( const char *applicationClass, XtAppContext context = NULL, XrmOptionDescRec *options = 0, int numOptions = 0); @@ -75,6 +76,6 @@ private: }; -#endif +// #endif #endif // QMOTIF_H diff --git a/nsplugins/viewer/viewer.cpp b/nsplugins/viewer/viewer.cpp index ba14b0990..e15b52eb0 100644 --- a/nsplugins/viewer/viewer.cpp +++ b/nsplugins/viewer/viewer.cpp @@ -286,7 +286,7 @@ int main(int argc, char** argv) } kdDebug(1430) << "6 - dcop->registerAs" << endl; - if (g_dcopId) + if (g_dcopId != 0) g_dcopId = dcop->registerAs( g_dcopId, false ); else g_dcopId = dcop->registerAs("nspluginviewer"); diff --git a/nsplugins/wrapper/wrapper.c b/nsplugins/wrapper/wrapper.c index 965868426..acd07ea91 100644 --- a/nsplugins/wrapper/wrapper.c +++ b/nsplugins/wrapper/wrapper.c @@ -544,7 +544,7 @@ static void MyNPN_InvalidateRect(NPP instance, NPRect *invalidRect) { DEB(ef, "-> NPN_InvalidateRect( %x, 0x%x )\n", instance, invalidRect); - gNetscapeFuncs.invalidaterect( instance, invalidRect ); + gNetscapeFuncs.tqinvalidaterect( instance, invalidRect ); DEB(ef, "<- NPN_InvalidateRect\n"); } @@ -552,7 +552,7 @@ static void MyNPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) { DEB(ef, "-> NPN_InvalidateRegion( %x, 0x%x )\n", instance, invalidRegion); - gNetscapeFuncs.invalidateregion( instance, invalidRegion ); + gNetscapeFuncs.tqinvalidateregion( instance, invalidRegion ); DEB(ef, "<- NPN_InvalidateRegion\n"); } @@ -605,8 +605,8 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) DEB(ef, "nsTable->posturlnotify = 0x%x\n", nsTable->posturlnotify); DEB(ef, "nsTable->getvalue = 0x%x\n", nsTable->getvalue); DEB(ef, "nsTable->setvalue = 0x%x\n", nsTable->setvalue); - DEB(ef, "nsTable->invalidaterect = 0x%x\n", nsTable->invalidaterect); - DEB(ef, "nsTable->invalidateregion = 0x%x\n", nsTable->invalidateregion); + DEB(ef, "nsTable->tqinvalidaterect = 0x%x\n", nsTable->tqinvalidaterect); + DEB(ef, "nsTable->tqinvalidateregion = 0x%x\n", nsTable->tqinvalidateregion); DEB(ef, "nsTable->forceredraw = 0x%x\n", nsTable->forceredraw); DEB(ef, "pluginFuncs->size = %d\n", pluginFuncs->size); @@ -659,8 +659,8 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) gExtNetscapeFuncs.posturlnotify = MyNPN_PostURLNotify; gExtNetscapeFuncs.getvalue = MyNPN_GetValue; gExtNetscapeFuncs.setvalue = MyNPN_SetValue; - gExtNetscapeFuncs.invalidaterect = MyNPN_InvalidateRect; - gExtNetscapeFuncs.invalidateregion = MyNPN_InvalidateRegion; + gExtNetscapeFuncs.tqinvalidaterect = MyNPN_InvalidateRect; + gExtNetscapeFuncs.tqinvalidateregion = MyNPN_InvalidateRegion; gExtNetscapeFuncs.forceredraw = MyNPN_ForceRedraw; gPluginFuncs.size = sizeof( gPluginFuncs ); @@ -709,8 +709,8 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) DEB(ef, "nsTable->posturlnotify = 0x%x\n", gExtNetscapeFuncs.posturlnotify); DEB(ef, "nsTable->getvalue = 0x%x\n", gExtNetscapeFuncs.getvalue); DEB(ef, "nsTable->setvalue = 0x%x\n", gExtNetscapeFuncs.setvalue); - DEB(ef, "nsTable->invalidaterect = 0x%x\n", gExtNetscapeFuncs.invalidaterect); - DEB(ef, "nsTable->invalidateregion = 0x%x\n", gExtNetscapeFuncs.invalidateregion); + DEB(ef, "nsTable->tqinvalidaterect = 0x%x\n", gExtNetscapeFuncs.tqinvalidaterect); + DEB(ef, "nsTable->tqinvalidateregion = 0x%x\n", gExtNetscapeFuncs.tqinvalidateregion); DEB(ef, "nsTable->forceredraw = 0x%x\n", gExtNetscapeFuncs.forceredraw); DEB(ef, "pluginFuncs->size = %d\n", pluginFuncs->size); |