summaryrefslogtreecommitdiffstats
path: root/ksvg/ecma
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad /ksvg/ecma
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz
tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/ecma')
-rw-r--r--ksvg/ecma/ksvg_ecma.cpp28
-rw-r--r--ksvg/ecma/ksvg_ecma.h12
-rw-r--r--ksvg/ecma/ksvg_ecmaeventlistener.cpp8
-rw-r--r--ksvg/ecma/ksvg_ecmaeventlistener.h6
-rw-r--r--ksvg/ecma/ksvg_helper.cpp14
-rw-r--r--ksvg/ecma/ksvg_scriptinterpreter.h4
-rw-r--r--ksvg/ecma/ksvg_window.cpp30
-rw-r--r--ksvg/ecma/ksvg_window.h16
8 files changed, 59 insertions, 59 deletions
diff --git a/ksvg/ecma/ksvg_ecma.cpp b/ksvg/ecma/ksvg_ecma.cpp
index a2aed6ce..a42d69ad 100644
--- a/ksvg/ecma/ksvg_ecma.cpp
+++ b/ksvg/ecma/ksvg_ecma.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include <dom/dom2_events.h>
@@ -71,7 +71,7 @@ KSVGEcma::KSVGEcma(SVGDocumentImpl *doc) : m_doc(doc)
KSVGEcma::~KSVGEcma()
{
// We are 0 soon so event listeners may NOT call us
- QPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
+ TQPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
for(; it.current(); ++it)
it.current()->forbidRemove();
@@ -129,7 +129,7 @@ ExecState *KSVGEcma::globalExec()
SVGEventListener *KSVGEcma::createEventListener(DOM::DOMString type)
{
- QPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
+ TQPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
for(; it.current(); ++it)
{
@@ -159,11 +159,11 @@ SVGEventListener *KSVGEcma::createEventListener(DOM::DOMString type)
return event;
}
-QString KSVGEcma::valueOfEventListener(SVGEventListener *listener) const
+TQString KSVGEcma::valueOfEventListener(SVGEventListener *listener) const
{
KSVGEcmaEventListener *event = static_cast<KSVGEcmaEventListener *>(listener);
if(!event)
- return QString::null;
+ return TQString::null;
return event->type();
}
@@ -197,7 +197,7 @@ Value KSVGEcma::getUrl(ExecState *exec, ::KURL url)
Object *status = new Object(new AsyncStatus());
// FIXME: Security issue, allows local testing of getURL(), REMOVE BEFORE RELEASE! (Niko)
- QString svgDocument = KSVGLoader::getUrl(url, true);
+ TQString svgDocument = KSVGLoader::getUrl(url, true);
if(svgDocument.length() > 0)
{
status->put(exec, Identifier("success"), Boolean(true));
@@ -212,14 +212,14 @@ Value KSVGEcma::getUrl(ExecState *exec, ::KURL url)
return Value(*status);
}
-void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const QString &data, const QString &mimeType, const QString &contentEncoding, Object &callBackFunction)
+void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const TQString &data, const TQString &mimeType, const TQString &contentEncoding, Object &callBackFunction)
{
Object *status = new Object(new AsyncStatus());
status->put(exec, Identifier("content"), String(""));
status->put(exec, Identifier("success"), Boolean(false));
- QByteArray byteArray;
- QDataStream ds(byteArray, IO_WriteOnly);
+ TQByteArray byteArray;
+ TQDataStream ds(byteArray, IO_WriteOnly);
ds << data;
// Support gzip compression
@@ -310,20 +310,20 @@ DOM::Node KSVG::toNode(const Value &val)
return DOM::Node();
}
-QVariant KSVG::valueToVariant(ExecState *exec, const Value &val)
+TQVariant KSVG::valueToVariant(ExecState *exec, const Value &val)
{
- QVariant res;
+ TQVariant res;
switch(val.type())
{
case BooleanType:
- res = QVariant(val.toBoolean(exec), 0);
+ res = TQVariant(val.toBoolean(exec), 0);
break;
case NumberType:
- res = QVariant(val.toNumber(exec));
+ res = TQVariant(val.toNumber(exec));
break;
case StringType:
- res = QVariant(val.toString(exec).qstring());
+ res = TQVariant(val.toString(exec).qstring());
break;
default:
// everything else will be 'invalid'
diff --git a/ksvg/ecma/ksvg_ecma.h b/ksvg/ecma/ksvg_ecma.h
index 7c236454..ab58f67a 100644
--- a/ksvg/ecma/ksvg_ecma.h
+++ b/ksvg/ecma/ksvg_ecma.h
@@ -21,7 +21,7 @@
#ifndef KSVGEcma_H
#define KSVGEcma_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "ksvg_bridge.h"
@@ -49,7 +49,7 @@ namespace KSVG
class SVGDOMNodeBridge;
}
-class QVariant;
+class TQVariant;
class KSVGEcmaEventListener;
class KSVGScriptInterpreter;
@@ -63,7 +63,7 @@ namespace KSVG
KJS::Value getDOMEvent(KJS::ExecState *, KSVG::SVGEventImpl *);
KJS::Value getString(DOM::DOMString);
- QVariant valueToVariant(KJS::ExecState *, const KJS::Value &);
+ TQVariant valueToVariant(KJS::ExecState *, const KJS::Value &);
DOM::Node toNode(const KJS::Value &);
@@ -88,7 +88,7 @@ public:
KSVGScriptInterpreter *interpreter() { return m_interpreter; }
KSVG::SVGEventListener *createEventListener(DOM::DOMString type);
- QString valueOfEventListener(KSVG::SVGEventListener *listener) const;
+ TQString valueOfEventListener(KSVG::SVGEventListener *listener) const;
void addEventListener(KSVGEcmaEventListener *listener);
void removeEventListener(KSVGEcmaEventListener *listener);
bool hasEventListeners();
@@ -96,7 +96,7 @@ public:
void finishedWithEvent(KSVG::SVGEventImpl *event);
KJS::Value getUrl(KJS::ExecState *exec, ::KURL url);
- void postUrl(KJS::ExecState *exec, ::KURL url, const QString &data, const QString &mimeType, const QString &contentEncoding, KJS::Object &callBackFunction);
+ void postUrl(KJS::ExecState *exec, ::KURL url, const TQString &data, const TQString &mimeType, const TQString &contentEncoding, KJS::Object &callBackFunction);
private:
bool m_init, m_hasListeners;
@@ -105,7 +105,7 @@ private:
KSVG::Window *m_window;
KSVGScriptInterpreter *m_interpreter;
- QPtrList<KSVGEcmaEventListener> m_ecmaEventListeners;
+ TQPtrList<KSVGEcmaEventListener> m_ecmaEventListeners;
};
diff --git a/ksvg/ecma/ksvg_ecmaeventlistener.cpp b/ksvg/ecma/ksvg_ecmaeventlistener.cpp
index 4b59f924..2dd81131 100644
--- a/ksvg/ecma/ksvg_ecmaeventlistener.cpp
+++ b/ksvg/ecma/ksvg_ecmaeventlistener.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "SVGDocumentImpl.h"
#include "SVGSVGElementImpl.h"
@@ -32,7 +32,7 @@
using namespace KSVG;
using namespace KJS;
-KSVGEcmaEventListener::KSVGEcmaEventListener(KJS::Object _listener, QString _type, KSVGEcma *_ecma) : SVGEventListener()
+KSVGEcmaEventListener::KSVGEcmaEventListener(KJS::Object _listener, TQString _type, KSVGEcma *_ecma) : SVGEventListener()
{
m_listener = _listener;
m_remove = true;
@@ -84,8 +84,8 @@ void KSVGEcmaEventListener::handleEvent(SVGEventImpl *evt)
}
else
{
- QVariant ret = valueToVariant(exec, retval);
- if(ret.type() == QVariant::Bool && ret.toBool() == false)
+ TQVariant ret = valueToVariant(exec, retval);
+ if(ret.type() == TQVariant::Bool && ret.toBool() == false)
evt->preventDefault();
}
}
diff --git a/ksvg/ecma/ksvg_ecmaeventlistener.h b/ksvg/ecma/ksvg_ecmaeventlistener.h
index 16ebe3bc..ee80c212 100644
--- a/ksvg/ecma/ksvg_ecmaeventlistener.h
+++ b/ksvg/ecma/ksvg_ecmaeventlistener.h
@@ -31,19 +31,19 @@ namespace KJS
class KSVGEcmaEventListener : public KSVG::SVGEventListener
{
public:
- KSVGEcmaEventListener(KJS::Object _listener, QString _type, KSVGEcma *_ecma);
+ KSVGEcmaEventListener(KJS::Object _listener, TQString _type, KSVGEcma *_ecma);
virtual ~KSVGEcmaEventListener();
virtual void handleEvent(KSVG::SVGEventImpl *evt);
virtual DOM::DOMString eventListenerType();
- QString type() { return m_type; }
+ TQString type() { return m_type; }
void forbidRemove();
private:
KSVGEcma *m_ecma;
- QString m_type;
+ TQString m_type;
bool m_remove;
KJS::Object m_listener;
diff --git a/ksvg/ecma/ksvg_helper.cpp b/ksvg/ecma/ksvg_helper.cpp
index 597f9a06..24f05101 100644
--- a/ksvg/ecma/ksvg_helper.cpp
+++ b/ksvg/ecma/ksvg_helper.cpp
@@ -37,7 +37,7 @@ KJS::UString::UString(const DOM::DOMString &d)
rep = KJS::UString::Rep::create(dat, len);
}
-KJS::UString::UString(const QString &d)
+KJS::UString::UString(const TQString &d)
{
unsigned int len = d.length();
KJS::UChar *dat = new UChar[len];
@@ -45,24 +45,24 @@ KJS::UString::UString(const QString &d)
rep = KJS::UString::Rep::create(dat, len);
}
-QString KJS::UString::qstring() const
+TQString KJS::UString::qstring() const
{
- return QString(reinterpret_cast<QChar *>(const_cast<KJS::UChar *>(data())), size());
+ return TQString(reinterpret_cast<TQChar *>(const_cast<KJS::UChar *>(data())), size());
}
DOM::DOMString KJS::UString::string() const
{
- return DOM::DOMString(reinterpret_cast<QChar *>(const_cast<KJS::UChar *>(data())), size());
+ return DOM::DOMString(reinterpret_cast<TQChar *>(const_cast<KJS::UChar *>(data())), size());
}
DOM::DOMString KJS::Identifier::string() const
{
- return DOM::DOMString((QChar*) data(), size());
+ return DOM::DOMString((TQChar*) data(), size());
}
-QString KJS::Identifier::qstring() const
+TQString KJS::Identifier::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_scriptinterpreter.h b/ksvg/ecma/ksvg_scriptinterpreter.h
index ed7c6af8..e3f7cc42 100644
--- a/ksvg/ecma/ksvg_scriptinterpreter.h
+++ b/ksvg/ecma/ksvg_scriptinterpreter.h
@@ -21,7 +21,7 @@
#ifndef KSVGScriptInterpreter_H
#define KSVGScriptInterpreter_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
namespace KJS
{
@@ -63,7 +63,7 @@ private:
bool m_attributeGetMode, m_attributeSetMode;
- QPtrDict<KJS::ObjectImp> m_domObjects;
+ TQPtrDict<KJS::ObjectImp> m_domObjects;
};
#endif
diff --git a/ksvg/ecma/ksvg_window.cpp b/ksvg/ecma/ksvg_window.cpp
index d4c04de3..80a4ee14 100644
--- a/ksvg/ecma/ksvg_window.cpp
+++ b/ksvg/ecma/ksvg_window.cpp
@@ -42,7 +42,7 @@
#include <kparts/part.h>
#include <assert.h>
#include <kdebug.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kinputdialog.h>
@@ -303,7 +303,7 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
Window *window = static_cast<Window *>(thisObj.imp());
Value v = args[0];
UString s = v.toString(exec);
- QString str = s.qstring();
+ TQString str = s.qstring();
switch(id)
{
@@ -342,9 +342,9 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
case KSVG::Window::_PostURL:
{
KURL url((const_cast<Window *>(window))->doc()->baseUrl(), args[0].toString(exec).qstring());
- QString data = args[1].toString(exec).qstring();
- QString mimeType = args[3].toString(exec).qstring();
- QString contentEncoding = args[4].toString(exec).qstring();
+ TQString data = args[1].toString(exec).qstring();
+ TQString mimeType = args[3].toString(exec).qstring();
+ TQString contentEncoding = args[4].toString(exec).qstring();
Object callBackFunction = Object::dynamicCast(args[2]);
(const_cast<Window *>(window))->doc()->ecmaEngine()->postUrl(exec, url, data, mimeType, contentEncoding, callBackFunction);
@@ -364,7 +364,7 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
SVGDocumentImpl *curDoc = (const_cast<Window *>(window))->doc();
doc->addToDocumentDict(curDoc->handle(), curDoc);
- QXmlInputSource *svgFragment = new QXmlInputSource();
+ TQXmlInputSource *svgFragment = new TQXmlInputSource();
svgFragment->setData(args[0].toString(exec).qstring());
doc->parseSVG(svgFragment, true);
@@ -384,15 +384,15 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
// mop: from khtml. do we need that?
// part->xmlDocImpl()->updateRendering();
bool ok;
- QString str2;
+ TQString str2;
if (args.size() >= 2)
str2 = KInputDialog::getText(i18n("Prompt"),
- QStyleSheet::convertFromPlainText(str),
+ TQStyleSheet::convertFromPlainText(str),
args[1].toString(exec).qstring(), &ok);
else
str2 = KInputDialog::getText(i18n("Prompt"),
- QStyleSheet::convertFromPlainText(str),
- QString::null, &ok);
+ TQStyleSheet::convertFromPlainText(str),
+ TQString::null, &ok);
if ( ok )
return String(str2);
else
@@ -455,7 +455,7 @@ ScheduledAction::ScheduledAction(Object _func, List _args, bool _singleShot)
singleShot = _singleShot;
}
-ScheduledAction::ScheduledAction(QString _code, bool _singleShot)
+ScheduledAction::ScheduledAction(TQString _code, bool _singleShot)
{
code = _code;
isFunction = false;
@@ -503,7 +503,7 @@ void WindowQObject::parentDestroyed()
{
killTimers();
- QMapIterator<int, ScheduledAction *> it;
+ TQMapIterator<int, ScheduledAction *> it;
for(it = scheduledActions.begin(); it != scheduledActions.end(); ++it)
{
ScheduledAction *action = *it;
@@ -535,7 +535,7 @@ void WindowQObject::clearTimeout(int timerId, bool delAction)
if(delAction)
{
- QMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId);
+ TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId);
if(it != scheduledActions.end())
{
ScheduledAction *action = *it;
@@ -545,9 +545,9 @@ void WindowQObject::clearTimeout(int timerId, bool delAction)
}
}
-void WindowQObject::timerEvent(QTimerEvent *e)
+void WindowQObject::timerEvent(TQTimerEvent *e)
{
- QMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId());
+ TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId());
if(it != scheduledActions.end())
{
ScheduledAction *action = *it;
diff --git a/ksvg/ecma/ksvg_window.h b/ksvg/ecma/ksvg_window.h
index 28c9699e..db6ac9a3 100644
--- a/ksvg/ecma/ksvg_window.h
+++ b/ksvg/ecma/ksvg_window.h
@@ -20,7 +20,7 @@
#define KSVG_WINDOW_H
#include <kjs/object.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
namespace KSVG {
@@ -58,7 +58,7 @@ public:
*/
static Window *retrieveActive(KJS::ExecState *exec);
- QGuardedPtr<KSVG::SVGDocumentImpl> doc() const { return m_doc; }
+ TQGuardedPtr<KSVG::SVGDocumentImpl> doc() const { return m_doc; }
int installTimeout(const KJS::UString &handler, int t, bool singleShot);
void clearTimeout(int timerId);
@@ -82,23 +82,23 @@ public:
private:
WindowQObject *winq;
- QGuardedPtr<KSVG::SVGDocumentImpl> m_doc;
+ TQGuardedPtr<KSVG::SVGDocumentImpl> m_doc;
};
class ScheduledAction {
public:
ScheduledAction(KJS::Object _func, KJS::List _args, bool _singleShot);
- ScheduledAction(QString _code, bool _singleShot);
+ ScheduledAction(TQString _code, bool _singleShot);
~ScheduledAction();
void execute(Window *window);
KJS::Object func;
KJS::List args;
- QString code;
+ TQString code;
bool isFunction;
bool singleShot;
};
-class WindowQObject : public QObject {
+class WindowQObject : public TQObject {
Q_OBJECT
public:
WindowQObject(Window *w);
@@ -111,11 +111,11 @@ public slots:
protected slots:
void parentDestroyed();
protected:
- void timerEvent(QTimerEvent *e);
+ void timerEvent(TQTimerEvent *e);
private:
Window *parent;
//KHTMLPart *part; // not guarded, may be dangling
- QMap<int, ScheduledAction*> scheduledActions;
+ TQMap<int, ScheduledAction*> scheduledActions;
};
}