summaryrefslogtreecommitdiffstats
path: root/khtml/misc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /khtml/misc
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/misc')
-rw-r--r--khtml/misc/arena.cpp4
-rw-r--r--khtml/misc/decoder.cpp8
-rw-r--r--khtml/misc/helper.cpp4
-rw-r--r--khtml/misc/helper.h2
-rw-r--r--khtml/misc/htmlattrs.c4
-rw-r--r--khtml/misc/khtmllayout.h4
-rw-r--r--khtml/misc/knsplugininstaller.h2
-rw-r--r--khtml/misc/loader.cpp20
-rw-r--r--khtml/misc/loader.h2
-rw-r--r--khtml/misc/loader_jpeg.cpp4
-rw-r--r--khtml/misc/loader_jpeg.h2
-rw-r--r--khtml/misc/multimap.h8
-rw-r--r--khtml/misc/stringit.h6
13 files changed, 35 insertions, 35 deletions
diff --git a/khtml/misc/arena.cpp b/khtml/misc/arena.cpp
index 5efcaf98d..58d531384 100644
--- a/khtml/misc/arena.cpp
+++ b/khtml/misc/arena.cpp
@@ -143,7 +143,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb)
assert((nb & pool->mask) == 0);
#endif
- nb = (uword)ARENA_ALIGN(pool, nb); /* force alignment */
+ nb = (uword)ARENA_ALIGN(pool, nb); /* force tqalignment */
/* attempt to allocate from arenas at pool->current */
{
@@ -197,7 +197,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb)
} else
#endif
sz = pool->arenasize > nb ? pool->arenasize : nb;
- sz += sizeof *a + pool->mask; /* header and alignment slop */
+ sz += sizeof *a + pool->mask; /* header and tqalignment slop */
pool->cumul += sz;
#ifdef DEBUG_ARENA_MALLOC
i++;
diff --git a/khtml/misc/decoder.cpp b/khtml/misc/decoder.cpp
index f227f4014..bd831c125 100644
--- a/khtml/misc/decoder.cpp
+++ b/khtml/misc/decoder.cpp
@@ -170,7 +170,7 @@ static int findXMLEncoding(const TQCString &str, int &encodingLength)
{
int len = str.length();
- int pos = str.find("encoding");
+ int pos = str.tqfind("encoding");
if (pos == -1)
return -1;
pos += 8;
@@ -365,10 +365,10 @@ TQString Decoder::decode(const char *data, int len)
TQCString str( ptr, (end-ptr)+1);
str = str.lower();
int pos = 0;
- //if( (pos = str.find("http-equiv", pos)) == -1) break;
- //if( (pos = str.find("content-type", pos)) == -1) break;
+ //if( (pos = str.tqfind("http-equiv", pos)) == -1) break;
+ //if( (pos = str.tqfind("content-type", pos)) == -1) break;
while( pos < ( int ) str.length() ) {
- if( (pos = str.find("charset", pos)) == -1) break;
+ if( (pos = str.tqfind("charset", pos)) == -1) break;
pos += 7;
// skip whitespace..
while( pos < (int)str.length() && str[pos] <= ' ' ) pos++;
diff --git a/khtml/misc/helper.cpp b/khtml/misc/helper.cpp
index f56a4ba92..8c0b79ab5 100644
--- a/khtml/misc/helper.cpp
+++ b/khtml/misc/helper.cpp
@@ -66,12 +66,12 @@ double calcHue(double temp1, double temp2, double hueVal)
// explanation available at http://en.wikipedia.org/wiki/HSL_color_space
// all values are in the range of 0 to 1.0
-QRgb khtml::qRgbaFromHsla(double h, double s, double l, double a)
+QRgb khtml::tqRgbaFromHsla(double h, double s, double l, double a)
{
double temp2 = l < 0.5 ? l * (1.0 + s) : l + s - l * s;
double temp1 = 2.0 * l - temp2;
- return qRgba(calcHue(temp1, temp2, h + 1.0 / 3.0) * 255, calcHue(temp1, temp2, h) * 255, calcHue(temp1, temp2, h - 1.0 / 3.0) * 255, a * 255);
+ return tqRgba(calcHue(temp1, temp2, h + 1.0 / 3.0) * 255, calcHue(temp1, temp2, h) * 255, calcHue(temp1, temp2, h - 1.0 / 3.0) * 255, a * 255);
}
/** finds out the background color of an element
diff --git a/khtml/misc/helper.h b/khtml/misc/helper.h
index 85442fae8..167a2a68e 100644
--- a/khtml/misc/helper.h
+++ b/khtml/misc/helper.h
@@ -40,7 +40,7 @@ namespace khtml
bool hasSufficientContrast(const TQColor &c1, const TQColor &c2);
TQColor retrieveBackgroundColor(const RenderObject *obj);
- QRgb qRgbaFromHsla(double h, double s, double l, double a);
+ QRgb tqRgbaFromHsla(double h, double s, double l, double a);
//enumerator for findSelectionNode
enum FindSelectionResult { SelectionPointBefore,
diff --git a/khtml/misc/htmlattrs.c b/khtml/misc/htmlattrs.c
index 779792e71..6f420e3b3 100644
--- a/khtml/misc/htmlattrs.c
+++ b/khtml/misc/htmlattrs.c
@@ -188,7 +188,7 @@ struct spool_attr_t
char spool_attr_str42[sizeof("rules")];
char spool_attr_str43[sizeof("compact")];
char spool_attr_str44[sizeof("rev")];
- char spool_attr_str45[sizeof("shape")];
+ char spool_attr_str45[sizeof("tqshape")];
char spool_attr_str46[sizeof("charset")];
char spool_attr_str47[sizeof("charoff")];
char spool_attr_str48[sizeof("lang")];
@@ -343,7 +343,7 @@ static const struct spool_attr_t spool_attr_contents =
"rules",
"compact",
"rev",
- "shape",
+ "tqshape",
"charset",
"charoff",
"lang",
diff --git a/khtml/misc/khtmllayout.h b/khtml/misc/khtmllayout.h
index e4fb531a1..b0c8dc613 100644
--- a/khtml/misc/khtmllayout.h
+++ b/khtml/misc/khtmllayout.h
@@ -33,7 +33,7 @@ namespace khtml
const int UNDEFINED = -1;
- // alignment
+ // tqalignment
enum VAlign { VNone=0, Bottom, VCenter, Top, Baseline };
enum HAlign { HDefault, Left, HCenter, Right, HNone = 0 };
@@ -103,7 +103,7 @@ namespace khtml
unsigned type : 3;
bool quirk : 1;
} l;
- Q_UINT32 _length;
+ TQ_UINT32 _length;
};
};
diff --git a/khtml/misc/knsplugininstaller.h b/khtml/misc/knsplugininstaller.h
index 0d9535ba9..0910a685b 100644
--- a/khtml/misc/knsplugininstaller.h
+++ b/khtml/misc/knsplugininstaller.h
@@ -87,7 +87,7 @@ private:
* This class contain all the the methods used to perform a plugin installation
*
*/
-class KNSPluginInstallEngine : public QObject
+class KNSPluginInstallEngine : public TQObject
{
Q_OBJECT
public:
diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp
index d6e463b02..3d9d7b531 100644
--- a/khtml/misc/loader.cpp
+++ b/khtml/misc/loader.cpp
@@ -144,7 +144,7 @@ void CachedObject::deref(CachedObjectClient *c)
assert( c );
assert( m_clients.count() );
assert( !canDelete() );
- assert( m_clients.find( c ) );
+ assert( m_clients.tqfind( c ) );
Cache::flush();
@@ -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)
- TQString ah = TQString::fromLatin1( accept );
+ TQString ah = TQString::tqfromLatin1( accept );
if ( !ah.isEmpty() )
ah += ",";
ah += "*/*;q=0.1";
@@ -327,7 +327,7 @@ 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( TQString::fromLatin1("*/*") );
+ setAccept( TQString::tqfromLatin1("*/*") );
// load the file
Cache::loader()->load(dl, this, false);
m_loading = true;
@@ -476,7 +476,7 @@ CachedImage::CachedImage(DocLoader* dl, const DOMString &url, KIO::CacheControl
pixPart = 0;
bg = 0;
scaled = 0;
- bgColor = qRgba( 0, 0, 0, 0xFF );
+ bgColor = tqRgba( 0, 0, 0, 0xFF );
typeChecked = false;
isFullyTransparent = false;
monochrome = false;
@@ -526,7 +526,7 @@ void CachedImage::deref( CachedObjectClient *c )
const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int xHeight)
{
- static QRgb bgTransparent = qRgba( 0, 0, 0, 0xFF );
+ static QRgb bgTransparent = tqRgba( 0, 0, 0, 0xFF );
TQSize s(pixmap_size());
int w = xWidth;
@@ -709,8 +709,8 @@ void CachedImage::movieStatus(int status)
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) &&
- im.colorTable()[i] != qRgb(0x00, 0x00, 0x00))
+ if (im.colorTable()[i] != tqRgb(0xff, 0xff, 0xff) &&
+ im.colorTable()[i] != tqRgb(0x00, 0x00, 0x00))
monochrome = false;
if( (im.width() < 5 || im.height() < 5) && im.hasAlphaBuffer()) // only evaluate for small images
{
@@ -816,7 +816,7 @@ void CachedImage::clear()
delete p; p = 0;
delete bg; bg = 0;
delete scaled; scaled = 0;
- bgColor = qRgba( 0, 0, 0, 0xff );
+ bgColor = tqRgba( 0, 0, 0, 0xff );
bgSize = TQSize(-1,-1);
delete pixPart; pixPart = 0;
@@ -981,7 +981,7 @@ void DocLoader::setExpireDate(time_t _expireDate, bool relative)
void DocLoader::insertCachedObject( CachedObject* o ) const
{
- if ( m_docObjects.find(o) )
+ if ( m_docObjects.tqfind(o) )
return;
m_docObjects.insert( o, o );
if ( m_docObjects.count() > 3 * m_docObjects.size() )
@@ -1167,7 +1167,7 @@ void Loader::servePendingRequests()
{
job->addMetaData( "cross-domain", part->toplevelURL().url() );
if (part->widget())
- job->setWindow (part->widget()->topLevelWidget());
+ job->setWindow (part->widget()->tqtopLevelWidget());
}
}
diff --git a/khtml/misc/loader.h b/khtml/misc/loader.h
index 4314e950e..e950f1767 100644
--- a/khtml/misc/loader.h
+++ b/khtml/misc/loader.h
@@ -405,7 +405,7 @@ namespace khtml
/**
* @internal
*/
- class Loader : public QObject
+ class Loader : public TQObject
{
Q_OBJECT
diff --git a/khtml/misc/loader_jpeg.cpp b/khtml/misc/loader_jpeg.cpp
index 57174fe1b..8c6404924 100644
--- a/khtml/misc/loader_jpeg.cpp
+++ b/khtml/misc/loader_jpeg.cpp
@@ -358,7 +358,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
} else if ( cinfo.output_components == 1 ) {
image.create( cinfo.output_width, cinfo.output_height, 8, 256 );
for (int i=0; i<256; i++)
- image.setColor(i, qRgb(i,i,i));
+ image.setColor(i, tqRgb(i,i,i));
}
#ifdef JPEG_DEBUG
@@ -431,7 +431,7 @@ again:
for (uint i=cinfo.output_width; i--; ) {
in-=3;
- out[i] = qRgb(in[0], in[1], in[2]);
+ out[i] = tqRgb(in[0], in[1], in[2]);
}
}
}
diff --git a/khtml/misc/loader_jpeg.h b/khtml/misc/loader_jpeg.h
index c97b2bcbf..87b18a8b5 100644
--- a/khtml/misc/loader_jpeg.h
+++ b/khtml/misc/loader_jpeg.h
@@ -35,7 +35,7 @@ namespace khtml
*
* An incremental loader factory for JPEG's.
*/
- class KJPEGFormatType : public QImageFormatType
+ class KJPEGFormatType : public TQImageFormatType
{
public:
TQImageFormat* decoderFor(const uchar* buffer, int length);
diff --git a/khtml/misc/multimap.h b/khtml/misc/multimap.h
index 125e8e07d..fbd883457 100644
--- a/khtml/misc/multimap.h
+++ b/khtml/misc/multimap.h
@@ -42,7 +42,7 @@ public:
typedef MultiMapPtrList<T> List;
void append(void* key, T* element) {
- List *list = dict.find(key);
+ List *list = dict.tqfind(key);
if (!list){
list = new List(8);
dict.insert(key, list);
@@ -50,7 +50,7 @@ public:
list->append(element);
}
void remove(void* key, T* element) {
- List *list = dict.find(key);
+ List *list = dict.tqfind(key);
if (list) {
list->remove(element);
if (list->isEmpty()) dict.remove(key);
@@ -60,7 +60,7 @@ public:
dict.remove(key);
}
List* find(void* key) {
- return dict.find(key);
+ return dict.tqfind(key);
}
private:
TQPtrDict<List> dict;
@@ -70,7 +70,7 @@ private:
static inline unsigned int stupidHash(void* ptr)
{
unsigned long val = (unsigned long)ptr;
- // remove alignment and multiply by a prime unlikely to be a factor of size
+ // remove tqalignment and multiply by a prime unlikely to be a factor of size
val = (val >> 4) * 1237;
return val;
}
diff --git a/khtml/misc/stringit.h b/khtml/misc/stringit.h
index 789f22af8..d56a78397 100644
--- a/khtml/misc/stringit.h
+++ b/khtml/misc/stringit.h
@@ -46,7 +46,7 @@ public:
DOMStringIt(TQChar *str, uint len)
{ s = str, l = len; lines = 0; }
DOMStringIt(const TQString &str)
- { s = str.unicode(); l = str.length(); lines = 0; }
+ { s = str.tqunicode(); l = str.length(); lines = 0; }
DOMStringIt *operator++()
{
@@ -85,13 +85,13 @@ class TokenizerSubstring
friend class TokenizerString;
public:
TokenizerSubstring() : m_length(0), m_current(0) {}
- TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
+ TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.tqunicode()) {}
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(TQString &str) const {
- if (m_string.unicode() == m_current) {
+ if (m_string.tqunicode() == m_current) {
if (str.isEmpty())
str = m_string;
else