summaryrefslogtreecommitdiffstats
path: root/khtml/misc
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/misc')
-rw-r--r--khtml/misc/decoder.cpp66
-rw-r--r--khtml/misc/decoder.h34
-rw-r--r--khtml/misc/guess_ja.cpp2
-rw-r--r--khtml/misc/helper.cpp18
-rw-r--r--khtml/misc/helper.h14
-rw-r--r--khtml/misc/knsplugininstaller.cpp158
-rw-r--r--khtml/misc/knsplugininstaller.h68
-rw-r--r--khtml/misc/loader.cpp276
-rw-r--r--khtml/misc/loader.h138
-rw-r--r--khtml/misc/loader_client.h6
-rw-r--r--khtml/misc/loader_jpeg.cpp22
-rw-r--r--khtml/misc/loader_jpeg.h4
-rw-r--r--khtml/misc/multimap.h10
-rw-r--r--khtml/misc/stringit.cpp20
-rw-r--r--khtml/misc/stringit.h54
15 files changed, 445 insertions, 445 deletions
diff --git a/khtml/misc/decoder.cpp b/khtml/misc/decoder.cpp
index 56f68b429..f227f4014 100644
--- a/khtml/misc/decoder.cpp
+++ b/khtml/misc/decoder.cpp
@@ -36,8 +36,8 @@ using namespace khtml;
#include "htmlhashes.h"
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -51,7 +51,7 @@ using namespace khtml;
Decoder::Decoder()
{
// latin1
- m_codec = QTextCodec::codecForMib(4);
+ m_codec = TQTextCodec::codecForMib(4);
m_decoder = m_codec->makeDecoder();
enc = 0;
m_type = DefaultEncoding;
@@ -86,9 +86,9 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
return;
#ifdef APPLE_CHANGES
- QTextCodec *codec = (type == EncodingFromMetaTag || type == EncodingFromXMLHeader)
- ? QTextCodec::codecForNameEightBitOnly(enc)
- : QTextCodec::codecForName(enc);
+ TQTextCodec *codec = (type == EncodingFromMetaTag || type == EncodingFromXMLHeader)
+ ? TQTextCodec::codecForNameEightBitOnly(enc)
+ : TQTextCodec::codecForName(enc);
if (codec) {
enc = codec->name();
visualRTL = codec->usesVisualOrdering();
@@ -97,7 +97,7 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
if(enc == "visual") // hebrew visually ordered
enc = "iso8859-8";
bool b;
- QTextCodec *codec = KGlobal::charsets()->codecForName(enc, b);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(enc, b);
if (!b)
codec = 0;
@@ -110,8 +110,8 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
}
if (codec && codec->mibEnum() == 11) {
- //We do NOT want to use Qt's QHebrewCodec, since it tries to reorder itself.
- codec = QTextCodec::codecForName("iso8859-8-i");
+ //We do NOT want to use Qt's TQHebrewCodec, since it tries to reorder itself.
+ codec = TQTextCodec::codecForName("iso8859-8-i");
// visually ordered unless one of the following
if( !(enc == "iso-8859-8-i" || enc == "iso_8859-8-i"
@@ -166,7 +166,7 @@ static void skipComment(const char *&ptr, const char *pEnd)
}
// Returns the position of the encoding string.
-static int findXMLEncoding(const QCString &str, int &encodingLength)
+static int findXMLEncoding(const TQCString &str, int &encodingLength)
{
int len = str.length();
@@ -214,7 +214,7 @@ static int findXMLEncoding(const QCString &str, int &encodingLength)
return pos;
}
-QString Decoder::decode(const char *data, int len)
+TQString Decoder::decode(const char *data, int len)
{
// Check for UTF-16 or UTF-8 BOM mark at the beginning, which is a sure sign of a Unicode encoding.
int bufferLength = buffer.length();
@@ -257,7 +257,7 @@ QString Decoder::decode(const char *data, int len)
// If we found a BOM, use the encoding it implies.
if (autoDetectedEncoding != 0) {
m_type = AutoDetectedEncoding;
- m_codec = QTextCodec::codecForName(autoDetectedEncoding);
+ m_codec = TQTextCodec::codecForName(autoDetectedEncoding);
assert(m_codec);
enc = m_codec->name();
delete m_decoder;
@@ -295,7 +295,7 @@ QString Decoder::decode(const char *data, int len)
i--;
}
}
- buffer += QCString(data, len+1);
+ buffer += TQCString(data, len+1);
#endif
// we still don't have an encoding, and are in the head
// the following tags are allowed in <head>:
@@ -327,7 +327,7 @@ QString Decoder::decode(const char *data, int len)
while (*end != '>' && *end != '\0') end++;
if (*end == '\0')
break;
- QCString str(ptr, end - ptr + 1); //+1 as it must include the \0 terminator
+ TQCString str(ptr, end - ptr + 1); //+1 as it must include the \0 terminator
int len;
int pos = findXMLEncoding(str, len);
if (pos != -1) {
@@ -362,7 +362,7 @@ QString Decoder::decode(const char *data, int len)
const char * end = ptr;
while(*end != '>' && *end != '\0') end++;
if ( *end == '\0' ) break;
- QCString str( ptr, (end-ptr)+1);
+ TQCString str( ptr, (end-ptr)+1);
str = str.lower();
int pos = 0;
//if( (pos = str.find("http-equiv", pos)) == -1) break;
@@ -442,7 +442,7 @@ QString Decoder::decode(const char *data, int len)
body = true;
goto found;
}
- return QString::null;
+ return TQString::null;
}
}
@@ -505,16 +505,16 @@ QString Decoder::decode(const char *data, int len)
if (!m_codec)
{
if(enc.isEmpty()) enc = "iso8859-1";
- m_codec = QTextCodec::codecForName(enc);
+ m_codec = TQTextCodec::codecForName(enc);
// be sure not to crash
if(!m_codec) {
- m_codec = QTextCodec::codecForMib(4);
+ m_codec = TQTextCodec::codecForMib(4);
enc = "iso8859-1";
}
delete m_decoder;
m_decoder = m_codec->makeDecoder();
}
- QString out;
+ TQString out;
if(!buffer.isEmpty() && enc != "ISO-10646-UCS-2") {
out = m_decoder->toUnicode(buffer, buffer.length());
@@ -522,7 +522,7 @@ QString Decoder::decode(const char *data, int len)
} else {
if(m_codec->mibEnum() != 1000) // utf16
{
- // ### hack for a bug in QTextCodec. It cut's the input stream
+ // ### hack for a bug in TQTextCodec. It cut's the input stream
// in case there are \0 in it. ZDNET has them inside... :-(
char *d = const_cast<char *>(data);
int i = len - 1;
@@ -537,12 +537,12 @@ QString Decoder::decode(const char *data, int len)
return out;
}
-QString Decoder::flush() const
+TQString Decoder::flush() const
{
return m_decoder->toUnicode(buffer, buffer.length());
}
-QCString Decoder::automaticDetectionForArabic( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForArabic( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F ) || ptr[ i ] == 0xA1 || ptr[ i ] == 0xA2 || ptr[ i ] == 0xA3
@@ -556,7 +556,7 @@ QCString Decoder::automaticDetectionForArabic( const unsigned char* ptr, int siz
return "iso-8859-6";
}
-QCString Decoder::automaticDetectionForBaltic( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForBaltic( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9E ) )
@@ -569,9 +569,9 @@ QCString Decoder::automaticDetectionForBaltic( const unsigned char* ptr, int siz
return "iso-8859-13";
}
-QCString Decoder::automaticDetectionForCentralEuropean(const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForCentralEuropean(const unsigned char* ptr, int size )
{
- QCString charset = QCString();
+ TQCString charset = TQCString();
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F ) {
if ( ptr[ i ] == 0x81 || ptr[ i ] == 0x83 || ptr[ i ] == 0x90 || ptr[ i ] == 0x98 )
@@ -601,7 +601,7 @@ QCString Decoder::automaticDetectionForCentralEuropean(const unsigned char* ptr,
return charset.data();
}
-QCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int size, AutoDetectLanguage _language )
+TQCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int size, AutoDetectLanguage _language )
{
int koi_st=0;
int cp1251_st=0;
@@ -680,8 +680,8 @@ QCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int s
if (ibm866_small_range>cp1251_small_range+koi_small_range)
return "ibm866"; //hehe this is a rare case :)
- QCString koi_string = "koi8-u";
- QCString cp1251_string = "cp1251";
+ TQCString koi_string = "koi8-u";
+ TQCString cp1251_string = "cp1251";
if (cp1251_st==0 && koi_st>1)
return koi_string;
@@ -714,7 +714,7 @@ QCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int s
}
-QCString Decoder::automaticDetectionForGreek( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForGreek( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x87 ) || ptr[ i ] == 0x89 || ptr[ i ] == 0x8B
@@ -727,7 +727,7 @@ QCString Decoder::automaticDetectionForGreek( const unsigned char* ptr, int size
return "iso-8859-7";
}
-QCString Decoder::automaticDetectionForHebrew( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForHebrew( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x89 ) || ptr[ i ] == 0x8B
@@ -743,7 +743,7 @@ QCString Decoder::automaticDetectionForHebrew( const unsigned char* ptr, int siz
return "iso-8859-8-i";
}
-QCString Decoder::automaticDetectionForJapanese( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForJapanese( const unsigned char* ptr, int size )
{
if (!kc)
kc = new JapaneseCode();
@@ -764,7 +764,7 @@ QCString Decoder::automaticDetectionForJapanese( const unsigned char* ptr, int s
return "";
}
-QCString Decoder::automaticDetectionForTurkish( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForTurkish( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x8C ) || ( ptr[ i ] >= 0x91 && ptr[ i ] <= 0x9C ) || ptr[ i ] == 0x9F ) {
@@ -775,7 +775,7 @@ QCString Decoder::automaticDetectionForTurkish( const unsigned char* ptr, int si
return "iso-8859-9";
}
-QCString Decoder::automaticDetectionForWesternEuropean( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForWesternEuropean( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F )
diff --git a/khtml/misc/decoder.h b/khtml/misc/decoder.h
index 613b14043..49c3835fe 100644
--- a/khtml/misc/decoder.h
+++ b/khtml/misc/decoder.h
@@ -22,7 +22,7 @@
#ifndef KHTMLDECODER_H
#define KHTMLDECODER_H
-#include <qstring.h>
+#include <tqstring.h>
class QTextCodec;
class QTextDecoder;
@@ -51,13 +51,13 @@ public:
void setEncoding(const char *encoding, EncodingType type);
const char *encoding() const;
- QString decode(const char *data, int len);
+ TQString decode(const char *data, int len);
bool visuallyOrdered() const { return visualRTL; }
- const QTextCodec *codec() const { return m_codec; }
+ const TQTextCodec *codec() const { return m_codec; }
- QString flush() const;
+ TQString flush() const;
enum AutoDetectLanguage {
@@ -84,23 +84,23 @@ public:
private:
- QCString automaticDetectionForArabic( const unsigned char* str, int size );
- QCString automaticDetectionForBaltic( const unsigned char* str, int size );
- QCString automaticDetectionForCentralEuropean( const unsigned char* str, int size );
- QCString automaticDetectionForCyrillic( const unsigned char* str, int size, AutoDetectLanguage _language );
- QCString automaticDetectionForGreek( const unsigned char* str, int size );
- QCString automaticDetectionForHebrew( const unsigned char* str, int size );
- QCString automaticDetectionForJapanese( const unsigned char* str, int size );
- QCString automaticDetectionForTurkish( const unsigned char* str, int size );
- QCString automaticDetectionForWesternEuropean( const unsigned char* str, int size );
+ TQCString automaticDetectionForArabic( const unsigned char* str, int size );
+ TQCString automaticDetectionForBaltic( const unsigned char* str, int size );
+ TQCString automaticDetectionForCentralEuropean( const unsigned char* str, int size );
+ TQCString automaticDetectionForCyrillic( const unsigned char* str, int size, AutoDetectLanguage _language );
+ TQCString automaticDetectionForGreek( const unsigned char* str, int size );
+ TQCString automaticDetectionForHebrew( const unsigned char* str, int size );
+ TQCString automaticDetectionForJapanese( const unsigned char* str, int size );
+ TQCString automaticDetectionForTurkish( const unsigned char* str, int size );
+ TQCString automaticDetectionForWesternEuropean( const unsigned char* str, int size );
// codec used for decoding. default is Latin1.
- QTextCodec *m_codec;
- QTextDecoder *m_decoder; // only used for utf16
- QCString enc;
+ TQTextCodec *m_codec;
+ TQTextDecoder *m_decoder; // only used for utf16
+ TQCString enc;
EncodingType m_type;
- QCString buffer;
+ TQCString buffer;
bool body;
bool beginning;
diff --git a/khtml/misc/guess_ja.cpp b/khtml/misc/guess_ja.cpp
index 0846d15eb..62934445b 100644
--- a/khtml/misc/guess_ja.cpp
+++ b/khtml/misc/guess_ja.cpp
@@ -37,7 +37,7 @@
*/
/*
- * Maybe we should use QTextCodec::heuristicContentMatch()
+ * Maybe we should use TQTextCodec::heuristicContentMatch()
* But it fails detection. It's not useful.
*/
#include "decoder.h"
diff --git a/khtml/misc/helper.cpp b/khtml/misc/helper.cpp
index eebba5015..f56a4ba92 100644
--- a/khtml/misc/helper.cpp
+++ b/khtml/misc/helper.cpp
@@ -22,25 +22,25 @@
*/
#include "helper.h"
#include "khtmllayout.h"
-#include <qmap.h>
-#include <qpainter.h>
+#include <tqmap.h>
+#include <tqpainter.h>
#include <dom/dom_string.h>
#include <xml/dom_stringimpl.h>
#include <rendering/render_object.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kstaticdeleter.h>
#include <kapplication.h>
#include <kconfig.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
using namespace DOM;
using namespace khtml;
namespace khtml {
- QPainter *printpainter;
+ TQPainter *printpainter;
}
-void khtml::setPrintPainter( QPainter *printer )
+void khtml::setPrintPainter( TQPainter *printer )
{
printpainter = printer;
}
@@ -78,9 +78,9 @@ QRgb khtml::qRgbaFromHsla(double h, double s, double l, double a)
* @param obj render object
* @return the background color. It is guaranteed that a valid color is returned.
*/
-QColor khtml::retrieveBackgroundColor(const RenderObject *obj)
+TQColor khtml::retrieveBackgroundColor(const RenderObject *obj)
{
- QColor result;
+ TQColor result;
while (!obj->isCanvas()) {
result = obj->style()->backgroundColor();
if (result.isValid()) return result;
@@ -95,7 +95,7 @@ QColor khtml::retrieveBackgroundColor(const RenderObject *obj)
/** checks whether the given colors have enough contrast
* @returns @p true if contrast is ok.
*/
-bool khtml::hasSufficientContrast(const QColor &c1, const QColor &c2)
+bool khtml::hasSufficientContrast(const TQColor &c1, const TQColor &c2)
{
// New version from Germain Garand, better suited for contrast measurement
#if 1
diff --git a/khtml/misc/helper.h b/khtml/misc/helper.h
index 984ddfc11..4e5b0d7e8 100644
--- a/khtml/misc/helper.h
+++ b/khtml/misc/helper.h
@@ -22,10 +22,10 @@
#ifndef html_helper_h
#define html_helper_h
-#include <qcolor.h>
+#include <tqcolor.h>
class QPainter;
-#include <qfontmetrics.h>
-#include <qfont.h>
+#include <tqfontmetrics.h>
+#include <tqfont.h>
@@ -35,11 +35,11 @@ namespace khtml
const QRgb transparentColor = 0x00000000;
const QRgb invertedColor = 0x00000002;
- extern QPainter *printpainter;
- void setPrintPainter( QPainter *printer );
+ extern TQPainter *printpainter;
+ void setPrintPainter( TQPainter *printer );
- bool hasSufficientContrast(const QColor &c1, const QColor &c2);
- QColor retrieveBackgroundColor(const RenderObject *obj);
+ bool hasSufficientContrast(const TQColor &c1, const TQColor &c2);
+ TQColor retrieveBackgroundColor(const RenderObject *obj);
QRgb qRgbaFromHsla(double h, double s, double l, double a);
//enumerator for findSelectionNode
diff --git a/khtml/misc/knsplugininstaller.cpp b/khtml/misc/knsplugininstaller.cpp
index 71f86f650..1a9bf62bb 100644
--- a/khtml/misc/knsplugininstaller.cpp
+++ b/khtml/misc/knsplugininstaller.cpp
@@ -31,15 +31,15 @@
#include <ktempfile.h>
#include <netaccess.h>
-#include <qbuttongroup.h>
-#include <qdir.h>
-#include <qiodevice.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqbuttongroup.h>
+#include <tqdir.h>
+#include <tqiodevice.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <sys/utsname.h>
@@ -53,8 +53,8 @@ class PluginListItem : public QListViewItem
{
public:
- PluginListItem(KNSPluginInfo pluginInfo, QListView *parent)
- : QListViewItem(parent, pluginInfo.pluginName())
+ PluginListItem(KNSPluginInfo pluginInfo, TQListView *parent)
+ : TQListViewItem(parent, pluginInfo.pluginName())
, m_pluginInfo(pluginInfo) {}
KNSPluginInfo pluginInfo() const { return m_pluginInfo; }
@@ -66,7 +66,7 @@ private:
// public methods
-KNSPluginInstallEngine::KNSPluginInstallEngine(KMimeType::Ptr mime) : QObject()
+KNSPluginInstallEngine::KNSPluginInstallEngine(KMimeType::Ptr mime) : TQObject()
{
m_mime = mime;
@@ -101,14 +101,14 @@ bool KNSPluginInstallEngine::pluginAvailable()
bool KNSPluginInstallEngine::isActive()
{
// check if we have a configuration key in the kde registry
- QString pluginsListFile;
+ TQString pluginsListFile;
KConfig cfg("kcmnspluginrc", true);
cfg.setGroup("Misc");
pluginsListFile = cfg.readPathEntry("PluginsListFile");
return !pluginsListFile.isEmpty();
}
-const QValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const
+const TQValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const
{
return m_pluginList;
}
@@ -116,7 +116,7 @@ const QValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const
// private methods
bool KNSPluginInstallEngine::loadConfig()
{
- QString pluginsListFile;
+ TQString pluginsListFile;
KConfig cfg("kcmnspluginrc", true);
cfg.setGroup("Misc");
pluginsListFile = cfg.readPathEntry("PluginsListFile");
@@ -135,13 +135,13 @@ bool KNSPluginInstallEngine::loadXmlConfig()
// load the Xml configuration file
if(m_pluginsXmlConfig.isEmpty())
{
- QString tmpFile;
+ TQString tmpFile;
if(KIO::NetAccess::download(m_pluginsListFileURL, tmpFile, NULL)) {
- QFile f(tmpFile);
+ TQFile f(tmpFile);
if(!f.open(IO_ReadOnly))
return false;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
m_pluginsXmlConfig = stream.read();
f.close();
KIO::NetAccess::removeTempFile(tmpFile);
@@ -160,16 +160,16 @@ bool KNSPluginInstallEngine::findPlugin()
utsname sysinfo;
if(uname(&sysinfo))
return false;
- QString sysname(sysinfo.sysname);
- QString machine(sysinfo.machine);
- QString arch = m_archMap[machine];
+ TQString sysname(sysinfo.sysname);
+ TQString machine(sysinfo.machine);
+ TQString arch = m_archMap[machine];
// Parse the document
- QDomDocument doc("xmlConfig");
+ TQDomDocument doc("xmlConfig");
doc.setContent(m_pluginsXmlConfig);
- QDomNodeList archList = doc.elementsByTagName(QString("arch"));
- QDomNode archNode, osNode , pluginNode, node;
- QDomElement e;
+ TQDomNodeList archList = doc.elementsByTagName(TQString("arch"));
+ TQDomNode archNode, osNode , pluginNode, node;
+ TQDomElement e;
// look for the correct architecture
bool found = false;
@@ -227,15 +227,15 @@ void KNSPluginInstallEngine::startInstall(KNSPluginInfo info)
{
m_toInstallPluginInfo = info;
// create a temporary dowload file
- KTempFile tempFile(locateLocal("tmp", "plugin") , QString(".tar.gz"));
+ KTempFile tempFile(locateLocal("tmp", "plugin") , TQString(".tar.gz"));
m_tmpPluginFileName = tempFile.name();
tempFile.unlink();
tempFile.close();
// start the download job
m_downloadJob = KIO::copy(info.pluginURL(), "file://"+m_tmpPluginFileName, false );
// connect signals
- connect(m_downloadJob, SIGNAL(percent (KIO::Job *, unsigned long)), this , SLOT(slotDownLoadProgress(KIO::Job *, unsigned long)));
- connect(m_downloadJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotDownloadResult(KIO::Job *)) );
+ connect(m_downloadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), this , TQT_SLOT(slotDownLoadProgress(KIO::Job *, unsigned long)));
+ connect(m_downloadJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDownloadResult(KIO::Job *)) );
kdDebug(DEBUG_NUMBER) << "download plugin " << m_tmpPluginFileName << endl;
}
@@ -257,7 +257,7 @@ void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job)
// the download succeed copy the plugins files
// test the existance of the homedir
- QDir dir(QDir::homeDirPath());
+ TQDir dir(TQDir::homeDirPath());
if(!dir.exists()) {
emit installFailed();
return;
@@ -269,19 +269,19 @@ void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job)
if(!dir.exists(".mozilla/plugins"))
dir.mkdir(".mozilla/plugins");
// destination kurl
- KURL destURL("file://"+QDir::homeDirPath()+"/.mozilla/plugins");
+ KURL destURL("file://"+TQDir::homeDirPath()+"/.mozilla/plugins");
// construct the source kurlList
KURL::List urlList;
- QStringList pluginFileList = m_toInstallPluginInfo.pluginFileList();
+ TQStringList pluginFileList = m_toInstallPluginInfo.pluginFileList();
- QStringList::iterator it;
+ TQStringList::iterator it;
for( it = pluginFileList.begin(); it != pluginFileList.end(); ++it ) {
urlList.append( KURL("tar://"+m_tmpPluginFileName+"/"+(*it)) );
}
m_installFileJob = KIO::copy(urlList , destURL, false );
- connect(m_installFileJob, SIGNAL(percent (KIO::Job *, unsigned long)), this , SLOT(slotCopyProgress(KIO::Job *, unsigned long)));
- connect(m_installFileJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *)) );
+ connect(m_installFileJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), this , TQT_SLOT(slotCopyProgress(KIO::Job *, unsigned long)));
+ connect(m_installFileJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotCopyResult(KIO::Job *)) );
}
kdDebug(DEBUG_NUMBER) << "COPY FILE " << m_tmpPluginFileName << endl;
@@ -304,14 +304,14 @@ void KNSPluginInstallEngine::slotCopyResult(KIO::Job *job)
}
else {
// start the plugins scan
- m_scanProc = new QProcess( this );
+ m_scanProc = new TQProcess( this );
m_scanProc->addArgument( "nspluginscan" );
m_scanProc->addArgument( "--verbose" );
- connect( m_scanProc, SIGNAL(readyReadStdout()),
- this, SLOT(readScanProcFromStdout()) );
- connect( m_scanProc, SIGNAL(processExited()),
- this, SLOT(endScanProc()) );
+ connect( m_scanProc, TQT_SIGNAL(readyReadStdout()),
+ this, TQT_SLOT(readScanProcFromStdout()) );
+ connect( m_scanProc, TQT_SIGNAL(processExited()),
+ this, TQT_SLOT(endScanProc()) );
if ( !m_scanProc->start() ) {
emit installFailed();
}
@@ -321,7 +321,7 @@ void KNSPluginInstallEngine::slotCopyResult(KIO::Job *job)
void KNSPluginInstallEngine::readScanProcFromStdout()
{
// Monitor the scan progress
- QString progress = m_scanProc->readLineStdout();
+ TQString progress = m_scanProc->readLineStdout();
int percent;
bool ok;
percent = progress.toInt(&ok);
@@ -341,7 +341,7 @@ void KNSPluginInstallEngine::endScanProc()
emit installFailed();
}
-KNSPluginWizard::KNSPluginWizard(QWidget *parent, const char *name, KMimeType::Ptr mime)
+KNSPluginWizard::KNSPluginWizard(TQWidget *parent, const char *name, KMimeType::Ptr mime)
: KWizard(parent, name, true)
, m_installEngine(mime)
{
@@ -374,19 +374,19 @@ KNSPluginWizard::~KNSPluginWizard()
void KNSPluginWizard::initConfirmationPage()
{
- m_confirmationVBox = new QVBox(this);
- new QLabel(i18n("The following plugins are available."), m_confirmationVBox);
+ m_confirmationVBox = new TQVBox(this);
+ new TQLabel(i18n("The following plugins are available."), m_confirmationVBox);
m_pluginListView = new KListView(m_confirmationVBox);
m_pluginListView->addColumn(i18n("Name"));
- m_pluginListView->setSelectionMode(QListView::Single);
- new QLabel(i18n("Click on next to install the selected plugin."), m_confirmationVBox);
+ m_pluginListView->setSelectionMode(TQListView::Single);
+ new TQLabel(i18n("Click on next to install the selected plugin."), m_confirmationVBox);
addPage (m_confirmationVBox, i18n("Plugin installation confirmation"));
bool selected = false;
// Fill the plugin list
- QValueList<KNSPluginInfo>::iterator it;
- QValueList<KNSPluginInfo> pluginList = m_installEngine.pluginList();
+ TQValueList<KNSPluginInfo>::iterator it;
+ TQValueList<KNSPluginInfo> pluginList = m_installEngine.pluginList();
for( it = pluginList.begin(); it != pluginList.end(); ++it ) {
PluginListItem *item = new PluginListItem((*it) , m_pluginListView);
if(!selected) {
@@ -400,20 +400,20 @@ void KNSPluginWizard::initConfirmationPage()
void KNSPluginWizard::initLicencePage()
{
- m_licenceVBox = new QVBox(this);
- m_licencePageLabel = new QLabel(m_licenceVBox);
+ m_licenceVBox = new TQVBox(this);
+ m_licencePageLabel = new TQLabel(m_licenceVBox);
m_licencePageText = new KTextEdit(m_licenceVBox);
m_licencePageText->setReadOnly(true);
// invisible buttonGroup
- QButtonGroup *buttonGroup = new QButtonGroup(this);
+ TQButtonGroup *buttonGroup = new TQButtonGroup(this);
m_agreementButtonGroup = buttonGroup;
buttonGroup->hide();
buttonGroup->setExclusive(true);
- m_licencePageAgree = new QRadioButton ( i18n("I agree."), m_licenceVBox);
+ m_licencePageAgree = new TQRadioButton ( i18n("I agree."), m_licenceVBox);
- m_licencePageDisagree = new QRadioButton ( i18n("I do not agree (plugin will not be installed)."), m_licenceVBox);
+ m_licencePageDisagree = new TQRadioButton ( i18n("I do not agree (plugin will not be installed)."), m_licenceVBox);
buttonGroup->insert(m_licencePageAgree);
buttonGroup->insert(m_licencePageDisagree);
@@ -422,15 +422,15 @@ void KNSPluginWizard::initLicencePage()
addPage (m_licenceVBox, i18n("Plugin licence"));
- connect(buttonGroup, SIGNAL(clicked(int)), this, SLOT(slotAgreementClicked(int)));
+ connect(buttonGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotAgreementClicked(int)));
}
void KNSPluginWizard::initInstallationProgressPage() {
- m_installationProgressWidget = new QWidget(this);
- QVBoxLayout *layout = new QVBoxLayout(m_installationProgressWidget);
- layout->addWidget(new QLabel(i18n("Installation in progress."), m_installationProgressWidget));
- layout->addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Expanding ));
+ m_installationProgressWidget = new TQWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(m_installationProgressWidget);
+ layout->addWidget(new TQLabel(i18n("Installation in progress."), m_installationProgressWidget));
+ layout->addItem(new TQSpacerItem(40,20,TQSizePolicy::Expanding,TQSizePolicy::Expanding ));
m_installationProgressBar = new KProgress(m_installationProgressWidget);
m_installationProgressBar->setTotalSteps(100);
layout->addWidget(m_installationProgressBar);
@@ -441,12 +441,12 @@ void KNSPluginWizard::initInstallationProgressPage() {
void KNSPluginWizard::initFinishPage()
{
- m_finishWidget = new QWidget(this);
- QVBoxLayout *layout = new QVBoxLayout(m_finishWidget);
- layout->addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Expanding ));
- m_finishLabel = new QLabel(m_finishWidget);
+ m_finishWidget = new TQWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(m_finishWidget);
+ layout->addItem(new TQSpacerItem(40,20,TQSizePolicy::Expanding,TQSizePolicy::Expanding ));
+ m_finishLabel = new TQLabel(m_finishWidget);
layout->addWidget(m_finishLabel);
- layout->addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Expanding ));
+ layout->addItem(new TQSpacerItem(40,20,TQSizePolicy::Expanding,TQSizePolicy::Expanding ));
addPage(m_finishWidget, i18n("Installation status"));
@@ -482,30 +482,30 @@ void KNSPluginWizard::initPagesButtonStates()
void KNSPluginWizard::connectSignals() {
- connect(&m_installEngine, SIGNAL(installProgress(int)), m_installationProgressBar, SLOT(setProgress(int)) );
- connect(&m_installEngine, SIGNAL(installCompleted()), this, SLOT(slotInstallationCompleted()) );
- connect(&m_installEngine, SIGNAL(installFailed()), this, SLOT(slotInstallationFailed()) );
+ connect(&m_installEngine, TQT_SIGNAL(installProgress(int)), m_installationProgressBar, TQT_SLOT(setProgress(int)) );
+ connect(&m_installEngine, TQT_SIGNAL(installCompleted()), this, TQT_SLOT(slotInstallationCompleted()) );
+ connect(&m_installEngine, TQT_SIGNAL(installFailed()), this, TQT_SLOT(slotInstallationFailed()) );
}
-void KNSPluginWizard::showPage(QWidget *page)
+void KNSPluginWizard::showPage(TQWidget *page)
{
// if the licence page is shown set the label and the licence content
if(page == m_licenceVBox && m_licencePageLabel->text().isEmpty()) {
KNSPluginInfo info = static_cast<PluginListItem *>(m_pluginListView->selectedItem())->pluginInfo();
m_licencePageLabel->setText(i18n("To install ")+info.pluginName()+i18n(" you need to agree to the following"));
- QString licence;
+ TQString licence;
licence = info.licence();
- QString tmpFile;
+ TQString tmpFile;
if(info.licenceURL().isValid())
// retrieve the licence if we have an url
if(KIO::NetAccess::download(info.licenceURL(), tmpFile, NULL)) {
- QFile f(tmpFile);
+ TQFile f(tmpFile);
if(f.open(IO_ReadOnly)) {
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
licence = stream.read();
f.close();
KIO::NetAccess::removeTempFile(tmpFile);
@@ -540,7 +540,7 @@ void KNSPluginWizard::showPage(QWidget *page)
int KNSPluginWizard::exec()
{
if(!m_installEngine.pluginList().count())
- return QDialog::Rejected;
+ return TQDialog::Rejected;
return KWizard::exec();
}
@@ -584,10 +584,10 @@ KNSPluginInfo::KNSPluginInfo()
}
// KNSPlugin info constructor par an xml dom fragment
-KNSPluginInfo::KNSPluginInfo(QDomNode pluginNode)
+KNSPluginInfo::KNSPluginInfo(TQDomNode pluginNode)
{
- QDomElement e;
- QDomNode node;
+ TQDomElement e;
+ TQDomNode node;
// Read plugin informations
node = pluginNode.firstChild();
@@ -645,12 +645,12 @@ bool KNSPluginInfo::isValid() const
}
// Accesors
-QString KNSPluginInfo::pluginName() const
+TQString KNSPluginInfo::pluginName() const
{
return m_pluginName;
}
-QString KNSPluginInfo::licence() const
+TQString KNSPluginInfo::licence() const
{
return m_licence;
}
@@ -665,7 +665,7 @@ KURL KNSPluginInfo::pluginURL() const
return m_pluginURL;
}
-const QStringList& KNSPluginInfo::pluginFileList() const
+const TQStringList& KNSPluginInfo::pluginFileList() const
{
return m_pluginFileList;
}
diff --git a/khtml/misc/knsplugininstaller.h b/khtml/misc/knsplugininstaller.h
index 903a584b2..f92378f10 100644
--- a/khtml/misc/knsplugininstaller.h
+++ b/khtml/misc/knsplugininstaller.h
@@ -30,21 +30,21 @@
#include <kurl.h>
#include <kwizard.h>
-#include <qbuttongroup.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qobject.h>
-#include <qprocess.h>
-#include <qradiobutton.h>
-#include <qvaluelist.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqbuttongroup.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqobject.h>
+#include <tqprocess.h>
+#include <tqradiobutton.h>
+#include <tqvaluelist.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
class QStringList;
/*
* This class contains all the infos needed to install a given plugin
- * Takes and parse a QDomNode in its constructor
+ * Takes and parse a TQDomNode in its constructor
*/
class KNSPluginInfo
{
@@ -55,7 +55,7 @@ public:
* Construct the plugin info object
*/
KNSPluginInfo();
- KNSPluginInfo(QDomNode pluginNode);
+ KNSPluginInfo(TQDomNode pluginNode);
~KNSPluginInfo();
/*
@@ -64,20 +64,20 @@ public:
bool isValid() const;
//Accessor methods
- QString pluginName() const;
- QString licence() const;
+ TQString pluginName() const;
+ TQString licence() const;
KURL licenceURL() const;
KURL pluginURL() const;
- const QStringList& pluginFileList() const;
+ const TQStringList& pluginFileList() const;
private:
// plugin info
- QString m_pluginName;
- QString m_licence;
+ TQString m_pluginName;
+ TQString m_licence;
KURL m_licenceURL;
KURL m_pluginURL;
- QStringList m_pluginFileList;
+ TQStringList m_pluginFileList;
};
@@ -109,7 +109,7 @@ public:
/*
* Return the list of plugins Available
*/
- const QValueList<KNSPluginInfo>& pluginList() const;
+ const TQValueList<KNSPluginInfo>& pluginList() const;
void startInstall(KNSPluginInfo info);
@@ -132,16 +132,16 @@ private:
bool findPlugin();
- QMap<QString, QString> m_archMap;
- QString m_pluginsXmlConfig;
- QValueList<KNSPluginInfo> m_pluginList;
+ TQMap<TQString, TQString> m_archMap;
+ TQString m_pluginsXmlConfig;
+ TQValueList<KNSPluginInfo> m_pluginList;
KMimeType::Ptr m_mime;
KURL m_pluginsListFileURL;
- QString m_tmpPluginFileName;
+ TQString m_tmpPluginFileName;
KIO::CopyJob *m_downloadJob;
KIO::CopyJob *m_installFileJob;
KNSPluginInfo m_toInstallPluginInfo;
- QProcess *m_scanProc;
+ TQProcess *m_scanProc;
signals:
// Signals used to communicate with the wizzard
@@ -177,7 +177,7 @@ public:
/**
* Construct a KNSpluginInstaller
*/
- KNSPluginWizard(QWidget *parent, const char *name, KMimeType::Ptr mime);
+ KNSPluginWizard(TQWidget *parent, const char *name, KMimeType::Ptr mime);
~KNSPluginWizard();
@@ -209,33 +209,33 @@ private:
/*
* Overiden method called when a page is shown
*/
- void showPage(QWidget *page);
+ void showPage(TQWidget *page);
// Plugin installation engine
KNSPluginInstallEngine m_installEngine;
// pages widgets
- QVBox *m_confirmationVBox;
- QVBox *m_licenceVBox;
- QWidget *m_installationProgressWidget;
- QWidget *m_finishWidget;
+ TQVBox *m_confirmationVBox;
+ TQVBox *m_licenceVBox;
+ TQWidget *m_installationProgressWidget;
+ TQWidget *m_finishWidget;
// plugin list
KListView *m_pluginListView;
// licence stuff
- QLabel *m_licencePageLabel;
+ TQLabel *m_licencePageLabel;
KTextEdit *m_licencePageText;
- QRadioButton *m_licencePageAgree;
- QRadioButton *m_licencePageDisagree;
- QButtonGroup *m_agreementButtonGroup;
+ TQRadioButton *m_licencePageAgree;
+ TQRadioButton *m_licencePageDisagree;
+ TQButtonGroup *m_agreementButtonGroup;
// installation progress bar
KProgress *m_installationProgressBar;
// Finish Label
- QLabel *m_finishLabel;
+ TQLabel *m_finishLabel;
// installation status
bool m_installationComplete;
diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp
index 8f7ae246f..090def1c5 100644
--- a/khtml/misc/loader.cpp
+++ b/khtml/misc/loader.cpp
@@ -49,12 +49,12 @@
#define DEFCACHESIZE 2096*1024
#define MAX_JOB_COUNT 32
-#include <qasyncio.h>
-#include <qasyncimageio.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qmovie.h>
-#include <qwidget.h>
+#include <tqasyncio.h>
+#include <tqasyncimageio.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqmovie.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kio/job.h>
@@ -69,7 +69,7 @@
#include "khtml_part.h"
#ifdef IMAGE_TITLES
-#include <qfile.h>
+#include <tqfile.h>
#include <kfilemetainfo.h>
#include <ktempfile.h>
#endif
@@ -174,7 +174,7 @@ void CachedObject::setSize(int size)
Cache::insertInLRUList(this);
}
-QTextCodec* CachedObject::codecForBuffer( const QString& charset, const QByteArray& buffer ) const
+TQTextCodec* CachedObject::codecForBuffer( const TQString& charset, const TQByteArray& buffer ) const
{
// we don't use heuristicContentMatch here since it is a) far too slow and
// b) having too much functionality for our case.
@@ -185,25 +185,25 @@ QTextCodec* CachedObject::codecForBuffer( const QString& charset, const QByteArr
// BOM
if ( s >= 3 &&
d[0] == 0xef && d[1] == 0xbb && d[2] == 0xbf)
- return QTextCodec::codecForMib( 106 ); // UTF-8
+ return TQTextCodec::codecForMib( 106 ); // UTF-8
if ( s >= 2 && ((d[0] == 0xff && d[1] == 0xfe) ||
(d[0] == 0xfe && d[1] == 0xff)))
- return QTextCodec::codecForMib( 1000 ); // UCS-2
+ return TQTextCodec::codecForMib( 1000 ); // UCS-2
// Link or @charset
if(!charset.isEmpty())
{
- QTextCodec* c = KGlobal::charsets()->codecForName(charset);
+ TQTextCodec* c = KGlobal::charsets()->codecForName(charset);
if(c->mibEnum() == 11) {
// iso8859-8 (visually ordered)
- c = QTextCodec::codecForName("iso8859-8-i");
+ c = TQTextCodec::codecForName("iso8859-8-i");
}
return c;
}
// Default
- return QTextCodec::codecForMib( 4 ); // latin 1
+ return TQTextCodec::codecForMib( 4 ); // latin 1
}
// -------------------------------------------------------------------------------------------
@@ -213,7 +213,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI
: CachedObject(url, CSSStyleSheet, _cachePolicy, 0)
{
// Set the type we want (probably css or xml)
- QString ah = QString::fromLatin1( accept );
+ TQString ah = TQString::fromLatin1( accept );
if ( !ah.isEmpty() )
ah += ",";
ah += "*/*;q=0.1";
@@ -226,7 +226,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI
m_loading = true;
}
-CachedCSSStyleSheet::CachedCSSStyleSheet(const DOMString &url, const QString &stylesheet_data)
+CachedCSSStyleSheet::CachedCSSStyleSheet(const DOMString &url, const TQString &stylesheet_data)
: CachedObject(url, CSSStyleSheet, KIO::CC_Verify, stylesheet_data.length())
{
m_loading = false;
@@ -247,25 +247,25 @@ void CachedCSSStyleSheet::ref(CachedObjectClient *c)
}
}
-void CachedCSSStyleSheet::data( QBuffer &buffer, bool eof )
+void CachedCSSStyleSheet::data( TQBuffer &buffer, bool eof )
{
if(!eof) return;
buffer.close();
setSize(buffer.buffer().size());
-// QString charset = checkCharset( buffer.buffer() );
- QTextCodec* c = 0;
+// TQString charset = checkCharset( buffer.buffer() );
+ TQTextCodec* c = 0;
if (!m_charset.isEmpty()) {
c = KGlobal::charsets()->codecForName(m_charset);
- if(c->mibEnum() == 11) c = QTextCodec::codecForName("iso8859-8-i");
+ if(c->mibEnum() == 11) c = TQTextCodec::codecForName("iso8859-8-i");
}
else {
c = codecForBuffer( m_charsetHint, buffer.buffer() );
m_charset = c->name();
}
- QString data = c->toUnicode( buffer.buffer().data(), m_size );
+ TQString data = c->toUnicode( buffer.buffer().data(), m_size );
// workaround Qt bugs
- m_sheet = static_cast<QChar>(data[0]) == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
+ m_sheet = static_cast<TQChar>(data[0]) == TQChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
m_loading = false;
checkNotify();
@@ -279,7 +279,7 @@ void CachedCSSStyleSheet::checkNotify()
// it() first increments, then returnes the current item.
// this avoids skipping an item when setStyleSheet deletes the "current" one.
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->setStyleSheet( m_url, m_sheet, m_charset );
}
@@ -293,12 +293,12 @@ void CachedCSSStyleSheet::error( int err, const char* text )
// it() first increments, then returnes the current item.
// this avoids skipping an item when setStyleSheet deletes the "current" one.
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->error( m_err, m_errText );
}
#if 0
-QString CachedCSSStyleSheet::checkCharset(const QByteArray& buffer ) const
+TQString CachedCSSStyleSheet::checkCharset(const TQByteArray& buffer ) const
{
int s = buffer.size();
if (s <= 12) return m_charset;
@@ -312,7 +312,7 @@ QString CachedCSSStyleSheet::checkCharset(const QByteArray& buffer ) const
// the string until "; is the charset name
char *p = strchr(d+10, '"');
if (p == 0) return m_charset;
- QString charset = QString::fromAscii(d+10, p-(d+10));
+ TQString charset = TQString::fromAscii(d+10, p-(d+10));
return charset;
}
return m_charset;
@@ -327,13 +327,13 @@ CachedScript::CachedScript(DocLoader* dl, const DOMString &url, KIO::CacheContro
// It's javascript we want.
// But some websites think their scripts are <some wrong mimetype here>
// and refuse to serve them if we only accept application/x-javascript.
- setAccept( QString::fromLatin1("*/*") );
+ setAccept( TQString::fromLatin1("*/*") );
// load the file
Cache::loader()->load(dl, this, false);
m_loading = true;
}
-CachedScript::CachedScript(const DOMString &url, const QString &script_data)
+CachedScript::CachedScript(const DOMString &url, const TQString &script_data)
: CachedObject(url, Script, KIO::CC_Verify, script_data.length())
{
m_loading = false;
@@ -348,15 +348,15 @@ void CachedScript::ref(CachedObjectClient *c)
if(!m_loading) c->notifyFinished(this);
}
-void CachedScript::data( QBuffer &buffer, bool eof )
+void CachedScript::data( TQBuffer &buffer, bool eof )
{
if(!eof) return;
buffer.close();
setSize(buffer.buffer().size());
- QTextCodec* c = codecForBuffer( m_charset, buffer.buffer() );
- QString data = c->toUnicode( buffer.buffer().data(), m_size );
- m_script = static_cast<QChar>(data[0]) == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
+ TQTextCodec* c = codecForBuffer( m_charset, buffer.buffer() );
+ TQString data = c->toUnicode( buffer.buffer().data(), m_size );
+ m_script = static_cast<TQChar>(data[0]) == TQChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
m_loading = false;
checkNotify();
}
@@ -365,7 +365,7 @@ void CachedScript::checkNotify()
{
if(m_loading) return;
- for (QPtrDictIterator<CachedObjectClient> it( m_clients); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients); it.current();)
it()->notifyFinished(this);
}
@@ -383,7 +383,7 @@ namespace khtml
class ImageSource : public QDataSource
{
public:
- ImageSource(QByteArray buf)
+ ImageSource(TQByteArray buf)
: buffer( buf ), pos( 0 ), eof( false ), rew(false ), rewable( true )
{}
@@ -395,7 +395,7 @@ public:
return buffer.size() - pos;
}
- void sendTo(QDataSink* sink, int n)
+ void sendTo(TQDataSink* sink, int n)
{
sink->receive((const uchar*)&buffer.at(pos), n);
@@ -418,13 +418,13 @@ public:
void enableRewind(bool on) { rew = on; }
/*
- Calls reset() on the QIODevice.
+ Calls reset() on the TQIODevice.
*/
void rewind()
{
pos = 0;
if (!rew) {
- QDataSource::rewind();
+ TQDataSource::rewind();
} else
ready();
}
@@ -449,7 +449,7 @@ public:
}
}
- QByteArray buffer;
+ TQByteArray buffer;
unsigned int pos;
private:
bool eof : 1;
@@ -459,7 +459,7 @@ private:
} // end namespace
-static QString buildAcceptHeader()
+static TQString buildAcceptHeader()
{
return "image/png, image/jpeg, video/x-mng, image/jp2, image/gif;q=0.5,*/*;q=0.1";
}
@@ -467,9 +467,9 @@ static QString buildAcceptHeader()
// -------------------------------------------------------------------------------------
CachedImage::CachedImage(DocLoader* dl, const DOMString &url, KIO::CacheControl _cachePolicy, const char*)
- : QObject(), CachedObject(url, Image, _cachePolicy, 0)
+ : TQObject(), CachedObject(url, Image, _cachePolicy, 0)
{
- static const QString &acceptHeader = KGlobal::staticQString( buildAcceptHeader() );
+ static const TQString &acceptHeader = KGlobal::staticQString( buildAcceptHeader() );
m = 0;
p = 0;
@@ -524,18 +524,18 @@ void CachedImage::deref( CachedObjectClient *c )
#define BGMINWIDTH 32
#define BGMINHEIGHT 32
-const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHeight)
+const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int xHeight)
{
static QRgb bgTransparent = qRgba( 0, 0, 0, 0xFF );
- QSize s(pixmap_size());
+ TQSize s(pixmap_size());
int w = xWidth;
int h = xHeight;
if (w == -1) xWidth = w = s.width();
if (h == -1) xHeight = h = s.height();
if ( ( (bgColor != bgTransparent) && (bgColor != newc.rgb()) ) ||
- ( bgSize != QSize(xWidth, xHeight)) )
+ ( bgSize != TQSize(xWidth, xHeight)) )
{
delete bg; bg = 0;
}
@@ -543,7 +543,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
if (bg)
return *bg;
- const QPixmap &r = pixmap();
+ const TQPixmap &r = pixmap();
if (r.isNull()) return r;
@@ -552,7 +552,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
bool isvalid = newc.isValid();
- const QPixmap* src; //source for pretiling, if any
+ const TQPixmap* src; //source for pretiling, if any
//See whether we should scale
if (xWidth != s.width() || xHeight != s.height()) {
@@ -561,11 +561,11 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
src = &r;
}
- bgSize = QSize(xWidth, xHeight);
+ bgSize = TQSize(xWidth, xHeight);
//See whether we can - and should - pre-blend
if (isvalid && (r.hasAlphaChannel() || r.mask() )) {
- bg = new QPixmap(xWidth, xHeight, r.depth());
+ bg = new TQPixmap(xWidth, xHeight, r.depth());
bg->fill(newc);
bitBlt(bg, 0, 0, src);
bgColor = newc.rgb();
@@ -585,8 +585,8 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
if ( w != xWidth || h != xHeight )
{
// kdDebug() << "pre-tiling " << s.width() << "," << s.height() << " to " << w << "," << h << endl;
- QPixmap* oldbg = bg;
- bg = new QPixmap(w, h, r.depth());
+ TQPixmap* oldbg = bg;
+ bg = new TQPixmap(w, h, r.depth());
//Tile horizontally on the first stripe
for (int x = 0; x < w; x += xWidth)
@@ -606,28 +606,28 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
return *src;
}
-const QPixmap &CachedImage::scaled_pixmap( int xWidth, int xHeight )
+const TQPixmap &CachedImage::scaled_pixmap( int xWidth, int xHeight )
{
if (scaled) {
if (scaled->width() == xWidth && scaled->height() == xHeight)
return *scaled;
delete scaled;
}
- const QPixmap &r = pixmap();
+ const TQPixmap &r = pixmap();
if (r.isNull()) return r;
// kdDebug() << "scaling " << r.width() << "," << r.height() << " to " << xWidth << "," << xHeight << endl;
- QImage image = r.convertToImage().smoothScale(xWidth, xHeight);
+ TQImage image = r.convertToImage().smoothScale(xWidth, xHeight);
- scaled = new QPixmap(xWidth, xHeight, r.depth());
+ scaled = new TQPixmap(xWidth, xHeight, r.depth());
scaled->convertFromImage(image);
return *scaled;
}
-const QPixmap &CachedImage::pixmap( ) const
+const TQPixmap &CachedImage::pixmap( ) const
{
if(m_hadError)
return *Cache::brokenPixmap;
@@ -642,7 +642,7 @@ const QPixmap &CachedImage::pixmap( ) const
// pixmap is not yet completely loaded, so we
// return a clipped version. asserting here
// that the valid rect is always from 0/0 to fullwidth/ someheight
- if(!pixPart) pixPart = new QPixmap();
+ if(!pixPart) pixPart = new TQPixmap();
(*pixPart) = m->framePixmap();
if (m->getValidRect().size().isValid())
@@ -661,28 +661,28 @@ const QPixmap &CachedImage::pixmap( ) const
}
-QSize CachedImage::pixmap_size() const
+TQSize CachedImage::pixmap_size() const
{
if (m_wasBlocked) return Cache::blockedPixmap->size();
- return (m_hadError ? Cache::brokenPixmap->size() : m ? m->framePixmap().size() : ( p ? p->size() : QSize()));
+ return (m_hadError ? Cache::brokenPixmap->size() : m ? m->framePixmap().size() : ( p ? p->size() : TQSize()));
}
-QRect CachedImage::valid_rect() const
+TQRect CachedImage::valid_rect() const
{
if (m_wasBlocked) return Cache::blockedPixmap->rect();
- return (m_hadError ? Cache::brokenPixmap->rect() : m ? m->getValidRect() : ( p ? p->rect() : QRect()) );
+ return (m_hadError ? Cache::brokenPixmap->rect() : m ? m->getValidRect() : ( p ? p->rect() : TQRect()) );
}
-void CachedImage::do_notify(const QPixmap& p, const QRect& r)
+void CachedImage::do_notify(const TQPixmap& p, const TQRect& r)
{
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->setPixmap( p, r, this);
}
-void CachedImage::movieUpdated( const QRect& r )
+void CachedImage::movieUpdated( const TQRect& r )
{
#ifdef LOADER_DEBUG
qDebug("movie updated %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(),
@@ -703,10 +703,10 @@ void CachedImage::movieStatus(int status)
// which uses the same CachedImage, the one in the document is not supposed to be notified
// just another Qt 2.2.0 bug. we cannot call
- // QMovie::frameImage if we're after QMovie::EndOfMovie
- if(status == QMovie::EndOfFrame)
+ // TQMovie::frameImage if we're after TQMovie::EndOfMovie
+ if(status == TQMovie::EndOfFrame)
{
- const QImage& im = m->frameImage();
+ const TQImage& im = m->frameImage();
monochrome = ( ( im.depth() <= 8 ) && ( im.numColors() - int( im.hasAlphaBuffer() ) <= 2 ) );
for (int i = 0; monochrome && i < im.numColors(); ++i)
if (im.colorTable()[i] != qRgb(0xff, 0xff, 0xff) &&
@@ -714,7 +714,7 @@ void CachedImage::movieStatus(int status)
monochrome = false;
if( (im.width() < 5 || im.height() < 5) && im.hasAlphaBuffer()) // only evaluate for small images
{
- QImage am = im.createAlphaMask();
+ TQImage am = im.createAlphaMask();
if(am.depth() == 1)
{
bool solid = false;
@@ -734,9 +734,9 @@ void CachedImage::movieStatus(int status)
bg = 0;
}
- if((status == QMovie::EndOfMovie && (!m || m->frameNumber() <= 1)) ||
- ((status == QMovie::EndOfLoop) && (m_showAnimations == KHTMLSettings::KAnimationLoopOnce)) ||
- ((status == QMovie::EndOfFrame) && (m_showAnimations == KHTMLSettings::KAnimationDisabled))
+ if((status == TQMovie::EndOfMovie && (!m || m->frameNumber() <= 1)) ||
+ ((status == TQMovie::EndOfLoop) && (m_showAnimations == KHTMLSettings::KAnimationLoopOnce)) ||
+ ((status == TQMovie::EndOfFrame) && (m_showAnimations == KHTMLSettings::KAnimationDisabled))
)
{
if(imgSource)
@@ -747,7 +747,7 @@ void CachedImage::movieStatus(int status)
// faster to draw, so this is worth the hack
if (p && monochrome && p->depth() > 1)
{
- QPixmap* pix = new QPixmap;
+ TQPixmap* pix = new QPixmap;
pix->convertFromImage( p->convertToImage().convertDepth( 1 ), MonoOnly|AvoidDither );
if ( p->mask() )
pix->setMask( *p->mask() );
@@ -756,16 +756,16 @@ void CachedImage::movieStatus(int status)
monochrome = false;
}
}
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->notifyFinished( this );
m_status = Cached; //all done
}
#if 0
- if((status == QMovie::EndOfFrame) || (status == QMovie::EndOfMovie))
+ if((status == TQMovie::EndOfFrame) || (status == TQMovie::EndOfMovie))
{
#ifdef LOADER_DEBUG
- QRect r(valid_rect());
+ TQRect r(valid_rect());
qDebug("movie Status frame update %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(),
pixmap().size().width(), pixmap().size().height());
#endif
@@ -774,9 +774,9 @@ void CachedImage::movieStatus(int status)
#endif
}
-void CachedImage::movieResize(const QSize& /*s*/)
+void CachedImage::movieResize(const TQSize& /*s*/)
{
- do_notify(m->framePixmap(), QRect());
+ do_notify(m->framePixmap(), TQRect());
}
void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimations )
@@ -785,11 +785,11 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati
if ( (m_showAnimations == KHTMLSettings::KAnimationDisabled) && imgSource ) {
imgSource->cleanBuffer();
delete p;
- p = new QPixmap(m->framePixmap());
- m->disconnectUpdate( this, SLOT( movieUpdated( const QRect &) ));
- m->disconnectStatus( this, SLOT( movieStatus( int ) ));
- m->disconnectResize( this, SLOT( movieResize( const QSize& ) ) );
- QTimer::singleShot(0, this, SLOT( deleteMovie()));
+ p = new TQPixmap(m->framePixmap());
+ m->disconnectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
+ m->disconnectStatus( this, TQT_SLOT( movieStatus( int ) ));
+ m->disconnectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
+ TQTimer::singleShot(0, this, TQT_SLOT( deleteMovie()));
imgSource = 0;
}
}
@@ -817,18 +817,18 @@ void CachedImage::clear()
delete bg; bg = 0;
delete scaled; scaled = 0;
bgColor = qRgba( 0, 0, 0, 0xff );
- bgSize = QSize(-1,-1);
+ bgSize = TQSize(-1,-1);
delete pixPart; pixPart = 0;
formatType = 0;
typeChecked = false;
setSize(0);
- // No need to delete imageSource - QMovie does it for us
+ // No need to delete imageSource - TQMovie does it for us
imgSource = 0;
}
-void CachedImage::data ( QBuffer &_buffer, bool eof )
+void CachedImage::data ( TQBuffer &_buffer, bool eof )
{
#ifdef LOADER_DEBUG
kdDebug( 6060 ) << this << "in CachedImage::data(buffersize " << _buffer.buffer().size() <<", eof=" << eof << endl;
@@ -838,7 +838,7 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
// don't attempt incremental loading if we have all the data already
if (!eof)
{
- formatType = QImageDecoder::formatName( (const uchar*)_buffer.buffer().data(), _buffer.size());
+ formatType = TQImageDecoder::formatName( (const uchar*)_buffer.buffer().data(), _buffer.size());
if ( formatType && strcmp( formatType, "PNG" ) == 0 )
formatType = 0; // Some png files contain multiple images, we want to show only the first one
}
@@ -848,10 +848,10 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
if ( formatType ) // movie format exists
{
imgSource = new ImageSource( _buffer.buffer());
- m = new QMovie( imgSource, 8192 );
- m->connectUpdate( this, SLOT( movieUpdated( const QRect &) ));
- m->connectStatus( this, SLOT( movieStatus(int)));
- m->connectResize( this, SLOT( movieResize( const QSize& ) ) );
+ m = new TQMovie( imgSource, 8192 );
+ m->connectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
+ m->connectStatus( this, TQT_SLOT( movieStatus(int)));
+ m->connectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
}
}
@@ -863,8 +863,8 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
if(eof)
{
- // QMovie currently doesn't support all kinds of image formats
- // so we need to use a QPixmap here when we finished loading the complete
+ // TQMovie currently doesn't support all kinds of image formats
+ // so we need to use a TQPixmap here when we finished loading the complete
// picture and display it then all at once.
if(typeChecked && !formatType)
{
@@ -873,9 +873,9 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
#endif
p = new QPixmap;
{
- QBuffer buffer(_buffer.buffer());
+ TQBuffer buffer(_buffer.buffer());
buffer.open(IO_ReadOnly);
- QImageIO io( &buffer, 0 );
+ TQImageIO io( &buffer, 0 );
io.setGamma(2.2); // hardcoded "reasonable value"
bool result = io.read();
if (result) p->convertFromImage(io.image(), 0);
@@ -888,12 +888,12 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
if(p->isNull())
{
m_hadError = true;
- do_notify(pixmap(), QRect(0, 0, 16, 16)); // load "broken image" icon
+ do_notify(pixmap(), TQRect(0, 0, 16, 16)); // load "broken image" icon
}
else
do_notify(*p, p->rect());
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->notifyFinished( this );
m_status = Cached; //all done
}
@@ -905,10 +905,10 @@ void CachedImage::finish()
Status oldStatus = m_status;
CachedObject::finish();
if ( oldStatus != m_status ) {
- const QPixmap &pm = pixmap();
+ const TQPixmap &pm = pixmap();
do_notify( pm, pm.rect() );
}
- QSize s = pixmap_size();
+ TQSize s = pixmap_size();
setSize( s.width() * s.height() * 2);
}
@@ -919,8 +919,8 @@ void CachedImage::error( int /*err*/, const char* /*text*/ )
typeChecked = true;
m_hadError = true;
m_loading = false;
- do_notify(pixmap(), QRect(0, 0, 16, 16));
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ do_notify(pixmap(), TQRect(0, 0, 16, 16));
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->notifyFinished(this);
}
@@ -988,7 +988,7 @@ void DocLoader::insertCachedObject( CachedObject* o ) const
m_docObjects.resize(khtml::nextSeed( m_docObjects.size() ) );
}
-bool DocLoader::needReload(CachedObject *existing, const QString& fullURL)
+bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL)
{
bool reload = false;
if (m_cachePolicy == KIO::CC_Verify)
@@ -1037,7 +1037,7 @@ CachedImage *DocLoader::requestImage( const DOM::DOMString &url)
return i;
}
-CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, const QString& charset,
+CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, const TQString& charset,
const char *accept, bool userSheet )
{
DOCLOADER_SECCHECK(!userSheet);
@@ -1049,7 +1049,7 @@ CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, co
return s;
}
-CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const QString& charset)
+CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const TQString& charset)
{
DOCLOADER_SECCHECK(true);
if ( ! KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(fullURL.host()) ||
@@ -1073,7 +1073,7 @@ void DocLoader::setAutoloadImages( bool enable )
if ( !m_bautoloadImages ) return;
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current()) );
@@ -1091,7 +1091,7 @@ void DocLoader::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimation
if ( showAnimations == m_showAnimations ) return;
m_showAnimations = showAnimations;
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current() ) );
@@ -1102,7 +1102,7 @@ void DocLoader::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimation
void DocLoader::pauseAnimations()
{
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current() ) );
@@ -1113,7 +1113,7 @@ void DocLoader::pauseAnimations()
void DocLoader::resumeAnimations()
{
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current() ) );
@@ -1124,11 +1124,11 @@ void DocLoader::resumeAnimations()
// ------------------------------------------------------------------------------------------
-Loader::Loader() : QObject()
+Loader::Loader() : TQObject()
{
m_requestsPending.setAutoDelete( true );
m_requestsLoading.setAutoDelete( true );
- connect(&m_timer, SIGNAL(timeout()), this, SLOT( servePendingRequests() ) );
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT( servePendingRequests() ) );
}
void Loader::load(DocLoader* dl, CachedObject *object, bool incremental)
@@ -1171,9 +1171,9 @@ void Loader::servePendingRequests()
}
}
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
- SLOT( slotData( KIO::Job*, const QByteArray &)));
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray &)));
if ( req->object->schedule() )
KIO::Scheduler::scheduleJob( job );
@@ -1200,7 +1200,7 @@ void Loader::slotFinished( KIO::Job* job )
}
else
{
- QString cs = j->queryMetaData("charset");
+ TQString cs = j->queryMetaData("charset");
if (!cs.isEmpty()) r->object->setCharset(cs);
r->object->data(r->m_buffer, true);
emit requestDone( r->m_docLoader, r->object );
@@ -1211,7 +1211,7 @@ void Loader::slotFinished( KIO::Job* job )
r->object->setExpireDate( expireDate );
if ( r->object->type() == CachedObject::Image ) {
- QString fn = j->queryMetaData("content-disposition");
+ TQString fn = j->queryMetaData("content-disposition");
static_cast<CachedImage*>( r->object )->setSuggestedFilename(fn);
#ifdef IMAGE_TITLES
static_cast<CachedImage*>( r->object )->setSuggestedTitle(fn);
@@ -1247,7 +1247,7 @@ void Loader::slotFinished( KIO::Job* job )
m_timer.start(0, true);
}
-void Loader::slotData( KIO::Job*job, const QByteArray &data )
+void Loader::slotData( KIO::Job*job, const TQByteArray &data )
{
Request *r = m_requestsLoading[job];
if(!r) {
@@ -1268,12 +1268,12 @@ int Loader::numRequests( DocLoader* dl ) const
{
int res = 0;
- QPtrListIterator<Request> pIt( m_requestsPending );
+ TQPtrListIterator<Request> pIt( m_requestsPending );
for (; pIt.current(); ++pIt )
if ( pIt.current()->m_docLoader == dl )
res++;
- QPtrDictIterator<Request> lIt( m_requestsLoading );
+ TQPtrDictIterator<Request> lIt( m_requestsLoading );
for (; lIt.current(); ++lIt )
if ( lIt.current()->m_docLoader == dl )
res++;
@@ -1283,7 +1283,7 @@ int Loader::numRequests( DocLoader* dl ) const
void Loader::cancelRequests( DocLoader* dl )
{
- QPtrListIterator<Request> pIt( m_requestsPending );
+ TQPtrListIterator<Request> pIt( m_requestsPending );
while ( pIt.current() ) {
if ( pIt.current()->m_docLoader == dl )
{
@@ -1297,7 +1297,7 @@ void Loader::cancelRequests( DocLoader* dl )
//kdDebug( 6060 ) << "got " << m_requestsLoading.count() << "loading requests" << endl;
- QPtrDictIterator<Request> lIt( m_requestsLoading );
+ TQPtrDictIterator<Request> lIt( m_requestsLoading );
while ( lIt.current() )
{
if ( lIt.current()->m_docLoader == dl )
@@ -1316,7 +1316,7 @@ void Loader::cancelRequests( DocLoader* dl )
KIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const
{
- QPtrDictIterator<Request> it( m_requestsLoading );
+ TQPtrDictIterator<Request> it( m_requestsLoading );
for (; it.current(); ++it )
{
@@ -1332,34 +1332,34 @@ KIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const
// ----------------------------------------------------------------------------
-QDict<CachedObject> *Cache::cache = 0;
-QPtrList<DocLoader>* Cache::docloader = 0;
-QPtrList<CachedObject> *Cache::freeList = 0;
+TQDict<CachedObject> *Cache::cache = 0;
+TQPtrList<DocLoader>* Cache::docloader = 0;
+TQPtrList<CachedObject> *Cache::freeList = 0;
Loader *Cache::m_loader = 0;
int Cache::maxSize = DEFCACHESIZE;
int Cache::totalSizeOfLRU;
-QPixmap *Cache::nullPixmap = 0;
-QPixmap *Cache::brokenPixmap = 0;
-QPixmap *Cache::blockedPixmap = 0;
+TQPixmap *Cache::nullPixmap = 0;
+TQPixmap *Cache::brokenPixmap = 0;
+TQPixmap *Cache::blockedPixmap = 0;
void Cache::init()
{
if ( !cache )
- cache = new QDict<CachedObject>(401, true);
+ cache = new TQDict<CachedObject>(401, true);
if ( !docloader )
- docloader = new QPtrList<DocLoader>;
+ docloader = new TQPtrList<DocLoader>;
if ( !nullPixmap )
nullPixmap = new QPixmap;
if ( !brokenPixmap )
- brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
+ brokenPixmap = new TQPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
if ( !blockedPixmap ) {
- blockedPixmap = new QPixmap();
+ blockedPixmap = new TQPixmap();
blockedPixmap->loadFromData(blocked_icon_data, blocked_icon_len);
}
@@ -1367,7 +1367,7 @@ void Cache::init()
m_loader = new Loader();
if ( !freeList ) {
- freeList = new QPtrList<CachedObject>;
+ freeList = new TQPtrList<CachedObject>;
freeList->setAutoDelete(true);
}
}
@@ -1383,7 +1383,7 @@ void Cache::clear()
#ifndef NDEBUG
bool crash = false;
- for (QDictIterator<CachedObject> it(*cache); it.current(); ++it) {
+ for (TQDictIterator<CachedObject> it(*cache); it.current(); ++it) {
if (!it.current()->canDelete()) {
kdDebug( 6060 ) << " Object in cache still linked to" << endl;
kdDebug( 6060 ) << " -> URL: " << it.current()->url() << endl;
@@ -1399,7 +1399,7 @@ void Cache::clear()
kdDebug( 6060 ) << " -> #clients: " << freeList->current()->count() << endl;
crash = true;
/*
- QPtrDictIterator<CachedObjectClient> it(freeList->current()->m_clients);
+ TQPtrDictIterator<CachedObjectClient> it(freeList->current()->m_clients);
for(;it.current(); ++it) {
if (dynamic_cast<RenderObject*>(it.current())) {
kdDebug( 6060 ) << " --> RenderObject" << endl;
@@ -1426,7 +1426,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
{
KIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : KIO::CC_Verify;
- QString url = kurl.url();
+ TQString url = kurl.url();
CachedObject* o = cache->find(url);
if ( o && o->type() != CachedType ) {
@@ -1462,7 +1462,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
return static_cast<CachedObjectType *>(o);
}
-void Cache::preloadStyleSheet( const QString &url, const QString &stylesheet_data)
+void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_data)
{
CachedObject *o = cache->find(url);
if(o)
@@ -1472,7 +1472,7 @@ void Cache::preloadStyleSheet( const QString &url, const QString &stylesheet_dat
cache->insert( url, stylesheet );
}
-void Cache::preloadScript( const QString &url, const QString &script_data)
+void Cache::preloadScript( const TQString &url, const TQString &script_data)
{
CachedObject *o = cache->find(url);
if(o)
@@ -1524,7 +1524,7 @@ void Cache::statistics()
int images = 0;
int scripts = 0;
int stylesheets = 0;
- QDictIterator<CachedObject> it(*cache);
+ TQDictIterator<CachedObject> it(*cache);
for(it.toFirst(); it.current(); ++it)
{
o = it.current();
@@ -1564,7 +1564,7 @@ void Cache::statistics()
void Cache::removeCacheEntry( CachedObject *object )
{
- QString key = object->url().string();
+ TQString key = object->url().string();
cache->remove( key );
removeFromLRUList( object );
@@ -1669,10 +1669,10 @@ void Cache::insertInLRUList(CachedObject *object)
// --------------------------------------
-void CachedObjectClient::setPixmap(const QPixmap &, const QRect&, CachedImage *) {}
+void CachedObjectClient::setPixmap(const TQPixmap &, const TQRect&, CachedImage *) {}
void CachedObjectClient::setStyleSheet(const DOM::DOMString &/*url*/, const DOM::DOMString &/*sheet*/, const DOM::DOMString &/*charset*/) {}
void CachedObjectClient::notifyFinished(CachedObject * /*finishedObj*/) {}
-void CachedObjectClient::error(int /*err*/, const QString &/*text*/) {}
+void CachedObjectClient::error(int /*err*/, const TQString &/*text*/) {}
#undef CDEBUG
diff --git a/khtml/misc/loader.h b/khtml/misc/loader.h
index 346e85f12..05c297d79 100644
--- a/khtml/misc/loader.h
+++ b/khtml/misc/loader.h
@@ -38,15 +38,15 @@
#endif
#include <stdlib.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qdict.h>
-#include <qpixmap.h>
-#include <qbuffer.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
+#include <tqbuffer.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
#include <kurl.h>
#include <kio/global.h>
@@ -115,7 +115,7 @@ namespace khtml
}
virtual ~CachedObject();
- virtual void data( QBuffer &buffer, bool eof) = 0;
+ virtual void data( TQBuffer &buffer, bool eof) = 0;
virtual void error( int err, const char *text ) = 0;
const DOM::DOMString &url() const { return m_url; }
@@ -130,9 +130,9 @@ namespace khtml
void setStatus(Status s) { m_status = s; }
Status status() const { return m_status; }
- virtual void setCharset( const QString& /*charset*/ ) {}
+ virtual void setCharset( const TQString& /*charset*/ ) {}
- QTextCodec* codecForBuffer( const QString& charset, const QByteArray& buffer ) const;
+ TQTextCodec* codecForBuffer( const TQString& charset, const TQByteArray& buffer ) const;
int size() const { return m_size; }
@@ -157,14 +157,14 @@ namespace khtml
* List of acceptable mimetypes separated by ",". A mimetype may contain a wildcard.
*/
// e.g. "text/*"
- QString accept() const { return m_accept; }
- void setAccept(const QString &_accept) { m_accept = _accept; }
+ TQString accept() const { return m_accept; }
+ void setAccept(const TQString &_accept) { m_accept = _accept; }
protected:
void setSize(int size);
- QPtrDict<CachedObjectClient> m_clients;
+ TQPtrDict<CachedObjectClient> m_clients;
DOM::DOMString m_url;
- QString m_accept;
+ TQString m_accept;
Request *m_request;
Type m_type;
Status m_status;
@@ -197,27 +197,27 @@ namespace khtml
public:
CachedCSSStyleSheet(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy,
const char *accept);
- CachedCSSStyleSheet(const DOM::DOMString &url, const QString &stylesheet_data);
+ CachedCSSStyleSheet(const DOM::DOMString &url, const TQString &stylesheet_data);
const DOM::DOMString &sheet() const { return m_sheet; }
virtual void ref(CachedObjectClient *consumer);
- virtual void data( QBuffer &buffer, bool eof );
+ virtual void data( TQBuffer &buffer, bool eof );
virtual void error( int err, const char *text );
virtual bool schedule() const { return true; }
- void setCharsetHint( const QString& charset ) { m_charsetHint = charset; }
- void setCharset( const QString& charset ) { m_charset = charset; }
+ void setCharsetHint( const TQString& charset ) { m_charsetHint = charset; }
+ void setCharset( const TQString& charset ) { m_charset = charset; }
protected:
void checkNotify();
DOM::DOMString m_sheet;
- QString m_charset;
- QString m_charsetHint;
+ TQString m_charset;
+ TQString m_charsetHint;
int m_err;
- QString m_errText;
+ TQString m_errText;
};
/**
@@ -227,13 +227,13 @@ namespace khtml
{
public:
CachedScript(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, const char* accept );
- CachedScript(const DOM::DOMString &url, const QString &script_data);
+ CachedScript(const DOM::DOMString &url, const TQString &script_data);
const DOM::DOMString &script() const { return m_script; }
virtual void ref(CachedObjectClient *consumer);
- virtual void data( QBuffer &buffer, bool eof );
+ virtual void data( TQBuffer &buffer, bool eof );
virtual void error( int err, const char *text );
virtual bool schedule() const { return false; }
@@ -241,10 +241,10 @@ namespace khtml
void checkNotify();
bool isLoaded() const { return !m_loading; }
- void setCharset( const QString& charset ) { m_charset = charset; }
+ void setCharset( const TQString& charset ) { m_charset = charset; }
protected:
- QString m_charset;
+ TQString m_charset;
DOM::DOMString m_script;
};
@@ -253,37 +253,37 @@ namespace khtml
/**
* a cached image
*/
- class CachedImage : public QObject, public CachedObject
+ class CachedImage : public TQObject, public CachedObject
{
Q_OBJECT
public:
CachedImage(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, const char* accept);
virtual ~CachedImage();
- const QPixmap &pixmap() const;
- const QPixmap &scaled_pixmap(int xWidth, int xHeight);
- const QPixmap &tiled_pixmap(const QColor& bg, int xWidth = -1, int xHeight = -1);
+ const TQPixmap &pixmap() const;
+ const TQPixmap &scaled_pixmap(int xWidth, int xHeight);
+ const TQPixmap &tiled_pixmap(const TQColor& bg, int xWidth = -1, int xHeight = -1);
- QSize pixmap_size() const; // returns the size of the complete (i.e. when finished) loading
- QRect valid_rect() const; // returns the rectangle of pixmap that has been loaded already
+ TQSize pixmap_size() const; // returns the size of the complete (i.e. when finished) loading
+ TQRect valid_rect() const; // returns the rectangle of pixmap that has been loaded already
bool canRender() const { return !isErrorImage() && pixmap_size().width() > 0 && pixmap_size().height() > 0; }
void ref(CachedObjectClient *consumer);
virtual void deref(CachedObjectClient *consumer);
- virtual void data( QBuffer &buffer, bool eof );
+ virtual void data( TQBuffer &buffer, bool eof );
virtual void error( int err, const char *text );
bool isTransparent() const { return isFullyTransparent; }
bool isErrorImage() const { return m_hadError; }
bool isBlockedImage() const { return m_wasBlocked; }
- const QString& suggestedFilename() const { return m_suggestedFilename; }
- void setSuggestedFilename( const QString& s ) { m_suggestedFilename = s; }
+ const TQString& suggestedFilename() const { return m_suggestedFilename; }
+ void setSuggestedFilename( const TQString& s ) { m_suggestedFilename = s; }
#ifdef IMAGE_TITLES
- const QString& suggestedTitle() const { return m_suggestedTitle; }
- void setSuggestedTitle( const QString& s ) { m_suggestedTitle = s; }
+ const TQString& suggestedTitle() const { return m_suggestedTitle; }
+ void setSuggestedTitle( const TQString& s ) { m_suggestedTitle = s; }
#else
- const QString& suggestedTitle() const { return m_suggestedFilename; }
+ const TQString& suggestedTitle() const { return m_suggestedFilename; }
#endif
void setShowAnimations( KHTMLSettings::KAnimationAdvice );
@@ -299,27 +299,27 @@ namespace khtml
private slots:
/**
- * gets called, whenever a QMovie changes frame
+ * gets called, whenever a TQMovie changes frame
*/
- void movieUpdated( const QRect &rect );
+ void movieUpdated( const TQRect &rect );
void movieStatus(int);
- void movieResize(const QSize&);
+ void movieResize(const TQSize&);
void deleteMovie();
private:
- void do_notify(const QPixmap& p, const QRect& r);
+ void do_notify(const TQPixmap& p, const TQRect& r);
- QString m_suggestedFilename;
+ TQString m_suggestedFilename;
#ifdef IMAGE_TITLES
- QString m_suggestedTitle;
+ TQString m_suggestedTitle;
#endif
- QMovie* m;
- QPixmap* p;
- QPixmap* scaled;
- QPixmap* bg;
+ TQMovie* m;
+ TQPixmap* p;
+ TQPixmap* scaled;
+ TQPixmap* bg;
QRgb bgColor;
- QSize bgSize;
- mutable QPixmap* pixPart;
+ TQSize bgSize;
+ mutable TQPixmap* pixPart;
ImageSource* imgSource;
const char* formatType; // Is the name of the movie format type
@@ -349,9 +349,9 @@ namespace khtml
~DocLoader();
CachedImage *requestImage( const DOM::DOMString &url);
- CachedCSSStyleSheet *requestStyleSheet( const DOM::DOMString &url, const QString& charsetHint,
+ CachedCSSStyleSheet *requestStyleSheet( const DOM::DOMString &url, const TQString& charsetHint,
const char *accept = "text/css", bool userSheet = false );
- CachedScript *requestScript( const DOM::DOMString &url, const QString& charset);
+ CachedScript *requestScript( const DOM::DOMString &url, const TQString& charset);
bool autoloadImages() const { return m_bautoloadImages; }
KIO::CacheControl cachePolicy() const { return m_cachePolicy; }
@@ -371,14 +371,14 @@ namespace khtml
void removeCachedObject( CachedObject* o) const { m_docObjects.remove( o ); }
private:
- bool needReload(CachedObject *existing, const QString &fullUrl);
+ bool needReload(CachedObject *existing, const TQString &fullUrl);
friend class Cache;
friend class DOM::DocumentImpl;
friend class ::KHTMLPart;
- QStringList m_reloadedURLs;
- mutable QPtrDict<CachedObject> m_docObjects;
+ TQStringList m_reloadedURLs;
+ mutable TQPtrDict<CachedObject> m_docObjects;
time_t m_expireDate;
time_t m_creationDate;
KIO::CacheControl m_cachePolicy;
@@ -397,7 +397,7 @@ namespace khtml
Request(DocLoader* dl, CachedObject *_object, bool _incremental);
~Request();
bool incremental;
- QBuffer m_buffer;
+ TQBuffer m_buffer;
CachedObject *object;
DocLoader* m_docLoader;
};
@@ -427,16 +427,16 @@ namespace khtml
protected slots:
void slotFinished( KIO::Job * );
- void slotData( KIO::Job *, const QByteArray & );
+ void slotData( KIO::Job *, const TQByteArray & );
void servePendingRequests();
protected:
- QPtrList<Request> m_requestsPending;
- QPtrDict<Request> m_requestsLoading;
+ TQPtrList<Request> m_requestsPending;
+ TQPtrDict<Request> m_requestsLoading;
#ifdef HAVE_LIBJPEG
KJPEGFormatType m_jpegloader;
#endif
- QTimer m_timer;
+ TQTimer m_timer;
};
/**
@@ -471,12 +471,12 @@ namespace khtml
/**
* Pre-loads a stylesheet into the cache.
*/
- static void preloadStyleSheet(const QString &url, const QString &stylesheet_data);
+ static void preloadStyleSheet(const TQString &url, const TQString &stylesheet_data);
/**
* Pre-loads a script into the cache.
*/
- static void preloadScript(const QString &url, const QString &script_data);
+ static void preloadScript(const TQString &url, const TQString &script_data);
static void setSize( int bytes );
static int size() { return maxSize; };
@@ -492,9 +492,9 @@ namespace khtml
static Loader *loader() { return m_loader; }
- static QPixmap *nullPixmap;
- static QPixmap *brokenPixmap;
- static QPixmap *blockedPixmap;
+ static TQPixmap *nullPixmap;
+ static TQPixmap *brokenPixmap;
+ static TQPixmap *blockedPixmap;
static int cacheSize;
static void removeCacheEntry( CachedObject *object );
@@ -505,9 +505,9 @@ namespace khtml
friend class CachedObject;
- static QDict<CachedObject> *cache;
- static QPtrList<DocLoader>* docloader;
- static QPtrList<CachedObject> *freeList;
+ static TQDict<CachedObject> *cache;
+ static TQPtrList<DocLoader>* docloader;
+ static TQPtrList<CachedObject> *freeList;
static void insertInLRUList(CachedObject*);
static void removeFromLRUList(CachedObject*);
diff --git a/khtml/misc/loader_client.h b/khtml/misc/loader_client.h
index 023f147c6..3e28f7e56 100644
--- a/khtml/misc/loader_client.h
+++ b/khtml/misc/loader_client.h
@@ -1,7 +1,7 @@
#ifndef LOADER_CLIENT_H
#define LOADER_CLIENT_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "dom/dom_string.h"
namespace khtml {
@@ -25,10 +25,10 @@ namespace khtml {
// pointer to us
// return whether we need manual update
// don't ref() or deref() elements in setPixmap!!
- virtual void setPixmap(const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap(const TQPixmap &, const TQRect&, CachedImage *);
virtual void setStyleSheet(const DOM::DOMString &/*url*/, const DOM::DOMString &/*sheet*/, const DOM::DOMString &/*charset*/);
virtual void notifyFinished(CachedObject * /*finishedObj*/);
- virtual void error(int err, const QString &text);
+ virtual void error(int err, const TQString &text);
};
}
diff --git a/khtml/misc/loader_jpeg.cpp b/khtml/misc/loader_jpeg.cpp
index 4c9c97465..57174fe1b 100644
--- a/khtml/misc/loader_jpeg.cpp
+++ b/khtml/misc/loader_jpeg.cpp
@@ -36,7 +36,7 @@
#include <stdio.h>
#include <setjmp.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kglobal.h>
extern "C" {
@@ -82,9 +82,9 @@ struct khtml_jpeg_source_mgr : public jpeg_source_mgr {
int valid_buffer_len;
size_t skip_input_bytes;
int ateof;
- QRect change_rect;
- QRect old_change_rect;
- QTime decoder_timestamp;
+ TQRect change_rect;
+ TQRect old_change_rect;
+ TQTime decoder_timestamp;
bool final_pass;
bool decoding_done;
bool do_progressive;
@@ -193,7 +193,7 @@ public:
virtual ~KJPEGFormat();
- virtual int decode(QImage& img, QImageConsumer* consumer,
+ virtual int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
private:
@@ -241,7 +241,7 @@ KJPEGFormat::~KJPEGFormat()
* return < 0 means "fatal error in image decoding, don't call me ever again"
*/
-int KJPEGFormat::decode(QImage& image, QImageConsumer* consumer, const uchar* buffer, int length)
+int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar* buffer, int length)
{
#ifdef JPEG_DEBUG
qDebug("KJPEGFormat::decode(%08lx, %08lx, %08lx, %d)",
@@ -438,7 +438,7 @@ again:
if(consumer && completed_scanlines)
{
- QRect r(0, oldoutput_scanline, cinfo.output_width, completed_scanlines);
+ TQRect r(0, oldoutput_scanline, cinfo.output_width, completed_scanlines);
#ifdef JPEG_DEBUG
qDebug("changing %d/%d %d/%d", r.x(), r.y(), r.width(), r.height());
#endif
@@ -447,10 +447,10 @@ again:
if ( jsrc.decoder_timestamp.elapsed() >= max_consumingtime ) {
if( !jsrc.old_change_rect.isEmpty()) {
consumer->changed(jsrc.old_change_rect);
- jsrc.old_change_rect = QRect();
+ jsrc.old_change_rect = TQRect();
}
consumer->changed(jsrc.change_rect);
- jsrc.change_rect = QRect();
+ jsrc.change_rect = TQRect();
jsrc.decoder_timestamp.restart();
}
}
@@ -463,7 +463,7 @@ again:
jsrc.decoding_done = jsrc.final_pass && cinfo.input_scan_number == cinfo.output_scan_number;
if ( !jsrc.decoding_done ) {
jsrc.old_change_rect |= jsrc.change_rect;
- jsrc.change_rect = QRect();
+ jsrc.change_rect = TQRect();
}
}
else
@@ -521,7 +521,7 @@ again:
// -----------------------------------------------------------------------------
// This is the factory that teaches Qt about progressive JPEG's
-QImageFormat* khtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length)
+TQImageFormat* khtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length)
{
if(length < 3) return 0;
diff --git a/khtml/misc/loader_jpeg.h b/khtml/misc/loader_jpeg.h
index f96d1f135..c97b2bcbf 100644
--- a/khtml/misc/loader_jpeg.h
+++ b/khtml/misc/loader_jpeg.h
@@ -26,7 +26,7 @@
#ifndef _khtml_loader_jpeg_h
#define _khtml_loader_jpeg_h
-#include <qasyncimageio.h>
+#include <tqasyncimageio.h>
namespace khtml
{
@@ -38,7 +38,7 @@ namespace khtml
class KJPEGFormatType : public QImageFormatType
{
public:
- QImageFormat* decoderFor(const uchar* buffer, int length);
+ TQImageFormat* decoderFor(const uchar* buffer, int length);
const char* formatName() const;
};
diff --git a/khtml/misc/multimap.h b/khtml/misc/multimap.h
index 08cb11879..125e8e07d 100644
--- a/khtml/misc/multimap.h
+++ b/khtml/misc/multimap.h
@@ -23,16 +23,16 @@
#ifndef _MultiMap_h_
#define _MultiMap_h_
-#include <qptrdict.h>
-#include <qptrlist.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
#include <assert.h>
#include <stdlib.h>
template<class T> class MultiMapPtrList;
// KMultiMap is an implementaition of a Map with multiple entries per key.
-// It is originally designed to work like a shell for QPtrDict<QPtrList>, but
-// QPtrList have been replaced with a much faster hash set.
+// It is originally designed to work like a shell for TQPtrDict<TQPtrList>, but
+// TQPtrList have been replaced with a much faster hash set.
template<class T>
class KMultiMap {
public:
@@ -63,7 +63,7 @@ public:
return dict.find(key);
}
private:
- QPtrDict<List> dict;
+ TQPtrDict<List> dict;
};
diff --git a/khtml/misc/stringit.cpp b/khtml/misc/stringit.cpp
index 5dbe857be..9b8fc5899 100644
--- a/khtml/misc/stringit.cpp
+++ b/khtml/misc/stringit.cpp
@@ -32,8 +32,8 @@ uint TokenizerString::length() const
++length;
}
if (m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
- QValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
+ TQValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
for (; i != e; ++i)
length += (*i).m_length;
}
@@ -83,8 +83,8 @@ void TokenizerString::append(const TokenizerString &s)
assert(!s.escaped());
append(s.m_currentString);
if (s.m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = s.m_substrings.begin();
- QValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = s.m_substrings.begin();
+ TQValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
for (; i != e; ++i)
append(*i);
}
@@ -96,8 +96,8 @@ void TokenizerString::prepend(const TokenizerString &s)
assert(!escaped());
assert(!s.escaped());
if (s.m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = s.m_substrings.fromLast();
- QValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = s.m_substrings.fromLast();
+ TQValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
for (; i != e; --i)
prepend(*i);
}
@@ -117,9 +117,9 @@ void TokenizerString::advanceSubstring()
}
}
-QString TokenizerString::toString() const
+TQString TokenizerString::toString() const
{
- QString result;
+ TQString result;
if (!m_pushedChar1.isNull()) {
result.append(m_pushedChar1);
if (!m_pushedChar2.isNull())
@@ -127,8 +127,8 @@ QString TokenizerString::toString() const
}
m_currentString.appendTo(result);
if (m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
- QValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
+ TQValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
for (; i != e; ++i)
(*i).appendTo(result);
}
diff --git a/khtml/misc/stringit.h b/khtml/misc/stringit.h
index 9b6c3885d..789f22af8 100644
--- a/khtml/misc/stringit.h
+++ b/khtml/misc/stringit.h
@@ -28,8 +28,8 @@
#include "dom/dom_string.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <assert.h>
@@ -43,9 +43,9 @@ class DOMStringIt
public:
DOMStringIt()
{ s = 0, l = 0; lines = 0; }
- DOMStringIt(QChar *str, uint len)
+ DOMStringIt(TQChar *str, uint len)
{ s = str, l = len; lines = 0; }
- DOMStringIt(const QString &str)
+ DOMStringIt(const TQString &str)
{ s = str.unicode(); l = str.length(); lines = 0; }
DOMStringIt *operator++()
@@ -60,20 +60,20 @@ public:
return this;
}
public:
- void push(const QChar& c) { /* assert(pushedChar.isNull());*/ pushedChar = c; }
+ void push(const TQChar& c) { /* assert(pushedChar.isNull());*/ pushedChar = c; }
- const QChar& operator*() const { return pushedChar.isNull() ? *s : pushedChar; }
- const QChar* operator->() const { return pushedChar.isNull() ? s : &pushedChar; }
+ const TQChar& operator*() const { return pushedChar.isNull() ? *s : pushedChar; }
+ const TQChar* operator->() const { return pushedChar.isNull() ? s : &pushedChar; }
bool escaped() const { return !pushedChar.isNull(); }
uint length() const { return l+(!pushedChar.isNull()); }
- const QChar *current() const { return pushedChar.isNull() ? s : &pushedChar; }
+ const TQChar *current() const { return pushedChar.isNull() ? s : &pushedChar; }
int lineCount() const { return lines; }
protected:
- QChar pushedChar;
- const QChar *s;
+ TQChar pushedChar;
+ const TQChar *s;
int l;
int lines;
};
@@ -85,12 +85,12 @@ class TokenizerSubstring
friend class TokenizerString;
public:
TokenizerSubstring() : m_length(0), m_current(0) {}
- TokenizerSubstring(const QString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
- TokenizerSubstring(const QChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {}
+ TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
+ TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {}
void clear() { m_length = 0; m_current = 0; }
- void appendTo(QString &str) const {
+ void appendTo(TQString &str) const {
if (m_string.unicode() == m_current) {
if (str.isEmpty())
str = m_string;
@@ -101,9 +101,9 @@ public:
}
}
private:
- QString m_string;
+ TQString m_string;
int m_length;
- const QChar *m_current;
+ const TQChar *m_current;
};
class TokenizerString
@@ -111,8 +111,8 @@ class TokenizerString
public:
TokenizerString() : m_currentChar(0), m_lines(0), m_composite(false) {}
- TokenizerString(const QChar *str, int length) : m_currentString(str, length), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
- TokenizerString(const QString &str) : m_currentString(str), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
+ TokenizerString(const TQChar *str, int length) : m_currentString(str, length), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
+ TokenizerString(const TQString &str) : m_currentString(str), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
TokenizerString(const TokenizerString &o) : m_pushedChar1(o.m_pushedChar1), m_pushedChar2(o.m_pushedChar2),
m_currentString(o.m_currentString), m_substrings(o.m_substrings),
m_lines(o.m_lines), m_composite(o.m_composite) {
@@ -124,7 +124,7 @@ public:
void append(const TokenizerString &);
void prepend(const TokenizerString &);
- void push(QChar c) {
+ void push(TQChar c) {
if (m_pushedChar1.isNull()) {
m_pushedChar1 = c;
m_currentChar = m_pushedChar1.isNull() ? m_currentString.m_current : &m_pushedChar1;
@@ -155,31 +155,31 @@ public:
int lineCount() const { return m_lines; }
void resetLineCount() { m_lines = 0; }
- QString toString() const;
+ TQString toString() const;
void operator++() { advance(); }
- const QChar &operator*() const { return *current(); }
- const QChar *operator->() const { return current(); }
+ const TQChar &operator*() const { return *current(); }
+ const TQChar *operator->() const { return current(); }
private:
void append(const TokenizerSubstring &);
void prepend(const TokenizerSubstring &);
void advanceSubstring();
- const QChar *current() const { return m_currentChar; }
+ const TQChar *current() const { return m_currentChar; }
- QChar m_pushedChar1;
- QChar m_pushedChar2;
+ TQChar m_pushedChar1;
+ TQChar m_pushedChar2;
TokenizerSubstring m_currentString;
- const QChar *m_currentChar;
- QValueList<TokenizerSubstring> m_substrings;
+ const TQChar *m_currentChar;
+ TQValueList<TokenizerSubstring> m_substrings;
int m_lines;
bool m_composite;
};
-class TokenizerQueue : public QValueList<TokenizerString>
+class TokenizerQueue : public TQValueList<TokenizerString>
{
public: