summaryrefslogtreecommitdiffstats
path: root/parts/documentation/protocols
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/documentation/protocols
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/documentation/protocols')
-rw-r--r--parts/documentation/protocols/chm/chm.cpp38
-rw-r--r--parts/documentation/protocols/chm/chmfile.cpp8
-rw-r--r--parts/documentation/protocols/chm/decompress.cpp32
-rw-r--r--parts/documentation/protocols/chm/kchmpart.cpp10
-rw-r--r--parts/documentation/protocols/chm/kchmpart.h8
5 files changed, 49 insertions, 47 deletions
diff --git a/parts/documentation/protocols/chm/chm.cpp b/parts/documentation/protocols/chm/chm.cpp
index 1d7543c3..dbcbb07f 100644
--- a/parts/documentation/protocols/chm/chm.cpp
+++ b/parts/documentation/protocols/chm/chm.cpp
@@ -76,7 +76,7 @@ ChmProtocol::~ChmProtocol()
void ChmProtocol::get( const KURL& url )
{
/** When :catalog is appended to the end, a plain-text representation of the catalog
- * is given out where each entry consists of four lines, an integer representing the parent
+ * is given out where each entry consists of four lines, an integer representing the tqparent
* of the node, an integer representing a node's ID, the Title of the Node, and it's hyperlink.
* When :contents is appended, all contained htm- and html-files will be printed, each in a line.
*/
@@ -105,7 +105,7 @@ void ChmProtocol::get( const KURL& url )
}
- if (m_dirMap.find(path) == m_dirMap.end()) {
+ if (m_dirMap.tqfind(path) == m_dirMap.end()) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return;
}
@@ -178,25 +178,25 @@ void ChmProtocol::get( const KURL& url )
TQRegExp mergeParam("<param name=\"Merge\" value=\"(.*)\">", false);
mergeParam.setMinimal(true);
- std::stack<int> parents;
+ std::stack<int> tqparents;
int counter = 1;
int current = 0;
int old = 0, pos = 0;
- parents.push(0);
- while ((pos = s.find(object, pos)) != -1) {
+ tqparents.push(0);
+ while ((pos = s.tqfind(object, pos)) != -1) {
if(htmlOutput) output += s.mid(old, pos - old);
if(catalog) {
TQRegExp ex("<UL>|</UL>", false); ex.setMinimal(true);
TQString ms = s.mid(old, pos - old);
int pos = 0;
- while( (pos = ms.find(ex, pos)) != -1) {
+ while( (pos = ms.tqfind(ex, pos)) != -1) {
if(ms.mid(pos, 4) == "<UL>") {
- parents.push(current);
+ tqparents.push(current);
} else{
- if(parents.empty()){
+ if(tqparents.empty()){
}else{
- current = parents.top();
- parents.pop();
+ current = tqparents.top();
+ tqparents.pop();
}
}
pos++;
@@ -206,9 +206,9 @@ void ChmProtocol::get( const KURL& url )
old = pos;
TQString obj = object.cap(1);
TQString name, local;
- if (obj.find(nameParam) != -1) {
+ if (obj.tqfind(nameParam) != -1) {
name = nameParam.cap(1);
- if (obj.find(localParam) != -1) {
+ if (obj.tqfind(localParam) != -1) {
local = localParam.cap(1);
//output += "<a href=\"" + local + "\">" + name + "</a>";
//added by lucida lucida@users.sf.net
@@ -221,7 +221,7 @@ void ChmProtocol::get( const KURL& url )
KURL u = url;
u.setPath(bigpath + local);
TQString str;
- output += str.sprintf("%i\n%i\n", parents.top(), current);
+ output += str.sprintf("%i\n%i\n", tqparents.top(), current);
output += name + "\n" + u.prettyURL() + "\n";
}
m_bIndex = 1;
@@ -233,10 +233,10 @@ void ChmProtocol::get( const KURL& url )
if(htmlOutput) output += name;
}
}
- if (obj.find(mergeParam) != -1 && htmlOutput) {
+ if (obj.tqfind(mergeParam) != -1 && htmlOutput) {
TQString link = mergeParam.cap(1);
- TQString href = link.left(link.find("::"));
- TQString path = m_chmFile.left(m_chmFile.findRev("/") + 1);
+ TQString href = link.left(link.tqfind("::"));
+ TQString path = m_chmFile.left(m_chmFile.tqfindRev("/") + 1);
//output += " (<a href=\"" + path + href + "\">link</a>)";
m_bIndex = 1;
output += " (<a target=\"browse\" href=\"" + url.url() + path + href + "\">link</a>)";
@@ -301,7 +301,7 @@ bool ChmProtocol::checkNewFile( TQString fullPath, TQString& path )
{
//kdDebug() << "ChmProtocol::checkNewFile " << fullPath << endl;
- fullPath = fullPath.replace(TQRegExp("::"), "");
+ fullPath = fullPath.tqreplace(TQRegExp("::"), "");
// Are we already looking at that file ?
if ( !m_chmFile.isEmpty() && fullPath.startsWith(m_chmFile) )
@@ -324,7 +324,7 @@ bool ChmProtocol::checkNewFile( TQString fullPath, TQString& path )
fullPath += '/';
//kdDebug() << "the full path is " << fullPath << endl;
- while ( (pos=fullPath.find( '/', pos+1 )) != -1 )
+ while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 )
{
TQString tryPath = fullPath.left( pos );
//kdDebug() << fullPath << " trying " << tryPath << endl;
@@ -342,7 +342,7 @@ bool ChmProtocol::checkNewFile( TQString fullPath, TQString& path )
}
else
{
- path = TQString::fromLatin1("/");
+ path = TQString::tqfromLatin1("/");
}
kdDebug() << "Found. chmFile=" << chmFile << " path=" << path << endl;
break;
diff --git a/parts/documentation/protocols/chm/chmfile.cpp b/parts/documentation/protocols/chm/chmfile.cpp
index 43ae8877..2d705b8e 100644
--- a/parts/documentation/protocols/chm/chmfile.cpp
+++ b/parts/documentation/protocols/chm/chmfile.cpp
@@ -66,7 +66,7 @@ bool Chm::getChunk(TQFile& f, uint chunkSize, ChmDirectoryMap& directoryMap) con
char tag[4];
if (f.readBlock(tag, 4) != 4) return false;
- if (!qstrncmp(tag, "PMGL", 4))
+ if (!tqstrncmp(tag, "PMGL", 4))
{
uint quickref_length = getIntel32(f);
f.at(f.at() + 12);
@@ -87,7 +87,7 @@ bool Chm::getChunk(TQFile& f, uint chunkSize, ChmDirectoryMap& directoryMap) con
return (f.at(f.at() + quickref_length));
}
- else if (!qstrncmp(tag, "PMGI", 4))
+ else if (!tqstrncmp(tag, "PMGI", 4))
{
// evaluation of the index chunk is not yet implemented => skip it
return f.at(f.at() + chunkSize - 4);
@@ -105,7 +105,7 @@ bool Chm::read(const TQString& fileSpec, ChmDirectoryMap& dirMap, TQByteArray& c
// read CHM file header
char tag[4];
- if (f.readBlock(tag, 4) != 4 || qstrncmp(tag, "ITSF", 4)) return false;
+ if (f.readBlock(tag, 4) != 4 || tqstrncmp(tag, "ITSF", 4)) return false;
uint chm_version = getIntel32(f);
if (!f.at(f.at() + 0x30)) return false;
@@ -120,7 +120,7 @@ bool Chm::read(const TQString& fileSpec, ChmDirectoryMap& dirMap, TQByteArray& c
// read directory header
if (!f.at(section_1_offset)) return false;
- if (f.readBlock(tag, 4) != 4 || qstrncmp(tag, "ITSP", 4)) return false;
+ if (f.readBlock(tag, 4) != 4 || tqstrncmp(tag, "ITSP", 4)) return false;
if (!f.at(f.at() + 12)) return false;
uint directory_chunk_size = getIntel32(f);
if (!f.at(f.at() + 24)) return false;
diff --git a/parts/documentation/protocols/chm/decompress.cpp b/parts/documentation/protocols/chm/decompress.cpp
index b8f45ae2..212eb244 100644
--- a/parts/documentation/protocols/chm/decompress.cpp
+++ b/parts/documentation/protocols/chm/decompress.cpp
@@ -121,7 +121,7 @@ struct
* The LZX document does not state the uncompressed block has an
* uncompressed length field. Where does this length field come from, so
* we can know how large the block is? The implementation has it as the 24
- * bits following after the 3 blocktype bits, before the alignment
+ * bits following after the 3 blocktype bits, before the tqalignment
* padding.
*
* The LZX document states that aligned offset blocks have their aligned
@@ -228,7 +228,7 @@ int LZXinit(int window) {
* REMOVE_BITS(n) removes N bits from the bit buffer
*
* These bit access routines work by using the area beyond the MSB and the
- * LSB as a free source of zeroes. This avoids having to mask any bits.
+ * LSB as a free source of zeroes. This avoids having to tqmask any bits.
* So we have to know the bit width of the bitbuffer variable. This is
* sizeof(ULONG) * 8, also defined as ULONG_BITS
*/
@@ -328,9 +328,9 @@ int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) {
register UBYTE bit_num = 1;
ULONG fill;
ULONG pos = 0; /* the current position in the decode table */
- ULONG table_mask = 1 << nbits;
- ULONG bit_mask = table_mask >> 1; /* don't do 0 length codes */
- ULONG next_symbol = bit_mask; /* base of allocation for long codes */
+ ULONG table_tqmask = 1 << nbits;
+ ULONG bit_tqmask = table_tqmask >> 1; /* don't do 0 length codes */
+ ULONG next_symbol = bit_tqmask; /* base of allocation for long codes */
/* fill entries for codes short enough for a direct mapping */
while (bit_num <= nbits)
@@ -341,27 +341,27 @@ int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) {
{
leaf = pos;
- if ((pos += bit_mask) > table_mask) return 1; /* table overrun */
+ if ((pos += bit_tqmask) > table_tqmask) return 1; /* table overrun */
/* fill all possible lookups of this symbol with the symbol itself */
- fill = bit_mask;
+ fill = bit_tqmask;
while (fill-- > 0) table[leaf++] = sym;
}
}
- bit_mask >>= 1;
+ bit_tqmask >>= 1;
bit_num++;
}
/* if there are any codes longer than nbits */
- if (pos != table_mask)
+ if (pos != table_tqmask)
{
/* clear the remainder of the table */
- for (sym = pos; sym < table_mask; sym++) table[sym] = 0;
+ for (sym = pos; sym < table_tqmask; sym++) table[sym] = 0;
/* give ourselves room for codes to grow by up to 16 more bits */
pos <<= 16;
- table_mask <<= 16;
- bit_mask = 1 << 15;
+ table_tqmask <<= 16;
+ bit_tqmask = 1 << 15;
while (bit_num <= 16)
{
@@ -385,16 +385,16 @@ int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) {
}
table[leaf] = sym;
- if ((pos += bit_mask) > table_mask) return 1; /* table overflow */
+ if ((pos += bit_tqmask) > table_tqmask) return 1; /* table overflow */
}
}
- bit_mask >>= 1;
+ bit_tqmask >>= 1;
bit_num++;
}
}
/* full table? */
- if (pos == table_mask) return 0;
+ if (pos == table_tqmask) return 0;
/* either erroneous table, or all elements are 0 - let's find out. */
for (sym = 0; sym < nsyms; sym++) if (length[sym]) return 1;
@@ -555,7 +555,7 @@ int LZXdecompress(UBYTE* inpos, int inlen, UBYTE* outpos, int outlen) {
togo -= this_run;
LZX(block_remaining) -= this_run;
- /* apply 2^x-1 mask */
+ /* apply 2^x-1 tqmask */
window_posn &= window_size - 1;
/* runs can't straddle the window wraparound */
if ((window_posn + this_run) > window_size)
diff --git a/parts/documentation/protocols/chm/kchmpart.cpp b/parts/documentation/protocols/chm/kchmpart.cpp
index b1d9d166..7b91c7fc 100644
--- a/parts/documentation/protocols/chm/kchmpart.cpp
+++ b/parts/documentation/protocols/chm/kchmpart.cpp
@@ -35,8 +35,8 @@ extern "C"
KInstance* KChmPartFactory::s_instance = 0L;
KAboutData* KChmPartFactory::s_about = 0L;
-KChmPartFactory::KChmPartFactory( TQObject* parent, const char* name )
- : KParts::Factory( parent, name )
+KChmPartFactory::KChmPartFactory( TQObject* tqparent, const char* name )
+ : KParts::Factory( tqparent, name )
{
}
@@ -47,10 +47,10 @@ KChmPartFactory::~KChmPartFactory()
delete s_about;
}
-KParts::Part* KChmPartFactory::createPartObject( TQWidget *parentWidget, const char *, TQObject *,
+KParts::Part* KChmPartFactory::createPartObject( TQWidget *tqparentWidget, const char *, TQObject *,
const char *name, const char *, const TQStringList & )
{
- KChmPart* part = new KChmPart( parentWidget, name );
+ KChmPart* part = new KChmPart( tqparentWidget, name );
return part;
}
@@ -66,7 +66,7 @@ KInstance* KChmPartFactory::instance()
}
-KChmPart::KChmPart( TQWidget * parent, const char * name )
+KChmPart::KChmPart( TQWidget * tqparent, const char * name )
: KDevHTMLPart( ), m_job(0)
{
KInstance * instance = new KInstance( "kchmpart" );
diff --git a/parts/documentation/protocols/chm/kchmpart.h b/parts/documentation/protocols/chm/kchmpart.h
index 023f8ed9..37bb4695 100644
--- a/parts/documentation/protocols/chm/kchmpart.h
+++ b/parts/documentation/protocols/chm/kchmpart.h
@@ -33,13 +33,14 @@ class KAboutData;
class KChmPartFactory: public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KChmPartFactory( TQObject *parent = 0, const char *name = 0 );
+ KChmPartFactory( TQObject *tqparent = 0, const char *name = 0 );
virtual ~KChmPartFactory();
virtual KParts::Part* createPartObject(
- TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+ TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const char *classname, const TQStringList &args );
static KInstance *instance();
@@ -54,6 +55,7 @@ class KChmPartFactory: public KParts::Factory
class KChmPart : public KDevHTMLPart
{
Q_OBJECT
+ TQ_OBJECT
public:
KChmPart( TQWidget *, const char * = 0 );
KParts::BrowserExtension * extension() { return m_extension; }