diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
commit | 0a80cfd57d271dd44221467efb426675fa470356 (patch) | |
tree | 6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/ext | |
parent | 3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff) | |
download | kvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip |
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/ext')
43 files changed, 1146 insertions, 1146 deletions
diff --git a/src/kvilib/ext/kvi_accel.h b/src/kvilib/ext/kvi_accel.h index 34cca3c1..1014b2cb 100644 --- a/src/kvilib/ext/kvi_accel.h +++ b/src/kvilib/ext/kvi_accel.h @@ -28,11 +28,11 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include <q3accel.h> + #include <tq3accel.h> #define KviAccel Q3Accel #else - #include <qaccel.h> - #define KviAccel QAccel + #include <tqaccel.h> + #define KviAccel TQAccel #endif #endif //!_KVI_ACCEL_H_ diff --git a/src/kvilib/ext/kvi_cmdformatter.cpp b/src/kvilib/ext/kvi_cmdformatter.cpp index e2b3e1f6..153557b2 100644 --- a/src/kvilib/ext/kvi_cmdformatter.cpp +++ b/src/kvilib/ext/kvi_cmdformatter.cpp @@ -50,10 +50,10 @@ namespace KviCommandFormatter return bGotIt; } - bool hasLeadingChars(QStringList &list,const QChar &c) + bool hasLeadingChars(TQStringList &list,const TQChar &c) { bool bGotIt = false; - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { if((*it).length() < 1)continue; if((*it).at(0) == c) @@ -62,7 +62,7 @@ namespace KviCommandFormatter bGotIt = true; } else { // we pretend this line to be empty - QString tmp = *it; + TQString tmp = *it; #ifdef COMPILE_USE_QT4 tmp = tmp.trimmed(); #else @@ -84,9 +84,9 @@ namespace KviCommandFormatter } } - void trimLeading(QStringList &list) + void trimLeading(TQStringList &list) { - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { (*it).remove(0,1); } @@ -102,9 +102,9 @@ namespace KviCommandFormatter } } - void addLeading(QStringList &list,const QChar & c) + void addLeading(TQStringList &list,const TQChar & c) { - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { (*it).prepend(c); } @@ -125,21 +125,21 @@ namespace KviCommandFormatter } - void unindent(QString &buffer) + void unindent(TQString &buffer) { #ifdef COMPILE_USE_QT4 - QStringList list = buffer.split("\n",QString::KeepEmptyParts); + TQStringList list = buffer.split("\n",TQString::KeepEmptyParts); #else - QStringList list = QStringList::split("\n",buffer,true); + TQStringList list = TQStringList::split("\n",buffer,true); #endif - while(hasLeadingChars(list,QChar('\t')) || hasLeadingChars(list,QChar(' ')))trimLeading(list); + while(hasLeadingChars(list,TQChar('\t')) || hasLeadingChars(list,TQChar(' ')))trimLeading(list); //buffer = list.join("\n"); join implementation sux :D // we WANT the last newline buffer = ""; - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { buffer.append(*it); - buffer.append(QChar('\n')); + buffer.append(TQChar('\n')); } } @@ -160,7 +160,7 @@ namespace KviCommandFormatter buffer.stripWhiteSpace(); } - void bufferFromBlock(QString &buffer) + void bufferFromBlock(TQString &buffer) { #ifdef COMPILE_USE_QT4 buffer = buffer.trimmed(); @@ -170,11 +170,11 @@ namespace KviCommandFormatter if(buffer.isEmpty())return; - if((buffer.at(0) == QChar('{')) && buffer.endsWith(QChar('}'))) + if((buffer.at(0) == TQChar('{')) && buffer.endsWith(TQChar('}'))) { buffer.remove(0,1); buffer.remove(buffer.length() - 1,1); - while((buffer.length() > 0) && ((buffer.at(0) == QChar('\n')) || (buffer.at(0) == QChar('\r')))) + while((buffer.length() > 0) && ((buffer.at(0) == TQChar('\n')) || (buffer.at(0) == TQChar('\r')))) buffer.remove(0,1); } @@ -201,21 +201,21 @@ namespace KviCommandFormatter } } - void indent(QString &buffer) + void indent(TQString &buffer) { #ifdef COMPILE_USE_QT4 - QStringList list = buffer.split("\n",QString::KeepEmptyParts); + TQStringList list = buffer.split("\n",TQString::KeepEmptyParts); #else - QStringList list = QStringList::split("\n",buffer,true); + TQStringList list = TQStringList::split("\n",buffer,true); #endif - addLeading(list,QChar('\t')); + addLeading(list,TQChar('\t')); //buffer = list.join("\n"); join implementation sux :D // we WANT the last newline buffer = ""; - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { buffer.append(*it); - buffer.append(QChar('\n')); + buffer.append(TQChar('\n')); } } @@ -229,12 +229,12 @@ namespace KviCommandFormatter buffer.append("}\n"); } - void blockFromBuffer(QString &buffer) + void blockFromBuffer(TQString &buffer) { indent(buffer); buffer.prepend("{\n"); - KviQString::stripRightWhiteSpace(buffer); - KviQString::ensureLastCharIs(buffer,'\n'); + KviTQString::stripRightWhiteSpace(buffer); + KviTQString::ensureLastCharIs(buffer,'\n'); buffer.append("}\n"); } }; diff --git a/src/kvilib/ext/kvi_cmdformatter.h b/src/kvilib/ext/kvi_cmdformatter.h index b6efa98b..043a6ec1 100644 --- a/src/kvilib/ext/kvi_cmdformatter.h +++ b/src/kvilib/ext/kvi_cmdformatter.h @@ -29,36 +29,36 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include <qstringlist.h> +#include <tqstringlist.h> namespace KviCommandFormatter { extern KVILIB_API bool hasLeadingChars(KviStr * array,char c); - extern KVILIB_API bool hasLeadingChars(QStringList &list,const QChar &c); + extern KVILIB_API bool hasLeadingChars(TQStringList &list,const TQChar &c); extern KVILIB_API void trimLeading(KviStr ** array); - extern KVILIB_API void trimLeading(QStringList &list); + extern KVILIB_API void trimLeading(TQStringList &list); extern KVILIB_API void addLeading(KviStr ** array,char c); - extern KVILIB_API void addLeading(QStringList &list,const QChar &c); + extern KVILIB_API void addLeading(TQStringList &list,const TQChar &c); extern KVILIB_API void trimBlockBraces(KviStr &buffer); - extern KVILIB_API void trimBlockBraces(QString &buffer); + extern KVILIB_API void trimBlockBraces(TQString &buffer); extern KVILIB_API void unindent(KviStr &buffer); - extern KVILIB_API void unindent(QString &buffer); + extern KVILIB_API void unindent(TQString &buffer); extern KVILIB_API void bufferFromBlock(KviStr &buffer); - extern KVILIB_API void bufferFromBlock(QString &buffer); + extern KVILIB_API void bufferFromBlock(TQString &buffer); extern KVILIB_API void addBlockBraces(KviStr &buffer); - extern KVILIB_API void addBlockBraces(QString &buffer); + extern KVILIB_API void addBlockBraces(TQString &buffer); extern KVILIB_API void indent(KviStr &buffer); - extern KVILIB_API void indent(QString &buffer); + extern KVILIB_API void indent(TQString &buffer); extern KVILIB_API void blockFromBuffer(KviStr &buffer); - extern KVILIB_API void blockFromBuffer(QString &buffer); + extern KVILIB_API void blockFromBuffer(TQString &buffer); }; #endif //_KVI_CMDFORMATTER_H_ diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp index eb3dc0bc..c0eb124e 100644 --- a/src/kvilib/ext/kvi_config.cpp +++ b/src/kvilib/ext/kvi_config.cpp @@ -34,7 +34,7 @@ #include "kvi_file.h" -KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit) +KviConfig::KviConfig(const TQString &filename,FileMode f,bool bLocal8Bit) { m_bLocal8Bit = bLocal8Bit; m_szFileName = filename; @@ -42,7 +42,7 @@ KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit) m_szGroup = KVI_CONFIG_DEFAULT_GROUP; m_bPreserveEmptyGroups = false; m_bReadOnly = (f == KviConfig::Read); - m_pDict = new KviPointerHashTable<QString,KviConfigGroup>(17,false); + m_pDict = new KviPointerHashTable<TQString,KviConfigGroup>(17,false); m_pDict->setAutoDelete(true); if(f != KviConfig::Write)load(); } @@ -50,12 +50,12 @@ KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit) KviConfig::KviConfig(const char* filename,FileMode f,bool bLocal8Bit) { m_bLocal8Bit = bLocal8Bit; - m_szFileName = QString::fromUtf8(filename); + m_szFileName = TQString::fromUtf8(filename); m_bDirty = false; m_szGroup = KVI_CONFIG_DEFAULT_GROUP; m_bPreserveEmptyGroups = false; m_bReadOnly = (f == KviConfig::Read); - m_pDict = new KviPointerHashTable<QString,KviConfigGroup>(17,false); + m_pDict = new KviPointerHashTable<TQString,KviConfigGroup>(17,false); m_pDict->setAutoDelete(true); if(f != KviConfig::Write)load(); } @@ -70,20 +70,20 @@ KviConfig::~KviConfig() void KviConfig::clear() { delete m_pDict; - m_pDict = new KviPointerHashTable<QString,KviConfigGroup>(17,false); + m_pDict = new KviPointerHashTable<TQString,KviConfigGroup>(17,false); m_pDict->setAutoDelete(true); m_bDirty = false; m_szGroup = KVI_CONFIG_DEFAULT_GROUP; } -void KviConfig::clearGroup(const QString & szGroup) +void KviConfig::clearGroup(const TQString & szGroup) { m_bDirty = true; m_pDict->remove(szGroup); - if(!m_pDict->find(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one + if(!m_pDict->tqfind(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one } -void KviConfig::clearKey(const QString & szKey) +void KviConfig::clearKey(const TQString & szKey) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); @@ -99,13 +99,13 @@ void KviConfig::getContentsString(KviStr &buffer) buffer.append('\n'); int sections = 0; int keys = 0; - KviPointerHashTableIterator<QString,KviStrDict> it(*m_pDict); + KviPointerHashTableIterator<TQString,KviStrDict> it(*m_pDict); while(it.current()){ buffer.append(" Section ["); buffer.append(it.currentKey()); buffer.append("]\n"); int sectionKeys = 0; - KviPointerHashTableIterator<QString,KviStr> it2(*it.current()); + KviPointerHashTableIterator<TQString,KviStr> it2(*it.current()); while(it2.current()){ buffer.append(" Key ["); buffer.append(it2.currentKey()); @@ -279,10 +279,10 @@ bool KviConfig::load() if(!tmp.isEmpty()) { - QString szGroup = m_bLocal8Bit ? - QString::fromLocal8Bit(tmp.ptr(),tmp.len()) : - QString::fromUtf8(tmp.ptr(),tmp.len()); - p_group = m_pDict->find(szGroup); + TQString szGroup = m_bLocal8Bit ? + TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) : + TQString::fromUtf8(tmp.ptr(),tmp.len()); + p_group = m_pDict->tqfind(szGroup); if(!p_group) { p_group = new KviConfigGroup(17,false); @@ -304,17 +304,17 @@ bool KviConfig::load() tmp.stripRightWhiteSpace(); // No external spaces at all in keys if(!tmp.isEmpty()) { - QString szKey = m_bLocal8Bit ? - QString::fromLocal8Bit(tmp.ptr(),tmp.len()) : - QString::fromUtf8(tmp.ptr(),tmp.len()); + TQString szKey = m_bLocal8Bit ? + TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) : + TQString::fromUtf8(tmp.ptr(),tmp.len()); z++; while(*z && ((*z == ' ') || (*z == '\t')))z++; if(*z) { tmp.hexDecode(z); - QString * pVal = new QString( m_bLocal8Bit ? - QString::fromLocal8Bit(tmp.ptr(),tmp.len()) : - QString::fromUtf8(tmp.ptr(),tmp.len()) + TQString * pVal = new TQString( m_bLocal8Bit ? + TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) : + TQString::fromUtf8(tmp.ptr(),tmp.len()) ); if(!p_group) { @@ -324,13 +324,13 @@ bool KviConfig::load() p_group->setAutoDelete(true); m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group); } - p_group->replace(szKey,pVal); + p_group->tqreplace(szKey,pVal); } else { // we in fact need this (mercy :D) // otherwise the empty options will be treated as non-existing ones // and will get the defaults (which is bad) - QString * pVal = new QString(QString::null); - p_group->replace(szKey,pVal); + TQString * pVal = new TQString(TQString()); + p_group->tqreplace(szKey,pVal); } } } @@ -362,7 +362,7 @@ bool KviConfig::load() bool KviConfig::load() { - QFile f(m_szFileName); + TQFile f(m_szFileName); if(!f.open(IO_ReadOnly))return false; @@ -389,8 +389,8 @@ bool KviConfig::load() dataLine.hexDecode(); if(dataLine.hasData()) { - QString szUtf8 = QString::fromUtf8(dataLine.ptr()); - p_group = m_pDict->find(szUtf8); + TQString szUtf8 = TQString::fromUtf8(dataLine.ptr()); + p_group = m_pDict->tqfind(szUtf8); if(!p_group) { @@ -412,7 +412,7 @@ bool KviConfig::load() dataLine.stripLeftWhiteSpace(); // strip any whitespace added externally dataLine.hexDecode(); //insert (replace items if needed) - QString *p_data=new QString(QString::fromUtf8(dataLine.ptr())); + TQString *p_data=new TQString(TQString::fromUtf8(dataLine.ptr())); if(!p_group) { // ops...we're missing a group @@ -421,8 +421,8 @@ bool KviConfig::load() p_group->setAutoDelete(true); m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group); } - QString szName = QString::fromUtf8(name.ptr()); - p_group->replace(szName,p_data); + TQString szName = TQString::fromUtf8(name.ptr()); + p_group->tqreplace(szName,p_data); } } break; @@ -497,12 +497,12 @@ bool KviConfig::save() if(!f.openForWriting())return false; if(f.writeBlock("# KVIrc configuration file\n",27) != 27)return false; - KviPointerHashTableIterator<QString,KviConfigGroup> it(*m_pDict); + KviPointerHashTableIterator<TQString,KviConfigGroup> it(*m_pDict); while (it.current()) { if((it.current()->count() != 0) || (m_bPreserveEmptyGroups)) { - KviStr group(m_bLocal8Bit ? KviQString::toLocal8Bit(it.currentKey()) : KviQString::toUtf8(it.currentKey())); + KviStr group(m_bLocal8Bit ? KviTQString::toLocal8Bit(it.currentKey()) : KviTQString::toUtf8(it.currentKey())); group.hexEncodeWithTable(encode_table); if(!f.putChar('['))return false; @@ -513,10 +513,10 @@ bool KviConfig::save() KviConfigGroupIterator it2(*dict); KviStr szName,szValue; - while(QString * p_str = it2.current()) + while(TQString * p_str = it2.current()) { - szName = m_bLocal8Bit ? KviQString::toLocal8Bit(it2.currentKey()) : KviQString::toUtf8(it2.currentKey()); - szValue = m_bLocal8Bit ? KviQString::toLocal8Bit(*p_str) : KviQString::toUtf8(*p_str); + szName = m_bLocal8Bit ? KviTQString::toLocal8Bit(it2.currentKey()) : KviTQString::toUtf8(it2.currentKey()); + szValue = m_bLocal8Bit ? KviTQString::toLocal8Bit(*p_str) : KviTQString::toUtf8(*p_str); szName.hexEncodeWithTable(encode_table); szValue.hexEncodeWhiteSpace(); @@ -534,7 +534,7 @@ bool KviConfig::save() return true; } -void KviConfig::setGroup(const QString & szGroup) +void KviConfig::setGroup(const TQString & szGroup) { m_szGroup = szGroup; if(m_bPreserveEmptyGroups) @@ -547,21 +547,21 @@ void KviConfig::setGroup(const QString & szGroup) } } -bool KviConfig::hasKey(const QString & szKey) +bool KviConfig::hasKey(const TQString & szKey) { KviConfigGroup * p_group = getCurrentGroup(); - return (p_group->find(szKey) != 0); + return (p_group->tqfind(szKey) != 0); } -bool KviConfig::hasGroup(const QString & szGroup) +bool KviConfig::hasGroup(const TQString & szGroup) { - return (m_pDict->find(szGroup) != 0); + return (m_pDict->tqfind(szGroup) != 0); } KviConfigGroup * KviConfig::getCurrentGroup() { if(m_szGroup.isEmpty())m_szGroup = KVI_CONFIG_DEFAULT_GROUP; - KviConfigGroup * p_group = m_pDict->find(m_szGroup); + KviConfigGroup * p_group = m_pDict->tqfind(m_szGroup); if(!p_group) { //create the group @@ -574,20 +574,20 @@ KviConfigGroup * KviConfig::getCurrentGroup() ////////////////////////////////// KviStr -void KviConfig::writeEntry(const QString & szKey,const QString & szValue) +void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data=new QString(szValue); - p_group->replace(szKey,p_data); + TQString *p_data=new TQString(szValue); + p_group->tqreplace(szKey,p_data); } // FIXME: #warning "We have probs here ?" -QString KviConfig::readEntry(const QString & szKey,const QString & szDefault) +TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str) { m_szStrBuffer = szDefault; @@ -597,72 +597,72 @@ QString KviConfig::readEntry(const QString & szKey,const QString & szDefault) return m_szStrBuffer; } -//////////////////////////////////// QString +//////////////////////////////////// TQString /* -QString KviConfig::readQStringEntry(const char *szKey,const QString &szDefault) +TQString KviConfig::readTQStringEntry(const char *szKey,const TQString &szDefault) { KviStrDict * p_group = getCurrentGroup(); - KviStr * p_str = p_group->find(szKey); + KviStr * p_str = p_group->tqfind(szKey); if(!p_str)return szDefault; - return QString::fromUtf8(p_str->ptr()); + return TQString::fromUtf8(p_str->ptr()); } */ /* -void KviConfig::writeEntry(const char *szKey,const QString &szValue) +void KviConfig::writeEntry(const char *szKey,const TQString &szValue) { m_bDirty = true; KviStrDict * p_group = getCurrentGroup(); - p_group->replace(szKey,new KviStr(szValue.utf8().data())); + p_group->tqreplace(szKey,new KviStr(szValue.utf8().data())); } */ -////////////////////////////////// QStringList +////////////////////////////////// TQStringList -static QString g_szConfigStringListSeparator(",\\[ITEM],"); +static TQString g_szConfigStringListSeparator(",\\[ITEM],"); -QStringList KviConfig::readStringListEntry(const QString & szKey,const QStringList &list) +TQStringList KviConfig::readStringListEntry(const TQString & szKey,const TQStringList &list) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return list; #ifdef COMPILE_USE_QT4 return p_str->split(g_szConfigStringListSeparator); #else - return QStringList::split(g_szConfigStringListSeparator,*p_str); + return TQStringList::split(g_szConfigStringListSeparator,*p_str); #endif } -void KviConfig::writeEntry(const QString & szKey,const QStringList &list) +void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data=new QString(list.join(g_szConfigStringListSeparator)); - p_group->replace(szKey,p_data); + TQString *p_data=new TQString(list.join(g_szConfigStringListSeparator)); + p_group->tqreplace(szKey,p_data); } ////////////////////////////////// KviValueList<int> -KviValueList<int> KviConfig::readIntListEntry(const QString & szKey,const KviValueList<int> &list) +KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviValueList<int> &list) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str) { //debug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1()); return list; } #ifdef COMPILE_USE_QT4 - QStringList sl = p_str->split(","); + TQStringList sl = p_str->split(","); #else - QStringList sl = QStringList::split(",",*p_str); + TQStringList sl = TQStringList::split(",",*p_str); #endif KviValueList<int> ret; //debug("Got option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),p_str->latin1()); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { bool bOk; int iTmp = (*it).toInt(&bOk); @@ -673,7 +673,7 @@ KviValueList<int> KviConfig::readIntListEntry(const QString & szKey,const KviVal } -void KviConfig::writeEntry(const QString & szKey,const KviValueList<int> &list) +void KviConfig::writeEntry(const TQString & szKey,const KviValueList<int> &list) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); @@ -685,26 +685,26 @@ void KviConfig::writeEntry(const QString & szKey,const KviValueList<int> &list) } //debug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr()); - p_group->replace(szKey,new QString(szData.ptr())); + p_group->tqreplace(szKey,new TQString(szData.ptr())); } ////////////////////////////////// KviPixmap // FIXME: #warning "Spaces in image names ?" -void KviConfig::writeEntry(const QString & szKey,const KviPixmap &pixmap) +void KviConfig::writeEntry(const TQString & szKey,const KviPixmap &pixmap) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data=new QString(); + TQString *p_data=new TQString(); KviStringConversion::toString(pixmap,*p_data); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -KviPixmap KviConfig::readPixmapEntry(const QString & szKey,const KviPixmap &pixDef) +KviPixmap KviConfig::readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(p_str) { KviPixmap ret(""); @@ -716,40 +716,40 @@ KviPixmap KviConfig::readPixmapEntry(const QString & szKey,const KviPixmap &pixD ////////////////////////////////// KviMsgType -void KviConfig::writeEntry(const QString & szKey,const KviMsgType &msg) +void KviConfig::writeEntry(const TQString & szKey,const KviMsgType &msg) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString szData; + TQString szData; KviStringConversion::toString(msg,szData); - p_group->replace(szKey,new QString(szData)); + p_group->tqreplace(szKey,new TQString(szData)); } -KviMsgType KviConfig::readMsgTypeEntry(const QString & szKey,const KviMsgType &msgDef) +KviMsgType KviConfig::readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return msgDef; KviMsgType ret = msgDef; KviStringConversion::fromString(*p_str,ret); return ret; } -////////////////////////////////// QColor +////////////////////////////////// TQColor -void KviConfig::writeEntry(const QString & szKey,const QColor &clr) +void KviConfig::writeEntry(const TQString & szKey,const TQColor &clr) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); KviStr szData(KviStr::Format,"%d,%d,%d",clr.red(),clr.green(),clr.blue()); - p_group->replace(szKey,new QString(szData.ptr())); + p_group->tqreplace(szKey,new TQString(szData.ptr())); } -QColor KviConfig::readColorEntry(const QString & szKey,const QColor &clr) +TQColor KviConfig::readColorEntry(const TQString & szKey,const TQColor &clr) { KviConfigGroup * p_group = getCurrentGroup(); - QColor color(clr); - QString * pointer_that_IS_initialized = p_group->find(szKey); + TQColor color(clr); + TQString * pointer_that_IS_initialized = p_group->tqfind(szKey); if(pointer_that_IS_initialized) @@ -778,35 +778,35 @@ QColor KviConfig::readColorEntry(const QString & szKey,const QColor &clr) return color; } -////////////////////////////////// QFont +////////////////////////////////// TQFont -void KviConfig::getFontProperties(KviStr & buffer,QFont *fnt) +void KviConfig::getFontProperties(KviStr & buffer,TQFont *fnt) { - QString tmp; + TQString tmp; KviStringConversion::toString(*fnt,tmp); buffer = tmp; } -void KviConfig::writeEntry(const QString & szKey,QFont &fnt) +void KviConfig::writeEntry(const TQString & szKey,TQFont &fnt) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); KviStringConversion::toString(fnt,*p_data); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -void KviConfig::setFontProperties(KviStr & str,QFont *fnt) +void KviConfig::setFontProperties(KviStr & str,TQFont *fnt) { KviStringConversion::fromString(str.ptr(),*fnt); } -QFont KviConfig::readFontEntry(const QString & szKey,const QFont &fnt) +TQFont KviConfig::readFontEntry(const TQString & szKey,const TQFont &fnt) { - QFont font(fnt); + TQFont font(fnt); KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(p_str) { //FontEntry=Arial,12,9,0,100,italic,underline,strikeout, @@ -819,58 +819,58 @@ QFont KviConfig::readFontEntry(const QString & szKey,const QFont &fnt) ////////////////////////////////// bool -void KviConfig::writeEntry(const QString & szKey,bool bTrue) +void KviConfig::writeEntry(const TQString & szKey,bool bTrue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(bTrue ? "true" : "false"); - p_group->replace(szKey,p_data); + TQString *p_data = new TQString(bTrue ? "true" : "false"); + p_group->tqreplace(szKey,p_data); } -bool KviConfig::readBoolEntry(const QString & szKey,bool bTrue) +bool KviConfig::readBoolEntry(const TQString & szKey,bool bTrue) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return bTrue; - static QString szTrue = "true"; - return (KviQString::toLower(*p_str) == szTrue); + static TQString szTrue = "true"; + return (KviTQString::toLower(*p_str) == szTrue); } -////////////////////////////////// QRect +////////////////////////////////// TQRect -void KviConfig::writeEntry(const QString & szKey,const QRect &rct) +void KviConfig::writeEntry(const TQString & szKey,const TQRect &rct) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString szBuf; + TQString szBuf; KviStringConversion::toString(rct,szBuf); - p_group->replace(szKey,new QString(szBuf)); + p_group->tqreplace(szKey,new TQString(szBuf)); } -QRect KviConfig::readRectEntry(const QString & szKey,const QRect &rct) +TQRect KviConfig::readRectEntry(const TQString & szKey,const TQRect &rct) { KviConfigGroup * p_group = getCurrentGroup(); - QString * str = p_group->find(szKey); + TQString * str = p_group->tqfind(szKey); if(!str)return rct; - QRect ret; + TQRect ret; return KviStringConversion::fromString(*str,ret) ? ret : rct; } ////////////////////////////////// unsigned short -void KviConfig::writeEntry(const QString & szKey,unsigned short usValue) +void KviConfig::writeEntry(const TQString & szKey,unsigned short usValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(usValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -unsigned short int KviConfig::readUShortEntry(const QString & szKey,unsigned short int usDefault) +unsigned short int KviConfig::readUShortEntry(const TQString & szKey,unsigned short int usDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return usDefault; bool bOk; unsigned short int usVal=p_str->toUShort(&bOk); @@ -887,13 +887,13 @@ void KviConfig::writeEntry(const char *szKey,unsigned long lValue) KviStrDict * p_group = getCurrentGroup(); KviStr *p_data = new KviStr(); p_data->setNum(lValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault) { KviStrDict * p_group = getCurrentGroup(); - KviStr * p_str = p_group->find(szKey); + KviStr * p_str = p_group->tqfind(szKey); if(!p_str)return lDefault; bool bOk; unsigned long lVal=p_str->toULong(&bOk); @@ -903,19 +903,19 @@ unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault ////////////////////////////////// int -void KviConfig::writeEntry(const QString & szKey,int iValue) +void KviConfig::writeEntry(const TQString & szKey,int iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -int KviConfig::readIntEntry(const QString & szKey,int iDefault) +int KviConfig::readIntEntry(const TQString & szKey,int iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; int iVal=p_str->toInt(&bOk); @@ -924,19 +924,19 @@ int KviConfig::readIntEntry(const QString & szKey,int iDefault) ////////////////////////////////// unsigned int -void KviConfig::writeEntry(const QString & szKey,unsigned int iValue) +void KviConfig::writeEntry(const TQString & szKey,unsigned int iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -unsigned int KviConfig::readUIntEntry(const QString & szKey,unsigned int iDefault) +unsigned int KviConfig::readUIntEntry(const TQString & szKey,unsigned int iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; unsigned int iVal=p_str->toUInt(&bOk); @@ -945,19 +945,19 @@ unsigned int KviConfig::readUIntEntry(const QString & szKey,unsigned int iDefaul ////////////////////////////////// char -void KviConfig::writeEntry(const QString & szKey,char iValue) +void KviConfig::writeEntry(const TQString & szKey,char iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString * p_data = new QString(); + TQString * p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -char KviConfig::readCharEntry(const QString & szKey,char iDefault) +char KviConfig::readCharEntry(const TQString & szKey,char iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; char iVal=(char)p_str->toInt(&bOk); @@ -966,19 +966,19 @@ char KviConfig::readCharEntry(const QString & szKey,char iDefault) ////////////////////////////////// unsigned char -void KviConfig::writeEntry(const QString & szKey,unsigned char iValue) +void KviConfig::writeEntry(const TQString & szKey,unsigned char iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -unsigned char KviConfig::readUCharEntry(const QString & szKey,unsigned char iDefault) +unsigned char KviConfig::readUCharEntry(const TQString & szKey,unsigned char iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; unsigned char iVal=(unsigned char)p_str->toUInt(&bOk); diff --git a/src/kvilib/ext/kvi_config.h b/src/kvilib/ext/kvi_config.h index 6eef4e05..46924418 100644 --- a/src/kvilib/ext/kvi_config.h +++ b/src/kvilib/ext/kvi_config.h @@ -31,35 +31,35 @@ #include "kvi_pointerhashtable.h" #include "kvi_valuelist.h" -#include <qcolor.h> -#include <qfont.h> -#include <qrect.h> -#include <qstringlist.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqrect.h> +#include <tqstringlist.h> #define KVI_CONFIG_DEFAULT_GROUP "KVIrc" class KviPixmap; class KviMsgType; -typedef KviPointerHashTable<QString,QString> KviConfigGroup; -typedef KviPointerHashTableIterator<QString,QString> KviConfigGroupIterator; -typedef KviPointerHashTableIterator<QString,KviConfigGroup> KviConfigIterator; +typedef KviPointerHashTable<TQString,TQString> KviConfigGroup; +typedef KviPointerHashTableIterator<TQString,TQString> KviConfigGroupIterator; +typedef KviPointerHashTableIterator<TQString,KviConfigGroup> KviConfigIterator; class KVILIB_API KviConfig : public KviHeapObject { public: enum FileMode { Read = 1 , Write = 2 , ReadWrite = 3 }; public: - KviConfig(const QString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); + KviConfig(const TQString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); KviConfig(const char *filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); ~KviConfig(); private: bool m_bLocal8Bit; - KviPointerHashTable<QString,KviConfigGroup> * m_pDict; - QString m_szFileName; + KviPointerHashTable<TQString,KviConfigGroup> * m_pDict; + TQString m_szFileName; bool m_bDirty; - QString m_szStrBuffer; - QString m_szGroup; + TQString m_szStrBuffer; + TQString m_szGroup; bool m_bPreserveEmptyGroups; bool m_bReadOnly; private: @@ -79,7 +79,7 @@ public: // as modified). // void preserveEmptyGroups(bool bPreserve){ m_bPreserveEmptyGroups = bPreserve; }; - const QString & fileName(){ return m_szFileName; }; + const TQString & fileName(){ return m_szFileName; }; bool readOnly(){ return m_bReadOnly; }; void setReadOnly(bool bReadOnly){ m_bReadOnly = bReadOnly; }; bool dirty(){ return m_bDirty; }; @@ -88,65 +88,65 @@ public: // In this way you can load a system-wide read-only config file // as default configuration, alter its settings and save it to the // user local configuration directory - void setSavePath(const QString & savePath){ m_szFileName = savePath; }; - KviPointerHashTable<QString,KviConfigGroup> *dict(){ return m_pDict; }; + void setSavePath(const TQString & savePath){ m_szFileName = savePath; }; + KviPointerHashTable<TQString,KviConfigGroup> *dict(){ return m_pDict; }; void clearDirtyFlag(){ m_bDirty = false; }; void clear(); - void clearGroup(const QString & szGroup); - void clearKey(const QString & szKey); + void clearGroup(const TQString & szGroup); + void clearKey(const TQString & szKey); unsigned int groupsCount(){ return m_pDict->count(); }; bool sync(){ return save(); }; - bool hasKey(const QString & szKey); - bool hasGroup(const QString & szGroup); - void setGroup(const QString & szGroup); + bool hasKey(const TQString & szKey); + bool hasGroup(const TQString & szGroup); + void setGroup(const TQString & szGroup); //void getContentsString(KviStr &buffer); - const QString & group(){ return m_szGroup; }; - void writeEntry(const QString & szKey,const QString & szValue); - void writeEntry(const QString & szKey,const char * szValue) - { writeEntry(szKey,QString::fromUtf8(szValue)); }; - QString readEntry(const QString & szKey,const QString & szDefault = QString::null); + const TQString & group(){ return m_szGroup; }; + void writeEntry(const TQString & szKey,const TQString & szValue); + void writeEntry(const TQString & szKey,const char * szValue) + { writeEntry(szKey,TQString::fromUtf8(szValue)); }; + TQString readEntry(const TQString & szKey,const TQString & szDefault = TQString()); // HACK for KviOptions.. (FIXME) - QString readKviStrEntry(const QString &szKey,const KviStr &szDefault) + TQString readKviStrEntry(const TQString &szKey,const KviStr &szDefault) { return readEntry(szKey,szDefault.ptr()); }; //void writeEntry(const char *szKey,KviStr &szValue); //const char * readEntry(const char *szKey,KviStr &szDefault); - void writeEntry(const QString & szKey,const KviPixmap &pixmap); - KviPixmap readPixmapEntry(const QString & szKey,const KviPixmap &pixDef); - void writeEntry(const QString & szKey,const KviMsgType &msg); - KviMsgType readMsgTypeEntry(const QString & szKey,const KviMsgType &msgDef); - void writeEntry(const QString & szKey,const QColor &clr); - QColor readColorEntry(const QString & szKey,const QColor &clr); - void writeEntry(const QString & szKey,QFont &fnt); - QFont readFontEntry(const QString & szKey,const QFont &fnt); - void writeEntry(const QString & szKey,bool bTrue); - bool readBoolEntry(const QString & szKey,bool bTrue); - QRect readRectEntry(const QString & szKey,const QRect &rct); - void writeEntry(const QString & szKey,const QRect &rct); - QStringList readStringListEntry(const QString & szKey,const QStringList &list); - void writeEntry(const QString & szKey,const QStringList &list); - KviValueList<int> readIntListEntry(const QString & ,const KviValueList<int> &list); - void writeEntry(const QString & szKey,const KviValueList<int> &list); - QString readQStringEntry(const QString & szKey,const QString &szDefault = QString::null) + void writeEntry(const TQString & szKey,const KviPixmap &pixmap); + KviPixmap readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef); + void writeEntry(const TQString & szKey,const KviMsgType &msg); + KviMsgType readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef); + void writeEntry(const TQString & szKey,const TQColor &clr); + TQColor readColorEntry(const TQString & szKey,const TQColor &clr); + void writeEntry(const TQString & szKey,TQFont &fnt); + TQFont readFontEntry(const TQString & szKey,const TQFont &fnt); + void writeEntry(const TQString & szKey,bool bTrue); + bool readBoolEntry(const TQString & szKey,bool bTrue); + TQRect readRectEntry(const TQString & szKey,const TQRect &rct); + void writeEntry(const TQString & szKey,const TQRect &rct); + TQStringList readStringListEntry(const TQString & szKey,const TQStringList &list); + void writeEntry(const TQString & szKey,const TQStringList &list); + KviValueList<int> readIntListEntry(const TQString & ,const KviValueList<int> &list); + void writeEntry(const TQString & szKey,const KviValueList<int> &list); + TQString readTQStringEntry(const TQString & szKey,const TQString &szDefault = TQString()) { return readEntry(szKey,szDefault); }; - //void writeEntry(const QString & szKey,const QString &szValue); + //void writeEntry(const TQString & szKey,const TQString &szValue); //void writeEntry(const char *szKey,unsigned long lValue); //unsigned long readULongEntry(const char *szKey,unsigned long lDefault); //void writeEntry(const char *szKey,long lValue); //long readLongEntry(const char *szKey,long lDefault); - void writeEntry(const QString & szKey,int iValue); - int readIntEntry(const QString & szKey,int iDefault); - void writeEntry(const QString & szKey,unsigned short int usValue); - unsigned short int readUShortEntry(const QString & szKey,unsigned short int usDefault); - void writeEntry(const QString & szKey,unsigned int iValue); - unsigned int readUIntEntry(const QString & szKey,unsigned int iDefault); - void writeEntry(const QString & szKey,char iValue); - char readCharEntry(const QString & szKey,char iDefault); - void writeEntry(const QString & szKey,unsigned char iValue); - unsigned char readUCharEntry(const QString & szKey,unsigned char iDefault); + void writeEntry(const TQString & szKey,int iValue); + int readIntEntry(const TQString & szKey,int iDefault); + void writeEntry(const TQString & szKey,unsigned short int usValue); + unsigned short int readUShortEntry(const TQString & szKey,unsigned short int usDefault); + void writeEntry(const TQString & szKey,unsigned int iValue); + unsigned int readUIntEntry(const TQString & szKey,unsigned int iDefault); + void writeEntry(const TQString & szKey,char iValue); + char readCharEntry(const TQString & szKey,char iDefault); + void writeEntry(const TQString & szKey,unsigned char iValue); + unsigned char readUCharEntry(const TQString & szKey,unsigned char iDefault); - static void getFontProperties(KviStr & buffer,QFont *fnt); - static void setFontProperties(KviStr & str,QFont *fnt); + static void getFontProperties(KviStr & buffer,TQFont *fnt); + static void setFontProperties(KviStr & str,TQFont *fnt); #ifdef COMPILE_ON_WINDOWS // On windows we need to override new and delete operators diff --git a/src/kvilib/ext/kvi_crypt.cpp b/src/kvilib/ext/kvi_crypt.cpp index 84a636aa..52a747ae 100644 --- a/src/kvilib/ext/kvi_crypt.cpp +++ b/src/kvilib/ext/kvi_crypt.cpp @@ -189,7 +189,7 @@ KviCryptEngineManager::KviCryptEngineManager() { - m_pEngineDict = new KviPointerHashTable<QString,KviCryptEngineDescription>; + m_pEngineDict = new KviPointerHashTable<TQString,KviCryptEngineDescription>; m_pEngineDict->setAutoDelete(true); } @@ -200,17 +200,17 @@ void KviCryptEngineManager::registerEngine(KviCryptEngineDescription * d) { - m_pEngineDict->replace(d->szName,d); + m_pEngineDict->tqreplace(d->szName,d); } - void KviCryptEngineManager::unregisterEngine(const QString &szName) + void KviCryptEngineManager::unregisterEngine(const TQString &szName) { m_pEngineDict->remove(szName); } void KviCryptEngineManager::unregisterEngines(void * providerHandle) { - KviPointerHashTableIterator<QString,KviCryptEngineDescription> it(*m_pEngineDict); + KviPointerHashTableIterator<TQString,KviCryptEngineDescription> it(*m_pEngineDict); while(it.current()) { if(it.current()->providerHandle == providerHandle) @@ -220,9 +220,9 @@ } } - KviCryptEngine * KviCryptEngineManager::allocateEngine(const QString &szName) + KviCryptEngine * KviCryptEngineManager::allocateEngine(const TQString &szName) { - KviCryptEngineDescription * d = m_pEngineDict->find(szName); + KviCryptEngineDescription * d = m_pEngineDict->tqfind(szName); if(!d)return 0; KviCryptEngine * e = d->allocFunc(); if(!e)return 0; diff --git a/src/kvilib/ext/kvi_crypt.h b/src/kvilib/ext/kvi_crypt.h index ae3bc4f0..8b36d0be 100644 --- a/src/kvilib/ext/kvi_crypt.h +++ b/src/kvilib/ext/kvi_crypt.h @@ -42,7 +42,7 @@ #include "kvi_heapobject.h" #include "kvi_pointerhashtable.h" -#include <qobject.h> +#include <tqobject.h> #ifdef COMPILE_CRYPT_SUPPORT class KviCryptEngine; @@ -51,12 +51,13 @@ typedef void (*crypt_engine_deallocator_func)(KviCryptEngine *); #endif //COMPILE_CRYPT_SUPPORT - // we must include this declaration to make moc happy even + // we must include this declaration to make tqmoc happy even // if we're not compiling the crypt support - class KVILIB_API KviCryptEngine : public QObject, public KviHeapObject + class KVILIB_API KviCryptEngine : public TQObject, public KviHeapObject { Q_OBJECT + TQ_OBJECT friend class KviCryptEngineManager; public: KviCryptEngine(); @@ -65,7 +66,7 @@ #ifdef COMPILE_CRYPT_SUPPORT private: crypt_engine_deallocator_func m_deallocFunc; // this is accessed by KviCryptEngineManager only - QString m_szLastError; + TQString m_szLastError; int m_iMaxEncryptLen; public: void setMaxEncryptLen(int m){ m_iMaxEncryptLen = m; }; @@ -101,13 +102,13 @@ // of the last error or an empty string if there // was no error after the last init() call. // - const QString &lastError(){ return m_szLastError; }; + const TQString &lastError(){ return m_szLastError; }; protected: // // The following two should have clear meaning // void clearLastError(){ m_szLastError = ""; }; - void setLastError(const QString &err){ m_szLastError = err; }; + void setLastError(const TQString &err){ m_szLastError = err; }; #endif //COMPILE_CRYPT_SUPPORT }; @@ -123,9 +124,9 @@ KviCryptEngineDescription(){}; virtual ~KviCryptEngineDescription(){}; public: - QString szName; // engine name - QString szDescription; // details - QString szAuthor; // algorithm author + TQString szName; // engine name + TQString szDescription; // details + TQString szAuthor; // algorithm author int iFlags; // properties crypt_engine_allocator_func allocFunc; // engine allocator crypt_engine_deallocator_func deallocFunc; // deallocation function (if called from outside the origin module) @@ -139,18 +140,18 @@ KviCryptEngineManager(); virtual ~KviCryptEngineManager(); private: - KviPointerHashTable<QString,KviCryptEngineDescription> * m_pEngineDict; + KviPointerHashTable<TQString,KviCryptEngineDescription> * m_pEngineDict; public: - const KviPointerHashTable<QString,KviCryptEngineDescription> * engineDict(){ return m_pEngineDict; }; + const KviPointerHashTable<TQString,KviCryptEngineDescription> * engineDict(){ return m_pEngineDict; }; void registerEngine(KviCryptEngineDescription * d); - void unregisterEngine(const QString &szName); + void unregisterEngine(const TQString &szName); void unregisterEngines(void * providerHandle); // // Allocates a crypt engine // Please note that the engine may be deleted from outside // so you'd better connect the "destroyed" signal // - KviCryptEngine * allocateEngine(const QString &szName); + KviCryptEngine * allocateEngine(const TQString &szName); void deallocateEngine(KviCryptEngine * e); }; diff --git a/src/kvilib/ext/kvi_databuffer.cpp b/src/kvilib/ext/kvi_databuffer.cpp index 7cad39c4..b0ca288c 100644 --- a/src/kvilib/ext/kvi_databuffer.cpp +++ b/src/kvilib/ext/kvi_databuffer.cpp @@ -56,7 +56,7 @@ KviDataBuffer::~KviDataBuffer() } } -int KviDataBuffer::find(const unsigned char * block,int uSize) +int KviDataBuffer::tqfind(const unsigned char * block,int uSize) { if(uSize < 1)return -1; if(uSize > m_uSize)return -1; @@ -85,7 +85,7 @@ int KviDataBuffer::find(const unsigned char * block,int uSize) return -1; } -int KviDataBuffer::find(unsigned char c) +int KviDataBuffer::tqfind(unsigned char c) { const unsigned char * p = m_pData; const unsigned char * e = p + m_uSize; diff --git a/src/kvilib/ext/kvi_databuffer.h b/src/kvilib/ext/kvi_databuffer.h index 62e09b06..9fa7487b 100644 --- a/src/kvilib/ext/kvi_databuffer.h +++ b/src/kvilib/ext/kvi_databuffer.h @@ -49,8 +49,8 @@ public: void addSize(int uSize){ resize(m_uSize + uSize); }; void append(const unsigned char * data,int uSize); void append(const KviDataBuffer &b){ append(b.data(),b.size()); }; - int find(unsigned char c); - int find(const unsigned char * block,int uSize); + int tqfind(unsigned char c); + int tqfind(const unsigned char * block,int uSize); }; #endif //_KVI_DATABUFFER_H_ diff --git a/src/kvilib/ext/kvi_dcophelper.cpp b/src/kvilib/ext/kvi_dcophelper.cpp index 83f34f4e..7528c5a7 100644 --- a/src/kvilib/ext/kvi_dcophelper.cpp +++ b/src/kvilib/ext/kvi_dcophelper.cpp @@ -30,15 +30,15 @@ #include "dcopclient.h" -#include <qdatastream.h> -#include <qvaluelist.h> +#include <tqdatastream.h> +#include <tqvaluelist.h> // must be included this way, since kvilib is built // before kvirc and symlinks to headers aren't set yet #include "../../kvirc/kernel/kvi_app.h" #include "kvi_thread.h" -KviDCOPHelper::KviDCOPHelper(bool bStartApp, const KviQCString &szAppId) +KviDCOPHelper::KviDCOPHelper(bool bStartApp, const KviTQCString &szAppId) { m_szAppId = szAppId; } @@ -47,7 +47,7 @@ KviDCOPHelper::~KviDCOPHelper() { } -bool KviDCOPHelper::ensureAppRunning(const QString &szApp) +bool KviDCOPHelper::ensureAppRunning(const TQString &szApp) { if (findRunningApp(m_szAppId)) return true; @@ -59,79 +59,79 @@ bool KviDCOPHelper::ensureAppRunning(const QString &szApp) } -bool KviDCOPHelper::voidRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc) +bool KviDCOPHelper::voidRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; + TQByteArray data; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool bVal) +bool KviDCOPHelper::voidRetBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool bVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << bVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal) +bool KviDCOPHelper::voidRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetIntBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal, bool bVal) +bool KviDCOPHelper::voidRetIntBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal, bool bVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; arg << bVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetIntIntIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal1, int iVal2, int iVal3) +bool KviDCOPHelper::voidRetIntIntIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal1, int iVal2, int iVal3) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal1; arg << iVal2; arg << iVal3; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetFloatDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,float fVal) +bool KviDCOPHelper::voidRetFloatDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,float fVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << fVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetStringDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,const QString &szVal) +bool KviDCOPHelper::voidRetStringDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,const TQString &szVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << szVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::stringRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet) +bool KviDCOPHelper::stringRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); - if(replyType == "QString") + TQDataStream reply( replyData, IO_ReadOnly ); + if(replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> szRet; return true; @@ -139,20 +139,20 @@ bool KviDCOPHelper::stringRetVoidDCOPCall(const KviQCString &szObj,const KviQCSt return false; } -bool KviDCOPHelper::stringRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet,int iVal) +bool KviDCOPHelper::stringRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet,int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << iVal; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); - if(replyType == "QString") + TQDataStream reply( replyData, IO_ReadOnly ); + if(replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> szRet; return true; @@ -160,14 +160,14 @@ bool KviDCOPHelper::stringRetIntDCOPCall(const KviQCString &szObj,const KviQCStr return false; } -bool KviDCOPHelper::intRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret) +bool KviDCOPHelper::intRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "int") { reply >> ret; @@ -176,19 +176,19 @@ bool KviDCOPHelper::intRetVoidDCOPCall(const KviQCString &szObj,const KviQCStrin return false; } -bool KviDCOPHelper::intRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret, int iVal) +bool KviDCOPHelper::intRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret, int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << iVal; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "int") { reply >> ret; @@ -197,14 +197,14 @@ bool KviDCOPHelper::intRetIntDCOPCall(const KviQCString &szObj,const KviQCString return false; } -bool KviDCOPHelper::boolRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool &ret) +bool KviDCOPHelper::boolRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool &ret) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "bool") { reply >> ret; @@ -213,14 +213,14 @@ bool KviDCOPHelper::boolRetVoidDCOPCall(const KviQCString &szObj,const KviQCStri return false; } -bool KviDCOPHelper::qvalueListIntRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviValueList<int> &ret, int iVal) +bool KviDCOPHelper::qvalueListIntRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviValueList<int> &ret, int iVal) { if(!ensureAppRunning(m_szAppId)) return false; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; @@ -228,19 +228,19 @@ bool KviDCOPHelper::qvalueListIntRetIntDCOPCall(const KviQCString &szObj,const K if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - if(replyType != "QValueList<int>") + if(replyType != "TQValueList<int>") return false; - QDataStream replyStream(replyData, IO_ReadOnly); + TQDataStream replyStream(replyData, IO_ReadOnly); replyStream >> ret; return true; } -bool KviDCOPHelper::qcstringListRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret) +bool KviDCOPHelper::qcstringListRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret) { - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if (!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; @@ -248,18 +248,18 @@ bool KviDCOPHelper::qcstringListRetVoidDCOPCall(const KviQCString &szObj,const K if (replyType != "KviQCStringList") return false; - QDataStream replyStream(replyData, IO_ReadOnly); + TQDataStream replyStream(replyData, IO_ReadOnly); replyStream >> ret; return true; } -bool KviDCOPHelper::qcstringListRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret, int iVal) +bool KviDCOPHelper::qcstringListRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret, int iVal) { - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << iVal; if (!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) @@ -268,17 +268,17 @@ bool KviDCOPHelper::qcstringListRetIntDCOPCall(const KviQCString &szObj,const Kv if (replyType != "KviQCStringList") return false; - QDataStream replyStream(replyData, IO_ReadOnly); + TQDataStream replyStream(replyData, IO_ReadOnly); replyStream >> ret; return true; } -bool KviDCOPHelper::findRunningApp(const QString &szApp) +bool KviDCOPHelper::findRunningApp(const TQString &szApp) { - QValueList<KviQCString> allApps = g_pApp->dcopClient() ->registeredApplications(); - QValueList<KviQCString>::iterator iterator; - KviQCString sz = szApp.local8Bit(); + TQValueList<KviTQCString> allApps = g_pApp->dcopClient() ->registeredApplications(); + TQValueList<KviTQCString>::iterator iterator; + KviTQCString sz = szApp.local8Bit(); for (iterator = allApps.begin();iterator != allApps.end();iterator++) { if(*iterator == sz) @@ -287,7 +287,7 @@ bool KviDCOPHelper::findRunningApp(const QString &szApp) return false; } -int KviDCOPHelper::detectApp(const QString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted) +int KviDCOPHelper::detectApp(const TQString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted) { // dcop available if(!g_pApp->dcopClient()) @@ -309,30 +309,30 @@ int KviDCOPHelper::detectApp(const QString &szApp,bool bStart,int iScoreWhenFoun } -bool KviDCOPHelper::startApp(const QString &szApp,int iWaitMSecs) +bool KviDCOPHelper::startApp(const TQString &szApp,int iWaitMSecs) { // we could use KApplication::startServiceByDesktopName here // but we want to be able to wait a defined amount of time - QStringList tmp; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQStringList tmp; + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << szApp << tmp; if(!g_pApp->dcopClient()->call( "klauncher", "klauncher", - "start_service_by_desktop_name(QString,QStringList)", + "start_service_by_desktop_name(TQString,TQStringList)", data, replyType, replyData)) { return false; } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if(replyType != "serviceResult")return false; int result; - KviQCString dcopName; - QString error; + KviTQCString dcopName; + TQString error; reply >> result >> dcopName >> error; if(result != 0)return false; } diff --git a/src/kvilib/ext/kvi_dcophelper.h b/src/kvilib/ext/kvi_dcophelper.h index de605e37..431394d3 100644 --- a/src/kvilib/ext/kvi_dcophelper.h +++ b/src/kvilib/ext/kvi_dcophelper.h @@ -32,7 +32,7 @@ #ifdef COMPILE_KDE_SUPPORT -typedef KviValueList<KviQCString> KviQCStringList; +typedef KviValueList<KviTQCString> KviQCStringList; class KVILIB_API KviDCOPHelper { @@ -42,39 +42,39 @@ public: // Constructs a DCOP helper object. // bStartApp: tries to start application when a dcop call is about to be made and the app is not already running // szAppID: application name as seen by DCOP - KviDCOPHelper(bool bStartApp, const KviQCString &szAppId); + KviDCOPHelper(bool bStartApp, const KviTQCString &szAppId); ~KviDCOPHelper(); protected: - KviQCString m_szAppId; + KviTQCString m_szAppId; bool m_bStartApp; protected: - bool ensureAppRunning(const QString &szApp); - bool findRunningApp(const QString &szApp); - bool startApp(const QString &szApp,int iWaitMSecs = 0); - int detectApp(const QString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted); + bool ensureAppRunning(const TQString &szApp); + bool findRunningApp(const TQString &szApp); + bool startApp(const TQString &szApp,int iWaitMSecs = 0); + int detectApp(const TQString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted); // naming convention: [return value] Ret [argument type(s)] DCOPCall - bool voidRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc); - bool voidRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal); - bool voidRetIntBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal, bool bVal); - bool voidRetIntIntIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal1, int iVal2, int iVal3); - bool voidRetBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool bVal); - bool voidRetStringDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,const QString &szVal); - bool voidRetFloatDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,float fVal); - bool stringRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet); - bool stringRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet,int iVal); - bool intRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret); - bool intRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret, int iVal); - bool boolRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool &ret); + bool voidRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc); + bool voidRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal); + bool voidRetIntBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal, bool bVal); + bool voidRetIntIntIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal1, int iVal2, int iVal3); + bool voidRetBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool bVal); + bool voidRetStringDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,const TQString &szVal); + bool voidRetFloatDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,float fVal); + bool stringRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet); + bool stringRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet,int iVal); + bool intRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret); + bool intRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret, int iVal); + bool boolRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool &ret); - bool qvalueListIntRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviValueList<int> &ret, int iVal); - bool qcstringListRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret, int iVal); - bool qcstringListRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret); + bool qvalueListIntRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviValueList<int> &ret, int iVal); + bool qcstringListRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret, int iVal); + bool qcstringListRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret); }; #endif //COMPILE_KDE_SUPPORT diff --git a/src/kvilib/ext/kvi_doublebuffer.cpp b/src/kvilib/ext/kvi_doublebuffer.cpp index 5997e934..5f48a0cb 100644 --- a/src/kvilib/ext/kvi_doublebuffer.cpp +++ b/src/kvilib/ext/kvi_doublebuffer.cpp @@ -26,7 +26,7 @@ #include "kvi_doublebuffer.h" -static QPixmap * g_pMemoryPixmap = 0; +static TQPixmap * g_pMemoryPixmap = 0; static unsigned int g_uMaxRequestedWidth = 0; static unsigned int g_uMaxRequestedHeight = 0; @@ -39,8 +39,8 @@ KviDoubleBuffer::KviDoubleBuffer(unsigned int uWidth,unsigned int uHeight) unsigned int uMaxW = uWidth > g_pMemoryPixmap->width() ? uWidth : g_pMemoryPixmap->width(); unsigned int uMaxH = uHeight > g_pMemoryPixmap->height() ? uHeight : g_pMemoryPixmap->height(); #ifdef COMPILE_USE_QT4 - // QT4SUX: QPixmap::resize() is missing (it's a widely used function and assigning a new QPixmap() seems to be slower and not intuitive) - *g_pMemoryPixmap = QPixmap(uMaxW,uMaxH); + // QT4SUX: TQPixmap::resize() is missing (it's a widely used function and assigning a new TQPixmap() seems to be slower and not intuitive) + *g_pMemoryPixmap = TQPixmap(uMaxW,uMaxH); #else g_pMemoryPixmap->resize(uMaxW,uMaxH); #endif @@ -55,7 +55,7 @@ KviDoubleBuffer::~KviDoubleBuffer() // We never shrink here (it's time consuming) } -QPixmap * KviDoubleBuffer::pixmap() +TQPixmap * KviDoubleBuffer::pixmap() { return g_pMemoryPixmap; } @@ -63,7 +63,7 @@ QPixmap * KviDoubleBuffer::pixmap() void KviDoubleBuffer::init() { if(g_pMemoryPixmap)return; - g_pMemoryPixmap = new QPixmap(); + g_pMemoryPixmap = new TQPixmap(); } void KviDoubleBuffer::done() @@ -79,8 +79,8 @@ void KviDoubleBuffer::heartbeat() { // do shrink :) #ifdef COMPILE_USE_QT4 - // QT4SUX: QPixmap::resize() is missing (it's a widely used function and assigning a new QPixmap() seems to be slower and not intuitive) - *g_pMemoryPixmap = QPixmap(g_uMaxRequestedWidth,g_uMaxRequestedHeight); + // QT4SUX: TQPixmap::resize() is missing (it's a widely used function and assigning a new TQPixmap() seems to be slower and not intuitive) + *g_pMemoryPixmap = TQPixmap(g_uMaxRequestedWidth,g_uMaxRequestedHeight); #else g_pMemoryPixmap->resize(g_uMaxRequestedWidth,g_uMaxRequestedHeight); #endif diff --git a/src/kvilib/ext/kvi_doublebuffer.h b/src/kvilib/ext/kvi_doublebuffer.h index 103759a1..0d78fb4c 100644 --- a/src/kvilib/ext/kvi_doublebuffer.h +++ b/src/kvilib/ext/kvi_doublebuffer.h @@ -26,7 +26,7 @@ #include "kvi_settings.h" -#include <qpixmap.h> +#include <tqpixmap.h> // // This class is basically a huge shared memory pixmap meant to be used in double-buffer @@ -48,7 +48,7 @@ public: public: // This returns a pointer to the memory buffer. The buffer is at least // of the size declared in the constructor. - QPixmap * pixmap(); + TQPixmap * pixmap(); // The stuff below is internal (used only by KviApp) diff --git a/src/kvilib/ext/kvi_draganddrop.h b/src/kvilib/ext/kvi_draganddrop.h index c8bd9f3e..0ad6e9a2 100644 --- a/src/kvilib/ext/kvi_draganddrop.h +++ b/src/kvilib/ext/kvi_draganddrop.h @@ -29,17 +29,17 @@ #ifdef COMPILE_USE_QT4 - #include <q3dragobject.h> + #include <tq3dragobject.h> #define KviDragObject Q3DragObject #define KviUriDrag Q3UriDrag #define KviTextDrag Q3TextDrag #define KviImageDrag Q3ImageDrag #else - #include <qdragobject.h> - #define KviDragObject QDragObject - #define KviUriDrag QUriDrag - #define KviTextDrag QTextDrag - #define KviImageDrag QImageDrag + #include <tqdragobject.h> + #define KviDragObject TQDragObject + #define KviUriDrag TQUriDrag + #define KviTextDrag TQTextDrag + #define KviImageDrag TQImageDrag #endif #endif //!_KVI_DRAGANDDROP_H_ diff --git a/src/kvilib/ext/kvi_garbage.cpp b/src/kvilib/ext/kvi_garbage.cpp index 0e2e8881..10aacd26 100644 --- a/src/kvilib/ext/kvi_garbage.cpp +++ b/src/kvilib/ext/kvi_garbage.cpp @@ -25,10 +25,10 @@ #include "kvi_garbage.h" -#include <qvariant.h> +#include <tqvariant.h> KviGarbageCollector::KviGarbageCollector() -: QObject(0) +: TQObject(0) { m_pGarbageList = 0; m_pCleanupTimer = 0; @@ -41,17 +41,17 @@ KviGarbageCollector::~KviGarbageCollector() cleanup(); } -void KviGarbageCollector::collect(QObject * g) +void KviGarbageCollector::collect(TQObject * g) { if(!m_pGarbageList) { - m_pGarbageList = new KviPointerList<QObject>; + m_pGarbageList = new KviPointerList<TQObject>; m_pGarbageList->setAutoDelete(true); } //debug("COLLECTING GARBAGE %s",g->className()); m_pGarbageList->append(g); // debug("Registering garbage object %d (%s:%s)",g,g->className(),g->name()); - connect(g,SIGNAL(destroyed()),this,SLOT(garbageSuicide())); + connect(g,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide())); triggerCleanup(0); } @@ -62,13 +62,13 @@ void KviGarbageCollector::garbageSuicide() debug("Ops... garbage suicide while no garbage list"); return; } - int idx = m_pGarbageList->findRef(sender()); + int idx = m_pGarbageList->tqfindRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))); if(idx == -1) { debug("Ops... unregistered garbage suicide"); return; } - m_pGarbageList->removeRef(sender()); + m_pGarbageList->removeRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))); if(m_pGarbageList->isEmpty()) { cleanup(); @@ -82,8 +82,8 @@ void KviGarbageCollector::triggerCleanup(int iTimeout) { m_pCleanupTimer->stop(); } else { - m_pCleanupTimer = new QTimer(this); - connect(m_pCleanupTimer,SIGNAL(timeout()),this,SLOT(cleanup())); + m_pCleanupTimer = new TQTimer(this); + connect(m_pCleanupTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(cleanup())); } m_pCleanupTimer->start(iTimeout); } @@ -94,16 +94,16 @@ void KviGarbageCollector::cleanup() if(m_pGarbageList) { //debug("SOME GARBAGE TO DELETE"); - KviPointerList<QObject> dying; + KviPointerList<TQObject> dying; dying.setAutoDelete(false); - for(QObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next()) + for(TQObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next()) { //debug("CHECKING GARBAGE CLASS %s",o->className()); bool bDeleteIt = m_bForceCleanupNow; if(!bDeleteIt) { //debug("CLEANUP NOT FORCED"); - QVariant v = o->property("blockingDelete"); + TQVariant v = o->property("blockingDelete"); if(v.isValid()) { //debug("HAS A VALID VARIANT!"); @@ -115,10 +115,10 @@ void KviGarbageCollector::cleanup() if(bDeleteIt)dying.append(o); } - for(QObject * o2 = dying.first();o2;o2 = dying.next()) + for(TQObject * o2 = dying.first();o2;o2 = dying.next()) { //debug("KILLING GARBAGE CLASS %s",o2->className()); - disconnect(o2,SIGNAL(destroyed()),this,SLOT(garbageSuicide())); + disconnect(o2,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide())); m_pGarbageList->removeRef(o2); } diff --git a/src/kvilib/ext/kvi_garbage.h b/src/kvilib/ext/kvi_garbage.h index 6bb75641..8c8e71e4 100644 --- a/src/kvilib/ext/kvi_garbage.h +++ b/src/kvilib/ext/kvi_garbage.h @@ -24,23 +24,24 @@ #include "kvi_settings.h" -#include <qobject.h> +#include <tqobject.h> #include "kvi_pointerlist.h" -#include <qtimer.h> +#include <tqtimer.h> -class KVILIB_API KviGarbageCollector : public QObject +class KVILIB_API KviGarbageCollector : public TQObject { Q_OBJECT + TQ_OBJECT public: KviGarbageCollector(); ~KviGarbageCollector(); protected: - KviPointerList<QObject> * m_pGarbageList; - QTimer * m_pCleanupTimer; + KviPointerList<TQObject> * m_pGarbageList; + TQTimer * m_pCleanupTimer; bool m_bForceCleanupNow; public: - void collect(QObject * g); + void collect(TQObject * g); protected: void triggerCleanup(int iTimeout); protected slots: diff --git a/src/kvilib/ext/kvi_imagelib.cpp b/src/kvilib/ext/kvi_imagelib.cpp index 10835b25..90b21af6 100644 --- a/src/kvilib/ext/kvi_imagelib.cpp +++ b/src/kvilib/ext/kvi_imagelib.cpp @@ -24,31 +24,31 @@ #define __KVILIB__ -#include <qnamespace.h> +#include <tqnamespace.h> #include "kvi_imagelib.h" #include "kvi_fileutils.h" #include "kvi_locale.h" #include "kvi_memmove.h" -#include <qpixmap.h> +#include <tqpixmap.h> -//KviImageLibrary::KviImageLibrary(const QPixmap &pixmap,int imageWidth,int imageHeight) +//KviImageLibrary::KviImageLibrary(const TQPixmap &pixmap,int imageWidth,int imageHeight) //{ // if(pixmap.isNull())m_pLibrary=0; -// else m_pLibrary=new QPixmap(pixmap); +// else m_pLibrary=new TQPixmap(pixmap); // setImageSize(imageWidth,imageHeight); //} -KviImageLibrary::KviImageLibrary(const QString &path,int imageWidth,int imageHeight) +KviImageLibrary::KviImageLibrary(const TQString &path,int imageWidth,int imageHeight) { m_pLibrary=0; loadLibrary(path); setImageSize(imageWidth,imageHeight); } -KviImageLibrary::KviImageLibrary(const QString &path1,const QString &path2,int imageWidth,int imageHeight) +KviImageLibrary::KviImageLibrary(const TQString &path1,const TQString &path2,int imageWidth,int imageHeight) { m_pLibrary=0; if(KviFileUtils::fileExists(path1)) @@ -78,15 +78,15 @@ bool KviImageLibrary::setImageSize(int imageWidth,int imageHeight) return true; } -bool KviImageLibrary::loadLibrary(const QString &path) +bool KviImageLibrary::loadLibrary(const TQString &path) { if(m_pLibrary)delete m_pLibrary; - m_pLibrary=new QImage(path); + m_pLibrary=new TQImage(path); if(m_pLibrary->isNull()) { delete m_pLibrary; m_pLibrary=0; - debug("WARNING : Can not load image library %s",KviQString::toUtf8(path).data()); + debug("WARNING : Can not load image library %s",KviTQString::toUtf8(path).data()); } return (m_pLibrary != 0); } @@ -99,11 +99,11 @@ int KviImageLibrary::imageCount() return ( nRows * (m_pLibrary->height()/m_iHeight)); } -QPixmap KviImageLibrary::getImage(int zeroBasedIndex) +TQPixmap KviImageLibrary::getImage(int zeroBasedIndex) { if((zeroBasedIndex >= imageCount())||(zeroBasedIndex < 0)||(m_pLibrary->depth() < 8)) { - QPixmap image(32,32); + TQPixmap image(32,32); image.fill(); //White fill return image; } @@ -114,25 +114,25 @@ QPixmap KviImageLibrary::getImage(int zeroBasedIndex) int yOffset=(zeroBasedIndex / imPerRow) * m_iHeight; #ifdef COMPILE_USE_QT4 - QImage image(m_iWidth,m_iHeight,m_pLibrary->format()); + TQImage image(m_iWidth,m_iHeight,m_pLibrary->format()); #else - QImage image(m_iWidth,m_iHeight,m_pLibrary->depth()); + TQImage image(m_iWidth,m_iHeight,m_pLibrary->depth()); #endif int d = image.depth() / 8; #ifndef COMPILE_USE_QT4 - if(d == 4)image.setAlphaBuffer(true); // Qt 4.x should manage it automagically + if(d == 4)image.setAlphaBuffer(true); // TQt 4.x should manage it automagically #endif //Copy the image data - //bitBlt(&image,0,0,m_pLibrary,xOffset,yOffset,m_iWidth,m_iHeight,Qt::CopyROP,false); + //bitBlt(&image,0,0,m_pLibrary,xOffset,yOffset,m_iWidth,m_iHeight,TQt::CopyROP,false); for(int i=0;i<m_iHeight;i++) kvi_memmove(image.scanLine(i),m_pLibrary->scanLine(i + yOffset) + (xOffset * d),m_iWidth * d); #ifdef COMPILE_USE_QT4 - QPixmap p = QPixmap::fromImage(image); + TQPixmap p = TQPixmap::fromImage(image); #else - QPixmap p(image); + TQPixmap p(image); #endif return p; } diff --git a/src/kvilib/ext/kvi_imagelib.h b/src/kvilib/ext/kvi_imagelib.h index d78c8d19..1bbccb1b 100644 --- a/src/kvilib/ext/kvi_imagelib.h +++ b/src/kvilib/ext/kvi_imagelib.h @@ -25,7 +25,7 @@ // // A class to manage multiple image libraries. -// The library is in fact a big image that contains +// The library is in fact a big image that tqcontains // several rows of other smaller images of the same size. // The images inside the 'library' are indexed in the following way: // @@ -47,26 +47,26 @@ #include "kvi_settings.h" -#include <qimage.h> +#include <tqimage.h> class KVILIB_API KviImageLibrary { public: // Consruction & Destruction -// KviImageLibrary(const QPixmap &pixmap,int imageWidth,int imageHeight); - KviImageLibrary(const QString &path,int imageWidth,int imageHeight); - KviImageLibrary(const QString &path1,const QString &path2,int imageWidth,int imageHeight); +// KviImageLibrary(const TQPixmap &pixmap,int imageWidth,int imageHeight); + KviImageLibrary(const TQString &path,int imageWidth,int imageHeight); + KviImageLibrary(const TQString &path1,const TQString &path2,int imageWidth,int imageHeight); ~KviImageLibrary(); public: // Fields - QImage *m_pLibrary; + TQImage *m_pLibrary; int m_iWidth; int m_iHeight; public: // Methods - bool loadLibrary(const QString &path); + bool loadLibrary(const TQString &path); void unloadLibrary(); int imageCount(); bool libraryLoaded(){ return (m_pLibrary != 0); }; - QImage *getLibrary(){ return m_pLibrary; }; - QPixmap getImage(int zeroBasedIndex); + TQImage *getLibrary(){ return m_pLibrary; }; + TQPixmap getImage(int zeroBasedIndex); bool setImageSize(int imageWidth,int imageHeight); }; diff --git a/src/kvilib/ext/kvi_mediatype.cpp b/src/kvilib/ext/kvi_mediatype.cpp index 87c7926d..36cc6dfc 100644 --- a/src/kvilib/ext/kvi_mediatype.cpp +++ b/src/kvilib/ext/kvi_mediatype.cpp @@ -36,8 +36,8 @@ #include "kvi_settings.h" -#include <qregexp.h> -#include <qdir.h> +#include <tqregexp.h> +#include <tqdir.h> #include <sys/types.h> #include <sys/stat.h> @@ -98,13 +98,13 @@ KviMediaType * KviMediaManager::findMediaTypeByIanaType(const char * ianaType) return 0; } -KviMediaType * KviMediaManager::findMediaTypeByFileMask(const char * filemask) +KviMediaType * KviMediaManager::findMediaTypeByFileMask(const char * filetqmask) { __range_valid(locked()); for(KviMediaType * mt = m_pMediaTypeList->first();mt;mt = m_pMediaTypeList->next()) { // FIXME: #warning "Should this be case sensitive ?" - if(kvi_strEqualCI(mt->szFileMask.ptr(),filemask))return mt; + if(kvi_strEqualCI(mt->szFileMask.ptr(),filetqmask))return mt; } return 0; @@ -129,7 +129,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) int iWildCount = m->szFileMask.occurences('*'); int iNonWildCount = m->szFileMask.len() - iWildCount; - // The masks with no wildcards go first in the list + // The tqmasks with no wildcards go first in the list // then we insert the ones with more non-wild chars int index = 0; @@ -137,7 +137,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) { if(iWildCount) { - // the new mask has wildcards... if the current one has none, skip it + // the new tqmask has wildcards... if the current one has none, skip it int iWildCountExisting = mt->szFileMask.occurences('*'); if(iWildCountExisting) { @@ -164,15 +164,15 @@ void KviMediaManager::insertMediaType(KviMediaType * m) } } // else the current has no wildcards...skip } else { - // the new mask has no wildcards.... - if(mt->szFileMask.contains('*')) + // the new tqmask has no wildcards.... + if(mt->szFileMask.tqcontains('*')) { // current one has wildcards...insert m_pMediaTypeList->insert(index,m); return; } // the current one has no wildcards... - // the longer masks go first.... + // the longer tqmasks go first.... if(mt->szFileMask.len() < m->szFileMask.len()) { // the current one is shorter than the new one...insert @@ -185,10 +185,10 @@ void KviMediaManager::insertMediaType(KviMediaType * m) m_pMediaTypeList->append(m); /* - // the masks with no wildcards go first - // longer masks go first + // the tqmasks with no wildcards go first + // longer tqmasks go first - bool bHasWildcards = m->szFileMask.contains('*'); + bool bHasWildcards = m->szFileMask.tqcontains('*'); int index = 0; for(KviMediaType * mt = m_pMediaTypeList->first();mt;mt = m_pMediaTypeList->next()) { @@ -207,7 +207,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) } } } else { - if(mt->szFileMask.contains('*')) + if(mt->szFileMask.tqcontains('*')) { m_pMediaTypeList->insert(index,m); return; @@ -235,16 +235,16 @@ void KviMediaManager::insertMediaType(KviMediaType * m) KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckMagic) { - // FIXME: This should be ported at least to QString.... + // FIXME: This should be ported at least to TQString.... __range_valid(locked()); KviStr szFullPath = filename; if(!kvi_isAbsolutePath(szFullPath.ptr())) { #ifdef COMPILE_USE_QT4 - KviStr tmp = QDir::currentPath(); + KviStr tmp = TQDir::currentPath(); #else - KviStr tmp = QDir::currentDirPath(); + KviStr tmp = TQDir::currentDirPath(); #endif tmp.ensureLastCharIs('/'); szFullPath.prepend(tmp); @@ -382,7 +382,7 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP if(bCheckMagic) { - QString szTmp=QString::fromUtf8(szFullPath); + TQString szTmp=TQString::fromUtf8(szFullPath); KviFile f(szTmp); if(f.openForReading()) { @@ -403,17 +403,13 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP { if(len && m->szMagicBytes.hasData()) { - QRegExp re(m->szMagicBytes.ptr()); + TQRegExp re(m->szMagicBytes.ptr()); // It looks like they can't decide the name for this function :D // ... well, maybe the latest choice is the best one. #ifdef COMPILE_USE_QT4 if(re.indexIn(buffer) > -1)return m; // matched! #else - #if QT_VERSION >= 300 if(re.search(buffer) > -1)return m; // matched! - #else - if(re.find(buffer,0) > -1)return m; // matched! - #endif #endif // else magic failed...not a match } else return m; // matched! (no magic check) @@ -437,7 +433,7 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP typedef struct _KviDefaultMediaType { - const char * filemask; + const char * filetqmask; const char * magicbytes; const char * ianatype; const char * description; @@ -493,12 +489,12 @@ void KviMediaManager::load(const char * filename) insertMediaType(m); } - for(int u = 0;g_defMediaTypes[u].filemask;u++) + for(int u = 0;g_defMediaTypes[u].filetqmask;u++) { - if(!findMediaTypeByFileMask(g_defMediaTypes[u].filemask)) + if(!findMediaTypeByFileMask(g_defMediaTypes[u].filetqmask)) { KviMediaType * m = new KviMediaType; - m->szFileMask = g_defMediaTypes[u].filemask; + m->szFileMask = g_defMediaTypes[u].filetqmask; m->szMagicBytes = g_defMediaTypes[u].magicbytes; m->szIanaType = g_defMediaTypes[u].ianatype; m->szDescription = g_defMediaTypes[u].description; diff --git a/src/kvilib/ext/kvi_mediatype.h b/src/kvilib/ext/kvi_mediatype.h index 77e96594..99b427f9 100644 --- a/src/kvilib/ext/kvi_mediatype.h +++ b/src/kvilib/ext/kvi_mediatype.h @@ -67,7 +67,7 @@ private: KviMediaType * findMediaTypeForRegularFile(const char * szFullPath,const char * szFileName,bool bCheckMagic); public: KviPointerList<KviMediaType> * mediaTypeList(){ return m_pMediaTypeList; }; - KviMediaType * findMediaTypeByFileMask(const char * filemask); + KviMediaType * findMediaTypeByFileMask(const char * filetqmask); KviMediaType * findMediaTypeByIanaType(const char * ianaType); bool removeMediaType(KviMediaType * t){ return m_pMediaTypeList->removeRef(t); }; void clear(){ m_pMediaTypeList->clear(); }; diff --git a/src/kvilib/ext/kvi_miscutils.cpp b/src/kvilib/ext/kvi_miscutils.cpp index 184345ed..7b3c4caa 100644 --- a/src/kvilib/ext/kvi_miscutils.cpp +++ b/src/kvilib/ext/kvi_miscutils.cpp @@ -25,22 +25,22 @@ #define __KVILIB__ #include "kvi_miscutils.h" -#include <qstringlist.h> +#include <tqstringlist.h> namespace KviMiscUtils { - int compareVersions(const QString &szVersion1,const QString &szVersion2) + int compareVersions(const TQString &szVersion1,const TQString &szVersion2) { #ifdef COMPILE_USE_QT4 - QStringList sl1 = szVersion1.split("."); - QStringList sl2 = szVersion2.split("."); + TQStringList sl1 = szVersion1.split("."); + TQStringList sl2 = szVersion2.split("."); #else - QStringList sl1 = QStringList::split(".",szVersion1); - QStringList sl2 = QStringList::split(".",szVersion2); + TQStringList sl1 = TQStringList::split(".",szVersion1); + TQStringList sl2 = TQStringList::split(".",szVersion2); #endif - QStringList::Iterator it1 = sl1.begin(); - QStringList::Iterator it2 = sl2.begin(); + TQStringList::Iterator it1 = sl1.begin(); + TQStringList::Iterator it2 = sl2.begin(); while((it1 != sl1.end()) && (it2 != sl2.end())) { bool bOk; @@ -64,16 +64,16 @@ namespace KviMiscUtils return 0; } - bool isValidVersionString(const QString &szVersion) + bool isValidVersionString(const TQString &szVersion) { #ifdef COMPILE_USE_QT4 - QStringList sl = szVersion.split("."); + TQStringList sl = szVersion.split("."); #else - QStringList sl = QStringList::split(".",szVersion); + TQStringList sl = TQStringList::split(".",szVersion); #endif if(sl.isEmpty())return false; // must all be numbers - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { bool bOk; int i = (*it).toInt(&bOk); diff --git a/src/kvilib/ext/kvi_miscutils.h b/src/kvilib/ext/kvi_miscutils.h index f09d63a7..7bda3277 100644 --- a/src/kvilib/ext/kvi_miscutils.h +++ b/src/kvilib/ext/kvi_miscutils.h @@ -34,10 +34,10 @@ namespace KviMiscUtils // Compare two x.y.z... version strings. // The function behaves like strcmp: it returns 0 when the versions // are equal, -1 if the szVersion1 is greater and 1 if szVersion2 is greater - extern KVILIB_API int compareVersions(const QString &szVersion1,const QString &szVersion2); + extern KVILIB_API int compareVersions(const TQString &szVersion1,const TQString &szVersion2); // Check if the argument string is a valid x.y.z.... version string - extern KVILIB_API bool isValidVersionString(const QString &szVersion); + extern KVILIB_API bool isValidVersionString(const TQString &szVersion); }; diff --git a/src/kvilib/ext/kvi_osinfo.cpp b/src/kvilib/ext/kvi_osinfo.cpp index 51037a48..9d443c0b 100644 --- a/src/kvilib/ext/kvi_osinfo.cpp +++ b/src/kvilib/ext/kvi_osinfo.cpp @@ -78,9 +78,9 @@ typedef BOOL (WINAPI *PGETPRODUCTINFO)(DWORD,DWORD,DWORD,DWORD,PDWORD); #define PRODUCT_ULTIMATE 0x00000001 #define PRODUCT_WEB_SERVER 0x00000011 -static QString queryWinInfo( QueryInfo info) +static TQString queryWinInfo( QueryInfo info) { - QString szVersion; + TQString szVersion; OSVERSIONINFOEX osvi; SYSTEM_INFO si; PGNSI pGNSI; @@ -317,7 +317,7 @@ static QString queryWinInfo( QueryInfo info) lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Control\\ProductOptions"), - 0, KEY_QUERY_VALUE, &hKey ); + 0, KEY_TQUERY_VALUE, &hKey ); if( lRet != ERROR_SUCCESS ) return FALSE; @@ -348,19 +348,19 @@ static QString queryWinInfo( QueryInfo info) // Test for SP6 versus SP6a. lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009"), - 0, KEY_QUERY_VALUE, &hKey ); + 0, KEY_TQUERY_VALUE, &hKey ); if( lRet == ERROR_SUCCESS ) - szVersion+= QString("Service Pack 6a (Build %1)").arg( osvi.dwBuildNumber & 0xFFFF ); + szVersion+= TQString("Service Pack 6a (Build %1)").tqarg( osvi.dwBuildNumber & 0xFFFF ); else // Windows NT 4.0 prior to SP6a { - szVersion+= QString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); + szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF); } RegCloseKey( hKey ); } else // not Windows NT 4.0 { - szVersion+= QString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); + szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF); } break; @@ -398,7 +398,7 @@ static QString queryWinInfo( QueryInfo info) unsigned long major = osvi.dwMajorVersion; unsigned long minor = osvi.dwMinorVersion; unsigned long release = osvi.dwBuildNumber; - QString szMajor, szMinor, szRelease, szVersion; + TQString szMajor, szMinor, szRelease, szVersion; szMajor.setNum(major); szMinor.setNum(minor); szRelease.setNum(release); @@ -424,7 +424,7 @@ static QString queryWinInfo( QueryInfo info) namespace KviOsInfo { - QString type() + TQString type() { #ifdef COMPILE_ON_WINDOWS return queryWinInfo(Os_Type); @@ -437,74 +437,74 @@ namespace KviOsInfo #endif } - QString name() + TQString name() { #ifdef COMPILE_ON_WINDOWS return "windows"; #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.sysname); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.sysname); + return KviTQString::empty; #endif } - QString version() + TQString version() { #ifdef COMPILE_ON_WINDOWS return queryWinInfo(Os_Version); #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.version); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.version); + return KviTQString::empty; #endif } - QString release() + TQString release() { #ifdef COMPILE_ON_WINDOWS return queryWinInfo(Os_Release); #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.release); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.release); + return KviTQString::empty; #endif } - QString machine() + TQString machine() { #ifdef COMPILE_ON_WINDOWS - QString mach = getenv("PROCESSOR_IDENTIFIER"); + TQString mach = getenv("PROCESSOR_IDENTIFIER"); return mach.section(",",0,0); #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.machine); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.machine); + return KviTQString::empty; #endif } - QString nodename() + TQString nodename() { #ifdef COMPILE_ON_WINDOWS return "windows"; #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.nodename); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.nodename); + return KviTQString::empty; #endif } - QString hostname() + TQString hostname() { char hbuffer[1024]; if(gethostname(hbuffer,1024) == 0) - return QString::fromLocal8Bit(hbuffer); + return TQString::fromLocal8Bit(hbuffer); else - return KviQString::empty; + return KviTQString::empty; } } diff --git a/src/kvilib/ext/kvi_osinfo.h b/src/kvilib/ext/kvi_osinfo.h index 9df4a990..5f864657 100644 --- a/src/kvilib/ext/kvi_osinfo.h +++ b/src/kvilib/ext/kvi_osinfo.h @@ -27,17 +27,17 @@ #include "kvi_settings.h" -#include <qstring.h> +#include <tqstring.h> namespace KviOsInfo { - extern KVILIB_API QString type(); - extern KVILIB_API QString name(); - extern KVILIB_API QString version(); - extern KVILIB_API QString release(); - extern KVILIB_API QString machine(); - extern KVILIB_API QString nodename(); - extern KVILIB_API QString hostname(); + extern KVILIB_API TQString type(); + extern KVILIB_API TQString name(); + extern KVILIB_API TQString version(); + extern KVILIB_API TQString release(); + extern KVILIB_API TQString machine(); + extern KVILIB_API TQString nodename(); + extern KVILIB_API TQString hostname(); }; #endif //!_KVI_OSINFO_H_ diff --git a/src/kvilib/ext/kvi_parameterlist.cpp b/src/kvilib/ext/kvi_parameterlist.cpp index 318cd3d1..9affcab3 100644 --- a/src/kvilib/ext/kvi_parameterlist.cpp +++ b/src/kvilib/ext/kvi_parameterlist.cpp @@ -166,7 +166,7 @@ unsigned int KviParameterList::getUInt(bool * bOk) return 0; } -QRect KviParameterList::getRect(bool * bOk) +TQRect KviParameterList::getRect(bool * bOk) { int val[4]; for(int i=0;i<4;i++) @@ -176,21 +176,21 @@ QRect KviParameterList::getRect(bool * bOk) if(!pszv) { if(bOk)*bOk = false; - return QRect(); // invalid + return TQRect(); // invalid } bool mybOk; val[i] = pszv->toInt(&mybOk); if(!mybOk) { if(bOk)*bOk = false; - return QRect(); // invalid + return TQRect(); // invalid } } if(bOk)*bOk = true; - return QRect(val[0],val[1],val[2],val[3]); + return TQRect(val[0],val[1],val[2],val[3]); } -QPoint KviParameterList::getPoint(bool * bOk) +TQPoint KviParameterList::getPoint(bool * bOk) { int val[2]; for(int i=0;i<2;i++) @@ -200,21 +200,21 @@ QPoint KviParameterList::getPoint(bool * bOk) if(!pszv) { if(bOk)*bOk = false; - return QPoint(); // invalid + return TQPoint(); // invalid } bool mybOk; val[i] = pszv->toInt(&mybOk); if(!mybOk) { if(bOk)*bOk = false; - return QPoint(); // invalid + return TQPoint(); // invalid } } if(bOk)*bOk = true; - return QPoint(val[0],val[1]); + return TQPoint(val[0],val[1]); } -QSize KviParameterList::getSize(bool * bOk) +TQSize KviParameterList::getSize(bool * bOk) { int val[2]; for(int i=0;i<2;i++) @@ -224,18 +224,18 @@ QSize KviParameterList::getSize(bool * bOk) if(!pszv) { if(bOk)*bOk = false; - return QSize(); // invalid + return TQSize(); // invalid } bool mybOk; val[i] = pszv->toInt(&mybOk); if(!mybOk) { if(bOk)*bOk = false; - return QSize(); // invalid + return TQSize(); // invalid } } if(bOk)*bOk = true; - return QSize(val[0],val[1]); + return TQSize(val[0],val[1]); } //#ifdef COMPILE_ON_WINDOWS diff --git a/src/kvilib/ext/kvi_parameterlist.h b/src/kvilib/ext/kvi_parameterlist.h index 51c573e0..3d3dd6db 100644 --- a/src/kvilib/ext/kvi_parameterlist.h +++ b/src/kvilib/ext/kvi_parameterlist.h @@ -28,9 +28,9 @@ #include "kvi_string.h" #include "kvi_pointerlist.h" -#include <qrect.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqrect.h> +#include <tqpoint.h> +#include <tqsize.h> class KVILIB_API KviParameterList : public KviPointerList<KviStr>, public KviHeapObject { @@ -57,9 +57,9 @@ public: bool getBool(); int getInt(bool * bOk = 0); unsigned int getUInt(bool * bOk = 0); - QRect getRect(bool * bOk = 0); - QPoint getPoint(bool * bOk = 0); - QSize getSize(bool * bOk = 0); + TQRect getRect(bool * bOk = 0); + TQPoint getPoint(bool * bOk = 0); + TQSize getSize(bool * bOk = 0); KviStr * safeFirst(); KviStr * safeNext(); const char * safeFirstParam(){ return safeFirst()->ptr(); }; diff --git a/src/kvilib/ext/kvi_pixmap.cpp b/src/kvilib/ext/kvi_pixmap.cpp index f22b03ef..c5877300 100644 --- a/src/kvilib/ext/kvi_pixmap.cpp +++ b/src/kvilib/ext/kvi_pixmap.cpp @@ -30,7 +30,7 @@ #include "kvi_pixmap.h" #include "kvi_qstring.h" -#include <qpainter.h> +#include <tqpainter.h> KviPixmap::KviPixmap() { @@ -52,7 +52,7 @@ KviPixmap::KviPixmap(const KviPixmap &pix) { if(pix.pixmap()) { - m_pPix = new QPixmap(*(pix.pixmap())); + m_pPix = new TQPixmap(*(pix.pixmap())); } } } @@ -70,7 +70,7 @@ bool KviPixmap::load(const char * path) m_szPath = path; if(m_szPath.isEmpty())return false; - m_pPix = new QPixmap(m_szPath); + m_pPix = new TQPixmap(m_szPath); if(m_pPix->isNull()) { @@ -82,14 +82,14 @@ bool KviPixmap::load(const char * path) return true; } -bool KviPixmap::load(const QString& path) +bool KviPixmap::load(const TQString& path) { if(m_pPix)delete m_pPix; m_pPix = 0; m_szPath = path; if(m_szPath.isEmpty())return false; - m_pPix = new QPixmap(m_szPath); + m_pPix = new TQPixmap(m_szPath); if(m_pPix->isNull()) { @@ -101,7 +101,7 @@ bool KviPixmap::load(const QString& path) return true; } -void KviPixmap::set(const QPixmap &pix,const QString &szPath) +void KviPixmap::set(const TQPixmap &pix,const TQString &szPath) { if(pix.isNull()) { @@ -110,7 +110,7 @@ void KviPixmap::set(const QPixmap &pix,const QString &szPath) } if(m_pPix)delete m_pPix; - m_pPix = new QPixmap(pix); + m_pPix = new TQPixmap(pix); m_szPath = szPath; } @@ -125,7 +125,7 @@ void KviPixmap::setNull() KviPixmap & KviPixmap::operator=(const KviPixmap &pix) { if(m_pPix == pix.m_pPix)return (*this); // self assignment (!!!) - if(KviQString::equalCI(m_szPath,pix.path()))return (*this); // same pix + if(KviTQString::equalCI(m_szPath,pix.path()))return (*this); // same pix if(m_pPix)delete m_pPix; m_pPix = 0; @@ -135,14 +135,14 @@ KviPixmap & KviPixmap::operator=(const KviPixmap &pix) { if(pix.pixmap()) { - m_pPix = new QPixmap(*(pix.pixmap())); + m_pPix = new TQPixmap(*(pix.pixmap())); } } return (*this); } -void KviPixmapUtils::drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,const QRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy) +void KviPixmapUtils::drawPixmapWithPainter(TQPainter* p,TQPixmap * pix,int flags,const TQRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy) { if(!pix)return; if(!flags) @@ -156,18 +156,18 @@ void KviPixmapUtils::drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,c int x=0; int y=0; - if( !(flags & Qt::AlignHorizontal_Mask )) + if( !(flags & TQt::AlignHorizontal_Mask )) x=-1; - else if ( flags & Qt::AlignRight ) + else if ( flags & TQt::AlignRight ) x=iWidgetWidth - iPixWidth; - else if( flags & Qt::AlignHCenter ) + else if( flags & TQt::AlignHCenter ) x=(iWidgetWidth - iPixWidth)/2; - if( !(flags & Qt::AlignVertical_Mask )) + if( !(flags & TQt::AlignVertical_Mask )) y=-1; - else if ( flags & Qt::AlignBottom ) + else if ( flags & TQt::AlignBottom ) y=iWidgetHeight - iPixHeight; - else if( flags & Qt::AlignVCenter ) + else if( flags & TQt::AlignVCenter ) y=(iWidgetHeight - iPixHeight)/2; if(x==-1) { diff --git a/src/kvilib/ext/kvi_pixmap.h b/src/kvilib/ext/kvi_pixmap.h index 7ba91cec..9f92e456 100644 --- a/src/kvilib/ext/kvi_pixmap.h +++ b/src/kvilib/ext/kvi_pixmap.h @@ -28,7 +28,7 @@ #include "kvi_settings.h" #include "kvi_string.h" -#include <qpixmap.h> +#include <tqpixmap.h> class KVILIB_API KviPixmap { @@ -38,23 +38,23 @@ public: KviPixmap(const KviPixmap &pix); ~KviPixmap(); private: - QPixmap * m_pPix; - QString m_szPath; + TQPixmap * m_pPix; + TQString m_szPath; public: bool isNull(){ return m_pPix == 0; }; bool load(const char * path); - bool load(const QString& path); - const QString& path() const { return m_szPath; }; - QPixmap * pixmap() const { return m_pPix; }; - void set(const QPixmap &pix,const QString &szPath); + bool load(const TQString& path); + const TQString& path() const { return m_szPath; }; + TQPixmap * pixmap() const { return m_pPix; }; + void set(const TQPixmap &pix,const TQString &szPath); KviPixmap & operator=(const KviPixmap &pix); // deep copy void setNull(); }; namespace KviPixmapUtils { - extern KVILIB_API void drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,const QRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy); - inline void drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,const QRect& paintRect,int iWidgetWidth,int iWidgetHeight) + extern KVILIB_API void drawPixmapWithPainter(TQPainter* p,TQPixmap * pix,int flags,const TQRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy); + inline void drawPixmapWithPainter(TQPainter* p,TQPixmap * pix,int flags,const TQRect& paintRect,int iWidgetWidth,int iWidgetHeight) { KviPixmapUtils::drawPixmapWithPainter(p,pix,flags,paintRect,iWidgetWidth,iWidgetHeight,paintRect.left(),paintRect.top()); }; }; diff --git a/src/kvilib/ext/kvi_proxydb.cpp b/src/kvilib/ext/kvi_proxydb.cpp index 917795c3..95bf66a4 100644 --- a/src/kvilib/ext/kvi_proxydb.cpp +++ b/src/kvilib/ext/kvi_proxydb.cpp @@ -71,9 +71,9 @@ void KviProxy::setNamedProtocol(const char * proto) else m_protocol = KviProxy::Socks4; } -void KviProxy::getSupportedProtocolNames(QStringList & buf) +void KviProxy::getSupportedProtocolNames(TQStringList & buf) { - for(int i=0;i<3;i++)buf.append(QString(proxy_protocols_table[i])); + for(int i=0;i<3;i++)buf.append(TQString(proxy_protocols_table[i])); } void KviProxy::normalizeUserAndPass() diff --git a/src/kvilib/ext/kvi_proxydb.h b/src/kvilib/ext/kvi_proxydb.h index 92fa2c44..0ab18f5e 100644 --- a/src/kvilib/ext/kvi_proxydb.h +++ b/src/kvilib/ext/kvi_proxydb.h @@ -28,7 +28,7 @@ #include "kvi_string.h" #include "kvi_inttypes.h" #include "kvi_pointerlist.h" -#include <qstringlist.h> +#include <tqstringlist.h> class KVILIB_API KviProxy { @@ -60,7 +60,7 @@ public: bool hasUser() const { return m_szUser.hasData(); }; unsigned int passLen() const { return (unsigned int)m_szPass.len(); }; unsigned int userLen() const { return (unsigned int)m_szUser.len(); }; - static void getSupportedProtocolNames(QStringList & buf); + static void getSupportedProtocolNames(TQStringList & buf); }; diff --git a/src/kvilib/ext/kvi_regchan.cpp b/src/kvilib/ext/kvi_regchan.cpp index a26c5969..d5eff0a3 100644 --- a/src/kvilib/ext/kvi_regchan.cpp +++ b/src/kvilib/ext/kvi_regchan.cpp @@ -28,10 +28,10 @@ #include "kvi_config.h" #include "kvi_qstring.h" -KviRegisteredChannel::KviRegisteredChannel(const KviStr &name,const KviStr &netmask) +KviRegisteredChannel::KviRegisteredChannel(const KviStr &name,const KviStr &nettqmask) { m_szName = name; - m_szNetMask = netmask; + m_szNetMask = nettqmask; m_pPropertyDict = new KviPointerHashTable<const char *,KviStr>(7,false,true); m_pPropertyDict->setAutoDelete(true); } @@ -67,9 +67,9 @@ void KviRegisteredChannelDataBase::load(const char * filename) KviRegisteredChannel * c = new KviRegisteredChannel(szChan,szMask); add(c); KviConfigGroupIterator sit(*d); - while(QString * s = sit.current()) + while(TQString * s = sit.current()) { - c->setProperty(KviQString::toUtf8(sit.currentKey()).data(),new KviStr(*s)); + c->setProperty(KviTQString::toUtf8(sit.currentKey()).data(),new KviStr(*s)); ++sit; } ++it; @@ -99,9 +99,9 @@ void KviRegisteredChannelDataBase::save(const char * filename) } } -KviRegisteredChannel * KviRegisteredChannelDataBase::find(const char * name,const char * net) +KviRegisteredChannel * KviRegisteredChannelDataBase::tqfind(const char * name,const char * net) { - KviRegisteredChannelList * l = m_pChannelDict->find(name); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(name); if(!l)return 0; for(KviRegisteredChannel * c = l->first();c;c = l->next()) { @@ -111,20 +111,20 @@ KviRegisteredChannel * KviRegisteredChannelDataBase::find(const char * name,cons return 0; } -KviRegisteredChannel * KviRegisteredChannelDataBase::findExact(const char * name,const char * netmask) +KviRegisteredChannel * KviRegisteredChannelDataBase::findExact(const char * name,const char * nettqmask) { - KviRegisteredChannelList * l = m_pChannelDict->find(name); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(name); if(!l)return 0; for(KviRegisteredChannel * c = l->first();c;c = l->next()) { - if(kvi_strEqualCI(c->netMask().ptr(),netmask))return c; + if(kvi_strEqualCI(c->netMask().ptr(),nettqmask))return c; } return 0; } void KviRegisteredChannelDataBase::remove(KviRegisteredChannel * c) { - KviRegisteredChannelList * l = m_pChannelDict->find(c->name().ptr()); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(c->name().ptr()); if(!l)return; for(KviRegisteredChannel * ch = l->first();ch;ch = l->next()) { @@ -156,7 +156,7 @@ void KviRegisteredChannelDataBase::add(KviRegisteredChannel * c) } remove(old); } - KviRegisteredChannelList * l = m_pChannelDict->find(c->name().ptr()); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(c->name().ptr()); if(!l) { l = new KviRegisteredChannelList; diff --git a/src/kvilib/ext/kvi_regchan.h b/src/kvilib/ext/kvi_regchan.h index f447c313..65393918 100644 --- a/src/kvilib/ext/kvi_regchan.h +++ b/src/kvilib/ext/kvi_regchan.h @@ -35,7 +35,7 @@ class KVILIB_API KviRegisteredChannel : public KviHeapObject { friend class KviRegisteredChannelDataBase; public: - KviRegisteredChannel(const KviStr &name,const KviStr &netmask); + KviRegisteredChannel(const KviStr &name,const KviStr &nettqmask); ~KviRegisteredChannel(); protected: KviStr m_szName; @@ -45,9 +45,9 @@ public: KviPointerHashTable<const char *,KviStr> * propertyDict(){ return m_pPropertyDict; }; const KviStr & name(){ return m_szName; }; const KviStr & netMask(){ return m_szNetMask; }; - KviStr * property(const char * name){ return m_pPropertyDict->find(name); }; + KviStr * property(const char * name){ return m_pPropertyDict->tqfind(name); }; // val must be allocated with NEW! - void setProperty(const char * name,KviStr * val){ m_pPropertyDict->replace(name,val); }; + void setProperty(const char * name,KviStr * val){ m_pPropertyDict->tqreplace(name,val); }; void removeProperty(const char * name){ m_pPropertyDict->remove(name); }; }; @@ -62,8 +62,8 @@ protected: KviPointerHashTable<const char *,KviRegisteredChannelList> * m_pChannelDict; public: KviPointerHashTable<const char *,KviRegisteredChannelList> * channelDict(){ return m_pChannelDict; }; - KviRegisteredChannel * find(const char * name,const char * net); - KviRegisteredChannel * findExact(const char * name,const char * netmask); + KviRegisteredChannel * tqfind(const char * name,const char * net); + KviRegisteredChannel * findExact(const char * name,const char * nettqmask); void remove(KviRegisteredChannel * c); void add(KviRegisteredChannel * c); void load(const char * filename); diff --git a/src/kvilib/ext/kvi_regusersdb.cpp b/src/kvilib/ext/kvi_regusersdb.cpp index 6d36c975..c60d2c9e 100644 --- a/src/kvilib/ext/kvi_regusersdb.cpp +++ b/src/kvilib/ext/kvi_regusersdb.cpp @@ -42,12 +42,12 @@ @short: Registration of users in KVIrc @keyterms: - registered users, registration mask, registered user properties, + registered users, registration tqmask, registered user properties, user properties, notify property, avatar property @body: [big]Introduction[/big][br] The "registered user database" is basically a set of users with associated - [doc:irc_masks]irc-masks[/doc] and properties.[br] + [doc:irc_tqmasks]irc-tqmasks[/doc] and properties.[br] It is used to recognize users on IRC and associate properties to them.[br] This works more or less like the IRC ban list, K-Line list, or invite list.[br] [big]User entry[/big][br] @@ -55,50 +55,50 @@ It may be the nickname of the user that you want to match, or the real name (if you know it) or any other string (even with spaces). The name is an "internal identifier" for the user entry: each name maps to a single entry and each entry has a single name.[br] - Each entry has a set of registration [doc:irc_masks]irc-masks[/doc]: these masks + Each entry has a set of registration [doc:irc_tqmasks]irc-tqmasks[/doc]: these tqmasks are used to recognize the user on irc.[br] [br] - [big]Registration masks[/big][br] - The masks have the common IRC mask format: [b]<nick>!<user>@<host>[/b][br] - The masks may contain '*' and '?' wildcards that match any portion of text.[br] + [big]Registration tqmasks[/big][br] + The tqmasks have the common IRC tqmask format: [b]<nick>!<user>@<host>[/b][br] + The tqmasks may contain '*' and '?' wildcards that match any portion of text.[br] [b]*!*@*[/b][br] [b]Pragma!*@*[/b][br] [b]*!~daemon@*[/b][br] [b]Pragma!*daemon@*.it[/b][br] [b]Pragma!?daemon@some*.it[/b][br] [b][email protected][/b][br] - Are examples of valid registration masks.[br] - The masks with wildcards can actually match more than a single user.[br] - For example the mask *!root@*.host.com will match all the users + Are examples of valid registration tqmasks.[br] + The tqmasks with wildcards can actually match more than a single user.[br] + For example the tqmask *!root@*.host.com will match all the users having root as username and coming from the host.com domain.[br] For this reason putting wildcards in nicknames could become a problem if not used carefully (but may also be used to achieve interesting tricks).[br] If you don't use wildcards in nicknames you are sure that - in a single irc connection , a mask will always refer to a single user.[br] + in a single irc connection , a tqmask will always refer to a single user.[br] You will commonly use the following format:[br] <nick>!*<username>@*.<host>.<top>[br] or[br] <nick>!*<username>@<number>.<number>.<number>.*[br] - In this way you can be 95% sure that the mask will really match the correct user.[br] + In this way you can be 95% sure that the tqmask will really match the correct user.[br] [br] [big]Example of registration and lookups[/big] Assume that you want to registere a friend of yours: Derek Riggs.[br] Derek often uses "Eddie" as his nickname "stranger" as username and has a dial-up connection that makes his IP address appear as <variable-number>.somewhere.in.time.org.[br] - You will add an entry with name "Derek Riggs" and a registration mask like the following: + You will add an entry with name "Derek Riggs" and a registration tqmask like the following: Eddie!stranger@*.somewhere.in.time.org.[br] - If the IRC servers keep adding strange characters ([doc:irc_masks]prefixes[/doc]) at the beginning of his username you may use + If the IRC servers keep adding strange characters ([doc:irc_tqmasks]prefixes[/doc]) at the beginning of his username you may use Eddie!*stranger@*.somewhere.in.time.org.[br] - If Eddie also often connects from the wasted.years.org domain and gets 'eddie' as username there, you might add a second registration mask as follows: + If Eddie also often connects from the wasted.years.org domain and gets 'eddie' as username there, you might add a second registration tqmask as follows: Eddie!*eddie@*.wasted.years.org.[br] - An alternative could be use only one mask with *.org as domain and allow any username (Eddie!*@*.org) but this + An alternative could be use only one tqmask with *.org as domain and allow any username (Eddie!*@*.org) but this could become dangerous since it could match the users that you don't want to.[br] On the other hand, if you dislike the users with the nickname Eddie that come from .org - and you're implementing an auto-kick system, the correct mask to register is "Eddie!*@*.org".[br] + and you're implementing an auto-kick system, the correct tqmask to register is "Eddie!*@*.org".[br] [br] KVirc ties to be smart , and always find the most correct match for an user: - If you have two masks registered: Pragma!*xor@*.myisp.it and *!*@*.myisp.it, + If you have two tqmasks registered: Pragma!*xor@*.myisp.it and *!*@*.myisp.it, kvirc will match [email protected] with the first one even if the second one matches too; the firs one is a best match.[br] [br] @@ -117,7 +117,7 @@ [br] [big]The interface to the database[/big][br] The [module:reguser]reguser module[/module] is the interface to the "registered users database".[br] - It provides a set of commands for adding and removing masks and manipulating properties.[br] + It provides a set of commands for adding and removing tqmasks and manipulating properties.[br] */ //============================================================================================================ @@ -140,7 +140,7 @@ KviRegisteredMask::KviRegisteredMask(KviRegisteredUser * u,KviIrcMask * m) // -KviRegisteredUser::KviRegisteredUser(const QString & name) +KviRegisteredUser::KviRegisteredUser(const TQString & name) { m_iIgnoreFlags =0; m_bIgnoreEnabled=false; @@ -162,52 +162,52 @@ bool KviRegisteredUser::isIgnoreEnabledFor(IgnoreFlags flag) return m_iIgnoreFlags & flag; } -KviIrcMask * KviRegisteredUser::findMask(const KviIrcMask &mask) +KviIrcMask * KviRegisteredUser::findMask(const KviIrcMask &tqmask) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { - if(*m == mask)return m; + if(*m == tqmask)return m; } return 0; } -bool KviRegisteredUser::addMask(KviIrcMask * mask) +bool KviRegisteredUser::addMask(KviIrcMask * tqmask) { - if(findMask(*mask)) + if(findMask(*tqmask)) { - delete mask; - mask = 0; + delete tqmask; + tqmask = 0; return false; } - m_pMaskList->append(mask); + m_pMaskList->append(tqmask); return true; } -bool KviRegisteredUser::removeMask(KviIrcMask * mask) +bool KviRegisteredUser::removeMask(KviIrcMask * tqmask) { - if(!mask)return false; - return m_pMaskList->removeRef(mask); + if(!tqmask)return false; + return m_pMaskList->removeRef(tqmask); } -bool KviRegisteredUser::matches(const KviIrcMask &mask) +bool KviRegisteredUser::matches(const KviIrcMask &tqmask) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { - if(m->matches(mask))return true; + if(m->matches(tqmask))return true; } return false; } -bool KviRegisteredUser::matchesFixed(const KviIrcMask &mask) +bool KviRegisteredUser::matchesFixed(const KviIrcMask &tqmask) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { - if(m->matchesFixed(mask))return true; + if(m->matchesFixed(tqmask))return true; } return false; } -bool KviRegisteredUser::matchesFixed(const QString & nick,const QString & user,const QString & host) +bool KviRegisteredUser::matchesFixed(const TQString & nick,const TQString & user,const TQString & host) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { @@ -216,28 +216,28 @@ bool KviRegisteredUser::matchesFixed(const QString & nick,const QString & user,c return false; } -void KviRegisteredUser::setProperty(const QString &name,bool value) +void KviRegisteredUser::setProperty(const TQString &name,bool value) { - setProperty(name,value ? QString("true") : QString("false")); + setProperty(name,value ? TQString("true") : TQString("false")); } -void KviRegisteredUser::setProperty(const QString & name,const QString & value) +void KviRegisteredUser::setProperty(const TQString & name,const TQString & value) { if(!value.isEmpty()) { if(!m_pPropertyDict) { - m_pPropertyDict = new KviPointerHashTable<QString,QString>(7,false); + m_pPropertyDict = new KviPointerHashTable<TQString,TQString>(7,false); m_pPropertyDict->setAutoDelete(true); } #ifdef COMPILE_USE_QT4 - QString * val = new QString(value.trimmed()); + TQString * val = new TQString(value.trimmed()); #else - QString * val = new QString(value.stripWhiteSpace()); + TQString * val = new TQString(value.stripWhiteSpace()); #endif if(!val->isEmpty()) { - m_pPropertyDict->replace(name,val); + m_pPropertyDict->tqreplace(name,val); } else { delete val; val = 0; @@ -247,39 +247,39 @@ void KviRegisteredUser::setProperty(const QString & name,const QString & value) } } -bool KviRegisteredUser::getProperty(const QString & name,QString &value) +bool KviRegisteredUser::getProperty(const TQString & name,TQString &value) { if(!m_pPropertyDict)return false; if(name.isEmpty()) return false; - QString * pValue = m_pPropertyDict->find(name); + TQString * pValue = m_pPropertyDict->tqfind(name); if(pValue)value = *pValue; else return false; return true; } -const QString & KviRegisteredUser::getProperty(const QString & name) +const TQString & KviRegisteredUser::getProperty(const TQString & name) { - if(!m_pPropertyDict)return KviQString::empty; - if(name.isEmpty())return KviQString::empty; - QString * pValue = m_pPropertyDict->find(name); + if(!m_pPropertyDict)return KviTQString::empty; + if(name.isEmpty())return KviTQString::empty; + TQString * pValue = m_pPropertyDict->tqfind(name); if(pValue)return *pValue; - return KviQString::empty; + return KviTQString::empty; } -bool KviRegisteredUser::getBoolProperty(const QString & name,bool def) +bool KviRegisteredUser::getBoolProperty(const TQString & name,bool def) { if(!m_pPropertyDict)return def; if(name.isEmpty()) return def; - QString * pValue = m_pPropertyDict->find(name); + TQString * pValue = m_pPropertyDict->tqfind(name); if(pValue) { // be flexible , allow more "true" values (pragma) - if(KviQString::equalCS(*pValue,"1"))return true; - if(KviQString::equalCI(*pValue,"true"))return true; - if(KviQString::equalCI(*pValue,"yes"))return true; - //if(KviQString::equalCI(*pValue,"yeah"))return true; - //if(KviQString::equalCI(*pValue,"sure"))return true; - //if(KviQString::equalCI(*pValue,"sureashell"))return true; + if(KviTQString::equalCS(*pValue,"1"))return true; + if(KviTQString::equalCI(*pValue,"true"))return true; + if(KviTQString::equalCI(*pValue,"yes"))return true; + //if(KviTQString::equalCI(*pValue,"yeah"))return true; + //if(KviTQString::equalCI(*pValue,"sure"))return true; + //if(KviTQString::equalCI(*pValue,"sureashell"))return true; } return def; } @@ -289,7 +289,7 @@ bool KviRegisteredUser::getBoolProperty(const QString & name,bool def) // KviRegisteredUserGroup // -KviRegisteredUserGroup::KviRegisteredUserGroup(const QString &name) +KviRegisteredUserGroup::KviRegisteredUserGroup(const TQString &name) { setName(name); } @@ -306,16 +306,16 @@ KviRegisteredUserGroup::~KviRegisteredUserGroup() KviRegisteredUserDataBase::KviRegisteredUserDataBase() { - m_pUserDict = new KviPointerHashTable<QString,KviRegisteredUser>(31,false); // do not copy keys + m_pUserDict = new KviPointerHashTable<TQString,KviRegisteredUser>(31,false); // do not copy keys m_pUserDict->setAutoDelete(true); m_pWildMaskList = new KviRegisteredMaskList; m_pWildMaskList->setAutoDelete(true); - m_pMaskDict = new KviPointerHashTable<QString,KviRegisteredMaskList>(49,false); // copy keys here! + m_pMaskDict = new KviPointerHashTable<TQString,KviRegisteredMaskList>(49,false); // copy keys here! m_pMaskDict->setAutoDelete(true); - m_pGroupDict = new KviPointerHashTable<QString,KviRegisteredUserGroup>(5,false); // copy keys here! + m_pGroupDict = new KviPointerHashTable<TQString,KviRegisteredUserGroup>(5,false); // copy keys here! m_pGroupDict->setAutoDelete(true); } @@ -328,40 +328,40 @@ KviRegisteredUserDataBase::~KviRegisteredUserDataBase() delete m_pGroupDict; } -KviRegisteredUser * KviRegisteredUserDataBase::addUser(const QString & name) +KviRegisteredUser * KviRegisteredUserDataBase::addUser(const TQString & name) { if(name.isEmpty()) return false; - if(m_pUserDict->find(name))return 0; + if(m_pUserDict->tqfind(name))return 0; KviRegisteredUser * u = new KviRegisteredUser(name); - m_pUserDict->replace(u->name(),u); //u->name() because we're NOT copying keys! + m_pUserDict->tqreplace(u->name(),u); //u->name() because we're NOT copying keys! emit(userAdded(name)); return u; } -KviRegisteredUserGroup * KviRegisteredUserDataBase::addGroup(const QString & name) +KviRegisteredUserGroup * KviRegisteredUserDataBase::addGroup(const TQString & name) { if(name.isEmpty()) return false; - if(m_pGroupDict->find(name))return 0; + if(m_pGroupDict->tqfind(name))return 0; KviRegisteredUserGroup * pGroup = new KviRegisteredUserGroup(name); - m_pGroupDict->replace(pGroup->name(),pGroup); //u->name() because we're NOT copying keys! + m_pGroupDict->tqreplace(pGroup->name(),pGroup); //u->name() because we're NOT copying keys! return pGroup; } -KviRegisteredUser * KviRegisteredUserDataBase::getUser(const QString & name) +KviRegisteredUser * KviRegisteredUserDataBase::getUser(const TQString & name) { if(name.isEmpty()) return 0; - KviRegisteredUser * u = m_pUserDict->find(name); + KviRegisteredUser * u = m_pUserDict->tqfind(name); if(!u) { u = new KviRegisteredUser(name); - m_pUserDict->replace(u->name(),u); //u->name() because we're NOT copying keys! + m_pUserDict->tqreplace(u->name(),u); //u->name() because we're NOT copying keys! } return u; } -static void append_mask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,KviIrcMask *mask) +static void append_tqmask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,KviIrcMask *tqmask) { - KviRegisteredMask * newMask = new KviRegisteredMask(u,mask); + KviRegisteredMask * newMask = new KviRegisteredMask(u,tqmask); int idx = 0; for(KviRegisteredMask * m = l->first();m;m = l->next()) { @@ -375,65 +375,65 @@ static void append_mask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,Kv l->append(newMask); } -KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,KviIrcMask * mask) +KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,KviIrcMask * tqmask) { - if(!u || !mask) return 0; - __range_valid(u == m_pUserDict->find(u->name())); + if(!u || !tqmask) return 0; + __range_valid(u == m_pUserDict->tqfind(u->name())); KviRegisteredMaskList * l; - if(mask->hasWildNick()) + if(tqmask->hasWildNick()) { for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(*(m->mask()) == *mask) + if(*(m->tqmask()) == *tqmask) { - delete mask; - mask = 0; + delete tqmask; + tqmask = 0; return m->user(); } } // not found ...ok... add it - // masks with more info go first in the list + // tqmasks with more info go first in the list l = m_pWildMaskList; } else { - l = m_pMaskDict->find(mask->nick()); + l = m_pMaskDict->tqfind(tqmask->nick()); if(l) { // FIXME: #warning "Here we could compare the host and username only: nick matches for sure" for(KviRegisteredMask * m = l->first();m;m = l->next()) { - if(*(m->mask()) == *mask) + if(*(m->tqmask()) == *tqmask) { - delete mask; - mask = 0; + delete tqmask; + tqmask = 0; return m->user(); } } // not found ...ok... add it } else { // not found ...ok... add it - // this is the first mask in the list + // this is the first tqmask in the list l = new KviRegisteredMaskList; l->setAutoDelete(true); - if(!u->addMask(mask)) + if(!u->addMask(tqmask)) { debug(" Ops...got an incoherent regusers action...recovered ?"); delete l; l = 0; } else { - append_mask_to_list(l,u,mask); - m_pMaskDict->insert(mask->nick(),l); + append_tqmask_to_list(l,u,tqmask); + m_pMaskDict->insert(tqmask->nick(),l); } return 0; } } // Ok...add it - if(!u->addMask(mask)) + if(!u->addMask(tqmask)) { debug("ops...got an incoherent regusers action...recovered ?"); return 0; // ops...already there ? } - append_mask_to_list(l,u,mask); + append_tqmask_to_list(l,u,tqmask); return 0; } @@ -445,23 +445,23 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db) m_pGroupDict->clear(); emit(databaseCleared()); - KviPointerHashTableIterator<QString,KviRegisteredUser> it(*(db->m_pUserDict)); + KviPointerHashTableIterator<TQString,KviRegisteredUser> it(*(db->m_pUserDict)); while(KviRegisteredUser * theCur = it.current()) { KviRegisteredUser * u = getUser(theCur->name()); - // copy masks - KviPointerList<KviIrcMask> * l = theCur->maskList(); + // copy tqmasks + KviPointerList<KviIrcMask> * l = theCur->tqmaskList(); for(KviIrcMask * m=l->first();m;m = l->next()) { KviIrcMask * m2 = new KviIrcMask(*m); addMask(u,m2); } // copy properties - KviPointerHashTable<QString,QString> * pd = theCur->propertyDict(); + KviPointerHashTable<TQString,TQString> * pd = theCur->propertyDict(); if(pd) { - KviPointerHashTableIterator<QString,QString> pdi(*pd); + KviPointerHashTableIterator<TQString,TQString> pdi(*pd); while(pdi.current()) { u->setProperty(pdi.currentKey(),*(pdi.current())); @@ -474,7 +474,7 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db) ++it; } - KviPointerHashTableIterator<QString,KviRegisteredUserGroup> git(*db->m_pGroupDict); + KviPointerHashTableIterator<TQString,KviRegisteredUserGroup> git(*db->m_pGroupDict); while(git.current()) { addGroup(git.currentKey()); @@ -483,34 +483,34 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db) } -bool KviRegisteredUserDataBase::removeUser(const QString & name) +bool KviRegisteredUserDataBase::removeUser(const TQString & name) { if(name.isEmpty()) return false; - KviRegisteredUser * u = m_pUserDict->find(name); + KviRegisteredUser * u = m_pUserDict->tqfind(name); if(!u)return false; - while(KviIrcMask * mask = u->maskList()->first()) + while(KviIrcMask * tqmask = u->tqmaskList()->first()) { - if(!removeMaskByPointer(mask)) - debug("Ops... removeMaskByPointer(%s) failed ?",KviQString::toUtf8(name).data()); + if(!removeMaskByPointer(tqmask)) + debug("Ops... removeMaskByPointer(%s) failed ?",KviTQString::toUtf8(name).data()); } emit(userRemoved(name)); m_pUserDict->remove(name); return true; } -bool KviRegisteredUserDataBase::removeGroup(const QString & name) +bool KviRegisteredUserDataBase::removeGroup(const TQString & name) { if(name.isEmpty()) return false; m_pGroupDict->remove(name); return true; } -bool KviRegisteredUserDataBase::removeMask(const KviIrcMask &mask) +bool KviRegisteredUserDataBase::removeMask(const KviIrcMask &tqmask) { - // find the mask pointer - KviRegisteredMask * m = findExactMask(mask); + // find the tqmask pointer + KviRegisteredMask * m = findExactMask(tqmask); // and remove it if(m){ - if(removeMaskByPointer(m->mask())) + if(removeMaskByPointer(m->tqmask())) { return true; } @@ -518,36 +518,36 @@ bool KviRegisteredUserDataBase::removeMask(const KviIrcMask &mask) return 0; } -bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * mask) +bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * tqmask) { - if(!mask) return 0; - if(mask->hasWildNick()) + if(!tqmask) return 0; + if(tqmask->hasWildNick()) { // remove from the wild list for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(m->mask() == mask) + if(m->tqmask() == tqmask) { // ok..got it, remove from the list and from the user struct (user struct deletes it!) - emit(userChanged(mask->nick())); - m->user()->removeMask(mask); // this one deletes m->mask() + emit(userChanged(tqmask->nick())); + m->user()->removeMask(tqmask); // this one deletes m->tqmask() m_pWildMaskList->removeRef(m); // this one deletes m return true; } } // not found ...opz :) } else { - KviRegisteredMaskList * l = m_pMaskDict->find(mask->nick()); + KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask->nick()); if(l) { // FIXME: #warning "Here we could compare the host and username only: nick matches for sure" for(KviRegisteredMask * m = l->first();m;m = l->next()) { - if(m->mask() == mask) + if(m->tqmask() == tqmask) { - QString nick = mask->nick(); + TQString nick = tqmask->nick(); emit(userChanged(nick)); - m->user()->removeMask(mask); // this one deletes m->mask() (or mask) + m->user()->removeMask(tqmask); // this one deletes m->tqmask() (or tqmask) l->removeRef(m); // this one deletes m if(l->count() == 0)m_pMaskDict->remove(nick); return true; @@ -563,89 +563,89 @@ bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * mask) /* -KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const KviIrcMask &mask) +KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const KviIrcMask &tqmask) { - // first lookup the nickname in the maskDict - KviRegisteredMaskList * l = m_pMaskDict->find(mask.nick()); + // first lookup the nickname in the tqmaskDict + KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask.nick()); if(l) { for(KviRegisteredMask *m = l->first();m;m = l->next()) { - if(m->mask()->matchesFixed(0,mask.user(),mask.host()))return m->user(); + if(m->tqmask()->matchesFixed(0,tqmask.user(),tqmask.host()))return m->user(); } } // not found....lookup the wild ones for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(m->mask()->matchesFixed(mask))return m->user(); + if(m->tqmask()->matchesFixed(tqmask))return m->user(); } return 0; // no match at all } */ -KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const QString & nick,const QString &user,const QString & host) +KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const TQString & nick,const TQString &user,const TQString & host) { KviRegisteredMask * m = findMatchingMask(nick,user,host); if(m)return m->user(); return 0; // no match at all } -KviRegisteredMask * KviRegisteredUserDataBase::findMatchingMask(const QString & nick,const QString &user,const QString & host) +KviRegisteredMask * KviRegisteredUserDataBase::findMatchingMask(const TQString & nick,const TQString &user,const TQString & host) { - // first lookup the nickname in the maskDict + // first lookup the nickname in the tqmaskDict if(nick.isEmpty()) return false; - KviRegisteredMaskList * l = m_pMaskDict->find(nick); + KviRegisteredMaskList * l = m_pMaskDict->tqfind(nick); if(l) { for(KviRegisteredMask *m = l->first();m;m = l->next()) { - if(m->mask()->matchesFixed(nick,user,host))return m; + if(m->tqmask()->matchesFixed(nick,user,host))return m; } } // not found....lookup the wild ones for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(m->mask()->matchesFixed(nick,user,host))return m; + if(m->tqmask()->matchesFixed(nick,user,host))return m; } return 0; // no match at all } -KviRegisteredUser * KviRegisteredUserDataBase::findUserWithMask(const KviIrcMask &mask) +KviRegisteredUser * KviRegisteredUserDataBase::findUserWithMask(const KviIrcMask &tqmask) { - KviRegisteredMask * m = findExactMask(mask); + KviRegisteredMask * m = findExactMask(tqmask); if(m)return m->user(); return 0; } -KviRegisteredMask * KviRegisteredUserDataBase::findExactMask(const KviIrcMask &mask) +KviRegisteredMask * KviRegisteredUserDataBase::findExactMask(const KviIrcMask &tqmask) { - // first lookup the nickname in the maskDict - if(mask.nick()=="") return 0; - KviRegisteredMaskList * l = m_pMaskDict->find(mask.nick()); + // first lookup the nickname in the tqmaskDict + if(tqmask.nick()=="") return 0; + KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask.nick()); if(l) { for(KviRegisteredMask *m = l->first();m;m = l->next()) { - if(*(m->mask()) == mask)return m; + if(*(m->tqmask()) == tqmask)return m; } } // not found....lookup the wild ones for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(*(m->mask()) == mask)return m; + if(*(m->tqmask()) == tqmask)return m; } return 0; // no match at all } /* -bool KviRegisteredUserDataBase::isIgnoredUser(const QString & nick,const QString & user,const QString & host) +bool KviRegisteredUserDataBase::isIgnoredUser(const TQString & nick,const TQString & user,const TQString & host) { KviRegisteredUser * u = findMatchingUser(nick,user,host); if(u)return u->getBoolProperty("IGNORE"); else return false; } */ -void KviRegisteredUserDataBase::load(const QString & filename) +void KviRegisteredUserDataBase::load(const TQString & filename) { - QString szCurrent; + TQString szCurrent; KviConfig cfg(filename,KviConfig::Read); KviConfigIterator it(*cfg.dict()); @@ -653,7 +653,7 @@ void KviRegisteredUserDataBase::load(const QString & filename) { cfg.setGroup(it.currentKey()); szCurrent=it.currentKey(); - if(KviQString::equalCSN("#Group ",szCurrent,7)) + if(KviTQString::equalCSN("#Group ",szCurrent,7)) { szCurrent.remove(0,7); addGroup(szCurrent); @@ -667,16 +667,16 @@ void KviRegisteredUserDataBase::load(const QString & filename) KviConfigGroupIterator sdi(*(it.current())); while(sdi.current()) { - QString tmp = sdi.currentKey(); - if(KviQString::equalCSN("prop_",tmp,5)) + TQString tmp = sdi.currentKey(); + if(KviTQString::equalCSN("prop_",tmp,5)) { tmp.remove(0,5); u->setProperty(tmp,*(sdi.current())); - } else if(KviQString::equalCSN("mask_",tmp,5)) + } else if(KviTQString::equalCSN("tqmask_",tmp,5)) { - KviIrcMask * mask = new KviIrcMask(*(sdi.current())); - addMask(u,mask); - } else if(KviQString::equalCI(tmp,"Group")) + KviIrcMask * tqmask = new KviIrcMask(*(sdi.current())); + addMask(u,tqmask); + } else if(KviTQString::equalCI(tmp,"Group")) { u->setGroup(*(sdi.current())); } @@ -686,18 +686,18 @@ void KviRegisteredUserDataBase::load(const QString & filename) } ++it; } - if(!m_pGroupDict->find(__tr("Default"))) + if(!m_pGroupDict->tqfind(__tr("Default"))) addGroup(__tr("Default")); } -void KviRegisteredUserDataBase::save(const QString & filename) +void KviRegisteredUserDataBase::save(const TQString & filename) { KviConfig cfg(filename,KviConfig::Write); cfg.clear(); cfg.preserveEmptyGroups(true); - KviPointerHashTableIterator<QString,KviRegisteredUser> it(*m_pUserDict); + KviPointerHashTableIterator<TQString,KviRegisteredUser> it(*m_pUserDict); while(it.current()) { @@ -707,35 +707,35 @@ void KviRegisteredUserDataBase::save(const QString & filename) cfg.writeEntry("IgnoreFlags",it.current()->ignoreFlags()); if(it.current()->propertyDict()) { - KviPointerHashTableIterator<QString,QString> pit(*(it.current()->propertyDict())); + KviPointerHashTableIterator<TQString,TQString> pit(*(it.current()->propertyDict())); while(pit.current()) { - QString tmp = "prop_"; + TQString tmp = "prop_"; tmp.append(pit.currentKey()); cfg.writeEntry(tmp,*(pit.current())); ++pit; } } - // Write masks + // Write tqmasks int idx = 0; - for(KviIrcMask * m = it.current()->maskList()->first();m;m = it.current()->maskList()->next()) + for(KviIrcMask * m = it.current()->tqmaskList()->first();m;m = it.current()->tqmaskList()->next()) { - QString tmp; - KviQString::sprintf(tmp,"mask_%d",idx); - QString mask; - m->mask(mask,KviIrcMask::NickUserHost); - cfg.writeEntry(tmp,mask); + TQString tmp; + KviTQString::sprintf(tmp,"tqmask_%d",idx); + TQString tqmask; + m->tqmask(tqmask,KviIrcMask::NickUserHost); + cfg.writeEntry(tmp,tqmask); ++idx; } cfg.writeEntry("Group",it.current()->group()); ++it; } - KviPointerHashTableIterator<QString,KviRegisteredUserGroup> git(*m_pGroupDict); - QString szTmp; + KviPointerHashTableIterator<TQString,KviRegisteredUserGroup> git(*m_pGroupDict); + TQString szTmp; while(git.current()) { - KviQString::sprintf(szTmp,"#Group %Q",&(git.current()->name())); + KviTQString::sprintf(szTmp,"#Group %Q",&(git.current()->name())); cfg.setGroup(szTmp); ++git; } diff --git a/src/kvilib/ext/kvi_regusersdb.h b/src/kvilib/ext/kvi_regusersdb.h index 06152f24..0cfd6c71 100644 --- a/src/kvilib/ext/kvi_regusersdb.h +++ b/src/kvilib/ext/kvi_regusersdb.h @@ -27,7 +27,7 @@ // // REGISTERED USERS // -// Here we manage users resigered by mask and their (generic!) properties +// Here we manage users resigered by tqmask and their (generic!) properties // #include "kvi_settings.h" @@ -38,7 +38,7 @@ #include "kvi_pointerlist.h" #include "kvi_pointerhashtable.h" -#include <qobject.h> +#include <tqobject.h> class KviRegisteredUserDataBase; @@ -64,20 +64,20 @@ public: Dcc=32 }; - KviRegisteredUser(const QString &name); + KviRegisteredUser(const TQString &name); ~KviRegisteredUser(); private: int m_iIgnoreFlags; bool m_bIgnoreEnabled; - QString m_szName; - QString m_szGroup; - KviPointerHashTable<QString,QString> * m_pPropertyDict; // owned properties - KviPointerList<KviIrcMask> * m_pMaskList; // owned masks + TQString m_szName; + TQString m_szGroup; + KviPointerHashTable<TQString,TQString> * m_pPropertyDict; // owned properties + KviPointerList<KviIrcMask> * m_pMaskList; // owned tqmasks protected: - // mask ownership is transferred! (always!) returns false if the mask was already there - bool addMask(KviIrcMask * mask); - bool removeMask(KviIrcMask * mask); - KviIrcMask * findMask(const KviIrcMask &mask); + // tqmask ownership is transferred! (always!) returns false if the tqmask was already there + bool addMask(KviIrcMask * tqmask); + bool removeMask(KviIrcMask * tqmask); + KviIrcMask * findMask(const KviIrcMask &tqmask); public: int ignoreFlags() { return m_iIgnoreFlags; }; void setIgnoreFlags(int flags) {m_iIgnoreFlags=flags; }; @@ -85,24 +85,24 @@ public: void setIgnoreEnabled(bool enabled) {m_bIgnoreEnabled=enabled;}; bool isIgnoreEnabledFor(IgnoreFlags flag); - const QString &name(){ return m_szName; }; - bool matches(const KviIrcMask &mask); - bool matchesFixed(const KviIrcMask &mask); - bool matchesFixed(const QString &nick,const QString &user,const QString &host); + const TQString &name(){ return m_szName; }; + bool matches(const KviIrcMask &tqmask); + bool matchesFixed(const KviIrcMask &tqmask); + bool matchesFixed(const TQString &nick,const TQString &user,const TQString &host); - void setProperty(const QString &name,const QString &value); - void setProperty(const QString &name,bool value); + void setProperty(const TQString &name,const TQString &value); + void setProperty(const TQString &name,bool value); - void setGroup(const QString &name) { m_szGroup=name; }; - const QString &group(){ return m_szGroup; }; + void setGroup(const TQString &name) { m_szGroup=name; }; + const TQString &group(){ return m_szGroup; }; - const QString & getProperty(const QString &name); // returns 0 if the property is not there - bool getProperty(const QString &name,QString &value); // returns false if the property is not there - bool getBoolProperty(const QString &name,bool def=FALSE); // returns true if the property is there and is true + const TQString & getProperty(const TQString &name); // returns 0 if the property is not there + bool getProperty(const TQString &name,TQString &value); // returns false if the property is not there + bool getBoolProperty(const TQString &name,bool def=FALSE); // returns true if the property is there and is true // the propertyDict may be 0! - KviPointerHashTable<QString,QString> * propertyDict(){ return m_pPropertyDict; }; - // this is never zero (but may contain no masks) - KviPointerList<KviIrcMask> * maskList(){ return m_pMaskList; }; + KviPointerHashTable<TQString,TQString> * propertyDict(){ return m_pPropertyDict; }; + // this is never zero (but may contain no tqmasks) + KviPointerList<KviIrcMask> * tqmaskList(){ return m_pMaskList; }; }; //============================================================================================================ @@ -114,13 +114,13 @@ class KVILIB_API KviRegisteredUserGroup : public KviHeapObject { friend class KviRegisteredUserDataBase; public: - KviRegisteredUserGroup(const QString &name); + KviRegisteredUserGroup(const TQString &name); ~KviRegisteredUserGroup(); - void setName(const QString &name) { m_szName=name; }; - const QString &name(){ return m_szName; }; + void setName(const TQString &name) { m_szName=name; }; + const TQString &name(){ return m_szName; }; private: - QString m_szName; + TQString m_szName; }; //============================================================================================================ // @@ -139,7 +139,7 @@ public: public: int nonWildChars(){ return m_iMaskNonWildChars; }; KviRegisteredUser * user(){ return m_pUser; }; - KviIrcMask * mask(){ return m_pMask; }; + KviIrcMask * tqmask(){ return m_pMask; }; }; typedef KviPointerList<KviRegisteredMask> KviRegisteredMaskList; @@ -149,51 +149,52 @@ typedef KviPointerList<KviRegisteredMask> KviRegisteredMaskList; // KviRegisteredUsersDb // // Manages a set of KviRegisteredUser instances stored in the m_pUserDict dictionary -// The users are identified by masks stored in m_pMaskDict and m_pWildMaskList +// The users are identified by tqmasks stored in m_pMaskDict and m_pWildMaskList // m_pMaskDict contains lists of non wild-nick KviRegisteredMask that point to users // m_pWildMaskList is a list of wild-nick KviRegisteredMask that point to users // -class KVILIB_API KviRegisteredUserDataBase : public QObject +class KVILIB_API KviRegisteredUserDataBase : public TQObject { Q_OBJECT + TQ_OBJECT public: KviRegisteredUserDataBase(); ~KviRegisteredUserDataBase(); private: - KviPointerHashTable<QString,KviRegisteredUser> * m_pUserDict; // unique namespace, owns the objects, does not copy keys - KviPointerHashTable<QString,KviRegisteredMaskList> * m_pMaskDict; // owns the objects, copies the keys + KviPointerHashTable<TQString,KviRegisteredUser> * m_pUserDict; // unique namespace, owns the objects, does not copy keys + KviPointerHashTable<TQString,KviRegisteredMaskList> * m_pMaskDict; // owns the objects, copies the keys KviRegisteredMaskList * m_pWildMaskList; // owns the objects - KviPointerHashTable<QString,KviRegisteredUserGroup>* m_pGroupDict; + KviPointerHashTable<TQString,KviRegisteredUserGroup>* m_pGroupDict; public: void copyFrom(KviRegisteredUserDataBase * db); - KviRegisteredUser * addUser(const QString &name); // returns 0 if already there - KviRegisteredUser * getUser(const QString &name); // returns existing or adds - bool removeUser(const QString &name); - bool removeGroup(const QString &name); - KviRegisteredUser * findUserByName(const QString &name){ return m_pUserDict->find(name); }; - // mask must be allocated on the heap and the ownership is transferred! - // returns non zero if there is already an user with this mask (returns the pointer to it!) - KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * mask); - bool removeMaskByPointer(KviIrcMask * mask); - bool removeMask(const KviIrcMask &mask); - KviRegisteredUser * findMatchingUser(const QString &nick,const QString &user,const QString &host); - KviRegisteredUser * findUserWithMask(const KviIrcMask &mask); - KviRegisteredMask * findExactMask(const KviIrcMask &mask); - KviRegisteredMask * findMatchingMask(const QString &nick,const QString &user,const QString &host); + KviRegisteredUser * addUser(const TQString &name); // returns 0 if already there + KviRegisteredUser * getUser(const TQString &name); // returns existing or adds + bool removeUser(const TQString &name); + bool removeGroup(const TQString &name); + KviRegisteredUser * findUserByName(const TQString &name){ return m_pUserDict->tqfind(name); }; + // tqmask must be allocated on the heap and the ownership is transferred! + // returns non zero if there is already an user with this tqmask (returns the pointer to it!) + KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * tqmask); + bool removeMaskByPointer(KviIrcMask * tqmask); + bool removeMask(const KviIrcMask &tqmask); + KviRegisteredUser * findMatchingUser(const TQString &nick,const TQString &user,const TQString &host); + KviRegisteredUser * findUserWithMask(const KviIrcMask &tqmask); + KviRegisteredMask * findExactMask(const KviIrcMask &tqmask); + KviRegisteredMask * findMatchingMask(const TQString &nick,const TQString &user,const TQString &host); //Only used in few places (actually one) of the code, but lot of times;perfect for inlining... //bool isIgnoredUser(const char * nick,const char * user,const char * host); - void load(const QString &filename); - void save(const QString &filename); + void load(const TQString &filename); + void save(const TQString &filename); - KviPointerHashTable<QString,KviRegisteredUser> * userDict(){ return m_pUserDict; }; - KviPointerHashTable<QString,KviRegisteredUserGroup>* groupDict() { return m_pGroupDict; }; + KviPointerHashTable<TQString,KviRegisteredUser> * userDict(){ return m_pUserDict; }; + KviPointerHashTable<TQString,KviRegisteredUserGroup>* groupDict() { return m_pGroupDict; }; - KviRegisteredUserGroup* addGroup(const QString &name); + KviRegisteredUserGroup* addGroup(const TQString &name); signals: - void userRemoved(const QString&); - void userChanged(const QString&); - void userAdded (const QString&); + void userRemoved(const TQString&); + void userChanged(const TQString&); + void userAdded (const TQString&); void databaseCleared(); }; diff --git a/src/kvilib/ext/kvi_sharedfiles.cpp b/src/kvilib/ext/kvi_sharedfiles.cpp index 65ce0d69..b3c96e11 100644 --- a/src/kvilib/ext/kvi_sharedfiles.cpp +++ b/src/kvilib/ext/kvi_sharedfiles.cpp @@ -30,7 +30,7 @@ #include "kvi_config.h" #include "kvi_fileutils.h" -#include <qfileinfo.h> +#include <tqfileinfo.h> // TODO: Match servers that the file requests come from // TODO: Max number of downloads ? @@ -60,7 +60,7 @@ with /usr/arch/mp3/SonataArctica_SingInSilence_Live.mp3 as real file path , something like "SonataArctica_SingInSilence.mp3". A remote user will then request you a DCC GET SonataArctica_SingInSilence.mp3 and KVIrc will automatically send the file.[br] - Each file offer has an "user mask" that the requesting remote users must match to + Each file offer has an "user tqmask" that the requesting remote users must match to obtain the file: *!*@* matches any user, Pragma!*@* matches any user with nickname pragma, *!*@*.omnikron.net matches any user coming from the omnikron.net domain.[br] Each offer can have an expire time: the offer will be automatically removed after @@ -69,8 +69,8 @@ use an additional "size" parameter in the DCC GET request.[br] [big]Security issues[/big] This is a nice but unsecure method of sharing files.[br] - The user mask is a good protection but you have to use it properly!.[br] - Setting the user mask to Nick!*@* can be easily exploited (just by making an user disconnect + The user tqmask is a good protection but you have to use it properly!.[br] + Setting the user tqmask to Nick!*@* can be easily exploited (just by making an user disconnect in one of the well known ways and then by using his nickname).[br] On the other side, the remote end must know exactly the visible name of the offer to request and noone but you will tell him that name.[br] @@ -79,7 +79,7 @@ Please don't send complains if someone stoles your /etc/passwd : it is because you have permitted that.[br] */ -KviSharedFile::KviSharedFile(const QString &szName,const QString &szAbsPath,const QString &szUserMask,time_t expireTime,unsigned int uFileSize) +KviSharedFile::KviSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szUserMask,time_t expireTime,unsigned int uFileSize) { m_szName = szName; m_szAbsFilePath = szAbsPath; @@ -87,10 +87,10 @@ KviSharedFile::KviSharedFile(const QString &szName,const QString &szAbsPath,cons m_expireTime = expireTime; m_uFileSize = uFileSize; #ifdef COMPILE_USE_QT4 - // QT4ROX: Because they have finally moved the functionality of QString::contains() to QString::count(), and QString::contains() now does the right job + // QT4ROX: Because they have finally moved the functionality of TQString::tqcontains() to TQString::count(), and TQString::tqcontains() now does the right job m_uWildCount = m_szUserMask.count('*'); #else - m_uWildCount = m_szUserMask.contains('*'); + m_uWildCount = m_szUserMask.tqcontains('*'); #endif m_uNonWildCount = m_szUserMask.length() - m_uWildCount; } @@ -101,12 +101,12 @@ KviSharedFile::~KviSharedFile() KviSharedFilesManager::KviSharedFilesManager() -: QObject() +: TQObject() { - m_pSharedListDict = new KviPointerHashTable<QString,KviSharedFileList>(); + m_pSharedListDict = new KviPointerHashTable<TQString,KviSharedFileList>(); m_pSharedListDict->setAutoDelete(true); - m_pCleanupTimer = new QTimer(); - connect(m_pCleanupTimer,SIGNAL(timeout()),this,SLOT(cleanup())); + m_pCleanupTimer = new TQTimer(); + connect(m_pCleanupTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(cleanup())); } KviSharedFilesManager::~KviSharedFilesManager() @@ -118,13 +118,13 @@ KviSharedFilesManager::~KviSharedFilesManager() void KviSharedFilesManager::cleanup() { - KviPointerHashTableIterator<QString,KviSharedFileList> it(*m_pSharedListDict); + KviPointerHashTableIterator<TQString,KviSharedFileList> it(*m_pSharedListDict); time_t curTime = time(0); bool bOtherStuffToCleanup = false; //bool bChanged = false; - KviPointerList<QString> lDying; + KviPointerList<TQString> lDying; lDying.setAutoDelete(true); while(KviSharedFileList * l = it.current()) @@ -150,12 +150,12 @@ void KviSharedFilesManager::cleanup() emit sharedFileRemoved(fo); } if(l->count() == 0) - lDying.append(new QString(it.currentKey())); + lDying.append(new TQString(it.currentKey())); ++it; } - for(QString * pDyingKey = lDying.first();pDyingKey;pDyingKey = lDying.next()) + for(TQString * pDyingKey = lDying.first();pDyingKey;pDyingKey = lDying.next()) m_pSharedListDict->remove(*pDyingKey); if(!bOtherStuffToCleanup)m_pCleanupTimer->stop(); @@ -175,7 +175,7 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) { if(o->wildcardCount() > 0) { - // the new mask has wildcards... if the current one has none, skip it + // the new tqmask has wildcards... if the current one has none, skip it if(fo->wildcardCount() > 0) { // the one in the list has wildcards too... @@ -200,7 +200,7 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) } } // else the current has no wildcards...skip } else { - // the new mask has no wildcards.... + // the new tqmask has no wildcards.... if(fo->wildcardCount() > 0) { // current one has wildcards...insert @@ -208,8 +208,8 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) return; } // the current one has no wildcards... - // the longer masks go first.... - if(fo->maskLength() < o->maskLength()) + // the longer tqmasks go first.... + if(fo->tqmaskLength() < o->tqmaskLength()) { // the current one is shorter than the new one...insert l->insert(index,o); @@ -224,12 +224,12 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) void KviSharedFilesManager::addSharedFile(KviSharedFile * f) { // First find the list - KviSharedFileList * l = m_pSharedListDict->find(f->name()); + KviSharedFileList * l = m_pSharedListDict->tqfind(f->name()); if(!l) { l = new KviSharedFileList; l->setAutoDelete(true); - m_pSharedListDict->replace(f->name(),l); + m_pSharedListDict->tqreplace(f->name(),l); } doInsert(l,f); @@ -242,18 +242,18 @@ void KviSharedFilesManager::addSharedFile(KviSharedFile * f) emit sharedFileAdded(f); } -KviSharedFile * KviSharedFilesManager::addSharedFile(const QString &szName,const QString &szAbsPath,const QString &szMask,int timeoutInSecs) +KviSharedFile * KviSharedFilesManager::addSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szMask,int timeoutInSecs) { - QFileInfo inf(szAbsPath); + TQFileInfo inf(szAbsPath); if(inf.exists() && inf.isFile() && inf.isReadable() && (inf.size() > 0)) { // First find the list - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l) { l = new KviSharedFileList; l->setAutoDelete(true); - m_pSharedListDict->replace(szName,l); + m_pSharedListDict->tqreplace(szName,l); } // Now insert @@ -270,24 +270,24 @@ KviSharedFile * KviSharedFilesManager::addSharedFile(const QString &szName,const return o; } else { - debug("File %s unreadable: can't add offer",KviQString::toUtf8(szAbsPath).data()); + debug("File %s unreadable: can't add offer",KviTQString::toUtf8(szAbsPath).data()); return 0; } } -KviSharedFile * KviSharedFilesManager::lookupSharedFile(const QString &szName,KviIrcMask * mask,unsigned int uFileSize) +KviSharedFile * KviSharedFilesManager::lookupSharedFile(const TQString &szName,KviIrcMask * tqmask,unsigned int uFileSize) { - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l)return 0; for(KviSharedFile * o = l->first();o;o = l->next()) { bool bMatch; - if(mask) + if(tqmask) { KviIrcMask umask(o->userMask()); - bMatch = mask->matchedBy(umask); - } else bMatch = KviQString::equalCS(o->userMask(),"*!*@*"); + bMatch = tqmask->matchedBy(umask); + } else bMatch = KviTQString::equalCS(o->userMask(),"*!*@*"); if(bMatch) { if(uFileSize > 0) @@ -299,18 +299,18 @@ KviSharedFile * KviSharedFilesManager::lookupSharedFile(const QString &szName,Kv return 0; } -bool KviSharedFilesManager::removeSharedFile(const QString &szName,const QString &szMask,unsigned int uFileSize) +bool KviSharedFilesManager::removeSharedFile(const TQString &szName,const TQString &szMask,unsigned int uFileSize) { - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l)return false; for(KviSharedFile * o = l->first();o;o = l->next()) { - if(KviQString::equalCI(szMask,o->userMask())) + if(KviTQString::equalCI(szMask,o->userMask())) { bool bMatch = uFileSize > 0 ? uFileSize == o->fileSize() : true; if(bMatch) { - QString save = szName; // <-- szName MAY Be a pointer to o->name() + TQString save = szName; // <-- szName MAY Be a pointer to o->name() l->removeRef(o); if(l->count() == 0)m_pSharedListDict->remove(save); emit sharedFileRemoved(o); @@ -321,15 +321,15 @@ bool KviSharedFilesManager::removeSharedFile(const QString &szName,const QString return false; } -bool KviSharedFilesManager::removeSharedFile(const QString &szName,KviSharedFile * off) +bool KviSharedFilesManager::removeSharedFile(const TQString &szName,KviSharedFile * off) { - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l)return false; for(KviSharedFile * o = l->first();o;o = l->next()) { if(off == o) { - QString save = szName; // <-- szName MAY Be a pointer to o->name() + TQString save = szName; // <-- szName MAY Be a pointer to o->name() l->removeRef(o); if(l->count() == 0)m_pSharedListDict->remove(save); emit sharedFileRemoved(off); @@ -340,7 +340,7 @@ bool KviSharedFilesManager::removeSharedFile(const QString &szName,KviSharedFile } -void KviSharedFilesManager::load(const QString &filename) +void KviSharedFilesManager::load(const TQString &filename) { KviConfig cfg(filename,KviConfig::Read); //cfg.clear(); @@ -348,25 +348,25 @@ void KviSharedFilesManager::load(const QString &filename) int num = cfg.readIntEntry("NEntries",0); for(int idx=0;idx<num;idx++) { - QString tmp; - KviQString::sprintf(tmp,"%dFName",idx); - QString szName = cfg.readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%dFilePath",idx); - QString szPath = cfg.readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%dUserMask",idx); - QString szMask = cfg.readQStringEntry(tmp,""); + TQString tmp; + KviTQString::sprintf(tmp,"%dFName",idx); + TQString szName = cfg.readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%dFilePath",idx); + TQString szPath = cfg.readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%dUserMask",idx); + TQString szMask = cfg.readTQStringEntry(tmp,""); if(!szMask.isEmpty() && !szPath.isEmpty() && !szName.isEmpty()) addSharedFile(szName,szPath,szMask,0); } } -void KviSharedFilesManager::save(const QString &filename) +void KviSharedFilesManager::save(const TQString &filename) { KviConfig cfg(filename,KviConfig::Write); cfg.clear(); cfg.setGroup("PermanentFileOffers"); - KviPointerHashTableIterator<QString,KviSharedFileList> it(*m_pSharedListDict); + KviPointerHashTableIterator<TQString,KviSharedFileList> it(*m_pSharedListDict); int idx = 0; while(KviSharedFileList * l = it.current()) { @@ -374,12 +374,12 @@ void KviSharedFilesManager::save(const QString &filename) { if(((int)(o->expireTime())) == 0) { - QString tmp; - KviQString::sprintf(tmp,"%dFName",idx); + TQString tmp; + KviTQString::sprintf(tmp,"%dFName",idx); cfg.writeEntry(tmp,it.currentKey()); - KviQString::sprintf(tmp,"%dFilePath",idx); + KviTQString::sprintf(tmp,"%dFilePath",idx); cfg.writeEntry(tmp,o->absFilePath()); - KviQString::sprintf(tmp,"%dUserMask",idx); + KviTQString::sprintf(tmp,"%dUserMask",idx); cfg.writeEntry(tmp,o->userMask()); ++idx; } diff --git a/src/kvilib/ext/kvi_sharedfiles.h b/src/kvilib/ext/kvi_sharedfiles.h index 3a6d2239..560e7494 100644 --- a/src/kvilib/ext/kvi_sharedfiles.h +++ b/src/kvilib/ext/kvi_sharedfiles.h @@ -34,28 +34,28 @@ #include "kvi_pointerhashtable.h" #include <time.h> -#include <qtimer.h> +#include <tqtimer.h> class KVILIB_API KviSharedFile : public KviHeapObject { public: - KviSharedFile(const QString &szName,const QString &szAbsPath,const QString &szUserMask,time_t expireTime,unsigned int uFileSize); + KviSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szUserMask,time_t expireTime,unsigned int uFileSize); ~KviSharedFile(); private: - QString m_szName; - QString m_szAbsFilePath; + TQString m_szName; + TQString m_szAbsFilePath; time_t m_expireTime; - QString m_szUserMask; + TQString m_szUserMask; unsigned int m_uFileSize; unsigned int m_uWildCount; unsigned int m_uNonWildCount; public: - const QString &name(){ return m_szName; }; + const TQString &name(){ return m_szName; }; - const QString &absFilePath(){ return m_szAbsFilePath; }; + const TQString &absFilePath(){ return m_szAbsFilePath; }; - const QString &userMask(){ return m_szUserMask; }; + const TQString &userMask(){ return m_szUserMask; }; time_t expireTime(){ return m_expireTime; }; bool expires(){ return (m_expireTime != 0); }; @@ -64,32 +64,33 @@ public: unsigned int wildcardCount(){ return m_uWildCount; }; unsigned int nonWildcardCount(){ return m_uNonWildCount; }; - int maskLength(){ return m_szUserMask.length(); }; + int tqmaskLength(){ return m_szUserMask.length(); }; }; typedef KviPointerList<KviSharedFile> KviSharedFileList; -class KVILIB_API KviSharedFilesManager : public QObject +class KVILIB_API KviSharedFilesManager : public TQObject { Q_OBJECT + TQ_OBJECT public: KviSharedFilesManager(); ~KviSharedFilesManager(); private: - QTimer * m_pCleanupTimer; - KviPointerHashTable<QString,KviSharedFileList> * m_pSharedListDict; + TQTimer * m_pCleanupTimer; + KviPointerHashTable<TQString,KviSharedFileList> * m_pSharedListDict; public: void addSharedFile(KviSharedFile * f); - KviSharedFile * addSharedFile(const QString &szName,const QString &szAbsPath,const QString &szMask,int timeoutInSecs); - KviSharedFile * lookupSharedFile(const QString &szName,KviIrcMask * mask,unsigned int uFileSize = 0); - bool removeSharedFile(const QString &szName,const QString &szMask,unsigned int uFileSize); - bool removeSharedFile(const QString &szName,KviSharedFile * off); - void load(const QString &filename); - void save(const QString &filename); + KviSharedFile * addSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szMask,int timeoutInSecs); + KviSharedFile * lookupSharedFile(const TQString &szName,KviIrcMask * tqmask,unsigned int uFileSize = 0); + bool removeSharedFile(const TQString &szName,const TQString &szMask,unsigned int uFileSize); + bool removeSharedFile(const TQString &szName,KviSharedFile * off); + void load(const TQString &filename); + void save(const TQString &filename); void clear(); - KviPointerHashTable<QString,KviSharedFileList> * sharedFileListDict(){ return m_pSharedListDict; }; + KviPointerHashTable<TQString,KviSharedFileList> * sharedFileListDict(){ return m_pSharedListDict; }; private: void doInsert(KviSharedFileList * l, KviSharedFile * o); private slots: diff --git a/src/kvilib/ext/kvi_stringconversion.cpp b/src/kvilib/ext/kvi_stringconversion.cpp index 3d0255cc..accba786 100644 --- a/src/kvilib/ext/kvi_stringconversion.cpp +++ b/src/kvilib/ext/kvi_stringconversion.cpp @@ -31,25 +31,25 @@ #include "kvi_qstring.h" #include <stdio.h> -QString g_szGlobalDir; -QString g_szLocalDir; +TQString g_szGlobalDir; +TQString g_szLocalDir; namespace KviStringConversion { - void init(const QString& szGlobalDir,const QString& szLocalDir) + void init(const TQString& szGlobalDir,const TQString& szLocalDir) { g_szGlobalDir=szGlobalDir; g_szLocalDir=szLocalDir; } - void encodePath(QString& buffer) + void encodePath(TQString& buffer) { if(!buffer.isEmpty()) { if(!g_szLocalDir.isEmpty()) { - if(KviQString::find(buffer,g_szLocalDir)==0) + if(KviTQString::tqfind(buffer,g_szLocalDir)==0) { buffer.remove(0,g_szLocalDir.length()); buffer.prepend("local://"); @@ -57,7 +57,7 @@ namespace KviStringConversion } if(!g_szGlobalDir.isEmpty()) { - if(KviQString::find(buffer,g_szGlobalDir)==0) + if(KviTQString::tqfind(buffer,g_szGlobalDir)==0) { buffer.remove(0,g_szGlobalDir.length()); buffer.prepend("global://"); @@ -66,13 +66,13 @@ namespace KviStringConversion } } - void decodePath(QString& buffer) + void decodePath(TQString& buffer) { if(!buffer.isEmpty()) { if(!g_szLocalDir.isEmpty()) { - if(KviQString::find(buffer,"local://")==0) + if(KviTQString::tqfind(buffer,"local://")==0) { buffer.remove(0,8); buffer.prepend(g_szLocalDir); @@ -80,7 +80,7 @@ namespace KviStringConversion } if(!g_szGlobalDir.isEmpty()) { - if(KviQString::find(buffer,"global://")==0) + if(KviTQString::tqfind(buffer,"global://")==0) { buffer.remove(0,9); buffer.prepend(g_szGlobalDir); @@ -89,66 +89,66 @@ namespace KviStringConversion } } - void encodePath(QStringList& buffer) + void encodePath(TQStringList& buffer) { - for ( QStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) + for ( TQStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) { encodePath(*it); } } - void decodePath(QStringList& buffer) + void decodePath(TQStringList& buffer) { - for ( QStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) + for ( TQStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) { decodePath(*it); } } - void toString(const bool bValue,QString &buffer) + void toString(const bool bValue,TQString &buffer) { buffer = bValue ? '1' : '0'; } - bool fromString(const QString & szValue,bool &buffer) + bool fromString(const TQString & szValue,bool &buffer) { if(szValue.isEmpty())buffer = false; - else buffer = !((KviQString::equalCS(szValue,"0")) || (KviQString::equalCI(szValue,"false"))); + else buffer = !((KviTQString::equalCS(szValue,"0")) || (KviTQString::equalCI(szValue,"false"))); return true; } - void toString(const int iValue,QString &buffer) + void toString(const int iValue,TQString &buffer) { buffer.setNum(iValue); } - bool fromString(const QString &szValue,int &buffer) + bool fromString(const TQString &szValue,int &buffer) { bool bOk; buffer = szValue.toInt(&bOk); return bOk; } - void toString(const unsigned int uValue,QString &buffer) + void toString(const unsigned int uValue,TQString &buffer) { buffer.setNum(uValue); } - bool fromString(const QString & szValue,unsigned int &buffer) + bool fromString(const TQString & szValue,unsigned int &buffer) { bool bOk; buffer= szValue.toUInt(&bOk); return bOk; } - void toString(const QRect &rValue,QString &buffer) + void toString(const TQRect &rValue,TQString &buffer) { buffer.sprintf("%d,%d,%d,%d",rValue.x(),rValue.y(),rValue.width(),rValue.height()); } - bool fromString(const QString & szValue,QRect &buffer) + bool fromString(const TQString & szValue,TQRect &buffer) { - KviQCString tmp = KviQString::toUtf8(szValue); + KviTQCString tmp = KviTQString::toUtf8(szValue); const char * c = tmp.data(); if(!c)return false; int l,t,w,h; @@ -157,26 +157,26 @@ namespace KviStringConversion return true; } - void toString(const QString &szValue,QString &buffer) + void toString(const TQString &szValue,TQString &buffer) { buffer = szValue; } - bool fromString(const QString & szValue,QString &buffer) + bool fromString(const TQString & szValue,TQString &buffer) { buffer = szValue; return true; } - void toString(const KviPixmap &pValue,QString &buffer) + void toString(const KviPixmap &pValue,TQString &buffer) { buffer=pValue.path(); encodePath(buffer); } - bool fromString(const QString & szValue,KviPixmap &buffer) + bool fromString(const TQString & szValue,KviPixmap &buffer) { - QString szPath(szValue); + TQString szPath(szValue); decodePath(szPath); if(szPath.isEmpty()) { buffer.setNull(); @@ -186,16 +186,16 @@ namespace KviStringConversion } } - void toString(const KviMsgType &mValue,QString &buffer) + void toString(const KviMsgType &mValue,TQString &buffer) { buffer.sprintf("%d,%u,%u,%d,%d",mValue.m_iPixId,mValue.m_cForeColor,mValue.m_cBackColor,mValue.m_bLogEnabled,mValue.m_iLevel); } - bool fromString(const QString & szValue,KviMsgType &buffer) + bool fromString(const TQString & szValue,KviMsgType &buffer) { int iId,iLog,iLevel; unsigned int uFore,uBack; - KviQCString tmp = KviQString::toUtf8(szValue); + KviTQCString tmp = KviTQString::toUtf8(szValue); char * cx = tmp.data(); if(!cx)return false; if(sscanf(cx,"%d,%u,%u,%d,%d",&iId,&uFore,&uBack,&iLog,&iLevel) != 5)return false; @@ -203,21 +203,21 @@ namespace KviStringConversion return true; } - void toString(const QColor &cValue,QString &buffer) + void toString(const TQColor &cValue,TQString &buffer) { buffer = cValue.name(); } - bool fromString(const QString & szValue,QColor &buffer) + bool fromString(const TQString & szValue,TQColor &buffer) { buffer.setNamedColor(szValue); return true; } - void toString(const QFont &fValue,QString &buffer) + void toString(const TQFont &fValue,TQString &buffer) { - QString family(fValue.family()); - buffer.sprintf("%s,%d,%d,%d",KviQString::toUtf8(family).data(),fValue.pointSize(),fValue.styleHint(),fValue.weight()); - QString options; + TQString family(fValue.family()); + buffer.sprintf("%s,%d,%d,%d",KviTQString::toUtf8(family).data(),fValue.pointSize(),fValue.styleHint(),fValue.weight()); + TQString options; if(fValue.bold())options.append('b'); if(fValue.italic())options.append('i'); if(fValue.underline())options.append('u'); @@ -231,45 +231,45 @@ namespace KviStringConversion } } - bool fromString(const QString & szValue,QFont &buffer) + bool fromString(const TQString & szValue,TQFont &buffer) { KviStr str = szValue; - KviStr family,pointSize,styleHint,weight,options; + KviStr family,pointSize,tqstyleHint,weight,options; str.getToken(family,','); str.getToken(pointSize,','); - str.getToken(styleHint,','); + str.getToken(tqstyleHint,','); str.getToken(weight,','); if(!family.isEmpty())buffer.setFamily(family.ptr()); int i; bool bOk; i = pointSize.toInt(&bOk); if(bOk && (i > 0))buffer.setPointSize(i); - i = styleHint.toInt(&bOk); - if(bOk && (i >= 0))buffer.setStyleHint((QFont::StyleHint)i); + i = tqstyleHint.toInt(&bOk); + if(bOk && (i >= 0))buffer.setStyleHint((TQFont::StyleHint)i); i = weight.toInt(&bOk); if(bOk && (i >= 0))buffer.setWeight(i); if(!str.isEmpty()) { - buffer.setBold(str.contains("b")); - buffer.setItalic(str.contains("i")); - buffer.setUnderline(str.contains("u")); - buffer.setStrikeOut(str.contains("s")); - buffer.setFixedPitch(str.contains("f")); + buffer.setBold(str.tqcontains("b")); + buffer.setItalic(str.tqcontains("i")); + buffer.setUnderline(str.tqcontains("u")); + buffer.setStrikeOut(str.tqcontains("s")); + buffer.setFixedPitch(str.tqcontains("f")); } return true; } - void toString(const QStringList &sValue,QString &buffer) + void toString(const TQStringList &sValue,TQString &buffer) { buffer = sValue.join(","); } - bool fromString(const QString & szValue,QStringList &buffer) + bool fromString(const TQString & szValue,TQStringList &buffer) { #ifdef COMPILE_USE_QT4 buffer = szValue.split(","); #else - buffer = QStringList::split(",",szValue); + buffer = TQStringList::split(",",szValue); #endif return true; } diff --git a/src/kvilib/ext/kvi_stringconversion.h b/src/kvilib/ext/kvi_stringconversion.h index 78f8d417..0412a0e4 100644 --- a/src/kvilib/ext/kvi_stringconversion.h +++ b/src/kvilib/ext/kvi_stringconversion.h @@ -30,62 +30,62 @@ #include "kvi_pixmap.h" #include "kvi_msgtype.h" -#include <qrect.h> -#include <qcolor.h> -#include <qfont.h> -#include <qstringlist.h> -#include <qstring.h> +#include <tqrect.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqstringlist.h> +#include <tqstring.h> namespace KviStringConversion { - extern KVILIB_API void init(const QString& szGlobalDir,const QString& szLocalDir); + extern KVILIB_API void init(const TQString& szGlobalDir,const TQString& szLocalDir); - extern KVILIB_API void encodePath(QString& buffer); - extern KVILIB_API void decodePath(QString& buffer); + extern KVILIB_API void encodePath(TQString& buffer); + extern KVILIB_API void decodePath(TQString& buffer); - extern KVILIB_API void encodePath(QStringList& buffer); - extern KVILIB_API void decodePath(QStringList& buffer); + extern KVILIB_API void encodePath(TQStringList& buffer); + extern KVILIB_API void decodePath(TQStringList& buffer); // bool <-> - extern KVILIB_API void toString(const bool bValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,bool &buffer); + extern KVILIB_API void toString(const bool bValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,bool &buffer); - // int <-> QString - extern KVILIB_API void toString(const int iValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,int &buffer); + // int <-> TQString + extern KVILIB_API void toString(const int iValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,int &buffer); - // uint <-> QString - extern KVILIB_API void toString(const unsigned int uValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,unsigned int &buffer); + // uint <-> TQString + extern KVILIB_API void toString(const unsigned int uValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,unsigned int &buffer); - // QRect <-> QString - extern KVILIB_API void toString(const QRect &rValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QRect &buffer); + // TQRect <-> TQString + extern KVILIB_API void toString(const TQRect &rValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQRect &buffer); - // QString <-> QString (Null conversion) - extern KVILIB_API void toString(const QString &szValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QString &buffer); + // TQString <-> TQString (Null conversion) + extern KVILIB_API void toString(const TQString &szValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQString &buffer); - // KviPixmap <-> QString - extern KVILIB_API void toString(const KviPixmap &pValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,KviPixmap &buffer); + // KviPixmap <-> TQString + extern KVILIB_API void toString(const KviPixmap &pValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,KviPixmap &buffer); - // QFont <-> QString - extern KVILIB_API void toString(const QFont &fValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QFont &buffer); + // TQFont <-> TQString + extern KVILIB_API void toString(const TQFont &fValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQFont &buffer); - // KviMsgType <-> QString - extern KVILIB_API void toString(const KviMsgType &mValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,KviMsgType &buffer); + // KviMsgType <-> TQString + extern KVILIB_API void toString(const KviMsgType &mValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,KviMsgType &buffer); - // QColor <-> QString - extern KVILIB_API void toString(const QColor &cValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QColor &buffer); + // TQColor <-> TQString + extern KVILIB_API void toString(const TQColor &cValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQColor &buffer); - // QStringList <-> QString - extern KVILIB_API void toString(const QStringList &sValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QStringList &buffer); + // TQStringList <-> TQString + extern KVILIB_API void toString(const TQStringList &sValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQStringList &buffer); }; #endif //!_KVI_STRINGCONVERSION_H_ diff --git a/src/kvilib/ext/kvi_xlib.h b/src/kvilib/ext/kvi_xlib.h index ef6ca177..0c14a05e 100644 --- a/src/kvilib/ext/kvi_xlib.h +++ b/src/kvilib/ext/kvi_xlib.h @@ -37,7 +37,7 @@ // Too bad that X11/Xlib.h defines Bool, Error and Success... this basically // SUX since we can't use them anywhere in the source! - // this breaks, enums in Qt, enums in KVIrc and other stuff all around... + // this breaks, enums in TQt, enums in KVIrc and other stuff all around... // Shame on you Xlib.h author :D #endif // !COMPILE_NO_X diff --git a/src/kvilib/ext/moc_kvi_crypt.cpp b/src/kvilib/ext/moc_kvi_crypt.cpp index 89c29d46..cbb8ef7d 100644 --- a/src/kvilib/ext/moc_kvi_crypt.cpp +++ b/src/kvilib/ext/moc_kvi_crypt.cpp @@ -2,21 +2,21 @@ ** KviCryptEngine meta object code from reading C++ file 'kvi_crypt.h' ** ** Created: Sun Mar 23 20:56:10 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_crypt.h" -#include <qmetaobject.h> -#include <qapplication.h> +#include <tqmetaobject.h> +#include <tqapplication.h> -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include <private/tqucomextra_p.h> +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviCryptEngine::className() const @@ -24,71 +24,71 @@ const char *KviCryptEngine::className() const return "KviCryptEngine"; } -QMetaObject *KviCryptEngine::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviCryptEngine( "KviCryptEngine", &KviCryptEngine::staticMetaObject ); +TQMetaObject *KviCryptEngine::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviCryptEngine( "KviCryptEngine", &KviCryptEngine::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviCryptEngine::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviCryptEngine::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCryptEngine", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviCryptEngine", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviCryptEngine::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviCryptEngine::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCryptEngine", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviCryptEngine", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviCryptEngine::staticMetaObject() +TQMetaObject* KviCryptEngine::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviCryptEngine", parentObject, + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviCryptEngine", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviCryptEngine.setMetaObject( metaObj ); return metaObj; } -void* KviCryptEngine::qt_cast( const char* clname ) +void* KviCryptEngine::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviCryptEngine" ) ) return this; if ( !qstrcmp( clname, "KviHeapObject" ) ) return (KviHeapObject*)this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviCryptEngine::qt_invoke( int _id, QUObject* _o ) +bool KviCryptEngine::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviCryptEngine::qt_emit( int _id, QUObject* _o ) +bool KviCryptEngine::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviCryptEngine::qt_property( int id, int f, QVariant* v) +bool KviCryptEngine::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviCryptEngine::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviCryptEngine::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/ext/moc_kvi_garbage.cpp b/src/kvilib/ext/moc_kvi_garbage.cpp index 0c1a98ef..a54094dc 100644 --- a/src/kvilib/ext/moc_kvi_garbage.cpp +++ b/src/kvilib/ext/moc_kvi_garbage.cpp @@ -2,21 +2,21 @@ ** KviGarbageCollector meta object code from reading C++ file 'kvi_garbage.h' ** ** Created: Sun Mar 23 20:56:12 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_garbage.h" -#include <qmetaobject.h> -#include <qapplication.h> +#include <tqmetaobject.h> +#include <tqapplication.h> -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include <private/tqucomextra_p.h> +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviGarbageCollector::className() const @@ -24,81 +24,81 @@ const char *KviGarbageCollector::className() const return "KviGarbageCollector"; } -QMetaObject *KviGarbageCollector::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviGarbageCollector( "KviGarbageCollector", &KviGarbageCollector::staticMetaObject ); +TQMetaObject *KviGarbageCollector::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviGarbageCollector( "KviGarbageCollector", &KviGarbageCollector::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviGarbageCollector::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviGarbageCollector::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviGarbageCollector", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviGarbageCollector", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviGarbageCollector::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviGarbageCollector::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviGarbageCollector", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviGarbageCollector", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviGarbageCollector::staticMetaObject() +TQMetaObject* KviGarbageCollector::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"cleanup", 0, 0 }; - static const QUMethod slot_1 = {"garbageSuicide", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "cleanup()", &slot_0, QMetaData::Protected }, - { "garbageSuicide()", &slot_1, QMetaData::Protected } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"cleanup", 0, 0 }; + static const TQUMethod slot_1 = {"garbageSuicide", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "cleanup()", &slot_0, TQMetaData::Protected }, + { "garbageSuicide()", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviGarbageCollector", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviGarbageCollector", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviGarbageCollector.setMetaObject( metaObj ); return metaObj; } -void* KviGarbageCollector::qt_cast( const char* clname ) +void* KviGarbageCollector::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviGarbageCollector" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviGarbageCollector::qt_invoke( int _id, QUObject* _o ) +bool KviGarbageCollector::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: cleanup(); break; case 1: garbageSuicide(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviGarbageCollector::qt_emit( int _id, QUObject* _o ) +bool KviGarbageCollector::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviGarbageCollector::qt_property( int id, int f, QVariant* v) +bool KviGarbageCollector::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviGarbageCollector::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviGarbageCollector::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/ext/moc_kvi_regusersdb.cpp b/src/kvilib/ext/moc_kvi_regusersdb.cpp index 092add9f..88a76f83 100644 --- a/src/kvilib/ext/moc_kvi_regusersdb.cpp +++ b/src/kvilib/ext/moc_kvi_regusersdb.cpp @@ -2,21 +2,21 @@ ** KviRegisteredUserDataBase meta object code from reading C++ file 'kvi_regusersdb.h' ** ** Created: Sun Mar 23 20:56:14 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_regusersdb.h" -#include <qmetaobject.h> -#include <qapplication.h> - -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include <tqmetaobject.h> +#include <tqapplication.h> + +#include <private/tqucomextra_p.h> +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviRegisteredUserDataBase::className() const @@ -24,120 +24,120 @@ const char *KviRegisteredUserDataBase::className() const return "KviRegisteredUserDataBase"; } -QMetaObject *KviRegisteredUserDataBase::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviRegisteredUserDataBase( "KviRegisteredUserDataBase", &KviRegisteredUserDataBase::staticMetaObject ); +TQMetaObject *KviRegisteredUserDataBase::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviRegisteredUserDataBase( "KviRegisteredUserDataBase", &KviRegisteredUserDataBase::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviRegisteredUserDataBase::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviRegisteredUserDataBase::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviRegisteredUserDataBase", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviRegisteredUserDataBase", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviRegisteredUserDataBase::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviRegisteredUserDataBase::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviRegisteredUserDataBase", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviRegisteredUserDataBase", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviRegisteredUserDataBase::staticMetaObject() +TQMetaObject* KviRegisteredUserDataBase::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_signal_0[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_signal_0[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_0 = {"userRemoved", 1, param_signal_0 }; - static const QUParameter param_signal_1[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_0 = {"userRemoved", 1, param_signal_0 }; + static const TQUParameter param_signal_1[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_1 = {"userChanged", 1, param_signal_1 }; - static const QUParameter param_signal_2[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_1 = {"userChanged", 1, param_signal_1 }; + static const TQUParameter param_signal_2[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_2 = {"userAdded", 1, param_signal_2 }; - static const QUMethod signal_3 = {"databaseCleared", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "userRemoved(const QString&)", &signal_0, QMetaData::Public }, - { "userChanged(const QString&)", &signal_1, QMetaData::Public }, - { "userAdded(const QString&)", &signal_2, QMetaData::Public }, - { "databaseCleared()", &signal_3, QMetaData::Public } + static const TQUMethod signal_2 = {"userAdded", 1, param_signal_2 }; + static const TQUMethod signal_3 = {"databaseCleared", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "userRemoved(const TQString&)", &signal_0, TQMetaData::Public }, + { "userChanged(const TQString&)", &signal_1, TQMetaData::Public }, + { "userAdded(const TQString&)", &signal_2, TQMetaData::Public }, + { "databaseCleared()", &signal_3, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviRegisteredUserDataBase", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviRegisteredUserDataBase", tqparentObject, 0, 0, signal_tbl, 4, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviRegisteredUserDataBase.setMetaObject( metaObj ); return metaObj; } -void* KviRegisteredUserDataBase::qt_cast( const char* clname ) +void* KviRegisteredUserDataBase::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviRegisteredUserDataBase" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL userRemoved -void KviRegisteredUserDataBase::userRemoved( const QString& t0 ) +// TQT_SIGNAL userRemoved +void KviRegisteredUserDataBase::userRemoved( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 0, t0 ); } -// SIGNAL userChanged -void KviRegisteredUserDataBase::userChanged( const QString& t0 ) +// TQT_SIGNAL userChanged +void KviRegisteredUserDataBase::userChanged( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 1, t0 ); } -// SIGNAL userAdded -void KviRegisteredUserDataBase::userAdded( const QString& t0 ) +// TQT_SIGNAL userAdded +void KviRegisteredUserDataBase::userAdded( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 2, t0 ); } -// SIGNAL databaseCleared +// TQT_SIGNAL databaseCleared void KviRegisteredUserDataBase::databaseCleared() { activate_signal( staticMetaObject()->signalOffset() + 3 ); } -bool KviRegisteredUserDataBase::qt_invoke( int _id, QUObject* _o ) +bool KviRegisteredUserDataBase::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviRegisteredUserDataBase::qt_emit( int _id, QUObject* _o ) +bool KviRegisteredUserDataBase::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: userRemoved((const QString&)static_QUType_QString.get(_o+1)); break; - case 1: userChanged((const QString&)static_QUType_QString.get(_o+1)); break; - case 2: userAdded((const QString&)static_QUType_QString.get(_o+1)); break; + case 0: userRemoved((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 1: userChanged((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 2: userAdded((const TQString&)static_TQUType_TQString.get(_o+1)); break; case 3: databaseCleared(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviRegisteredUserDataBase::qt_property( int id, int f, QVariant* v) +bool KviRegisteredUserDataBase::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviRegisteredUserDataBase::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviRegisteredUserDataBase::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/ext/moc_kvi_sharedfiles.cpp b/src/kvilib/ext/moc_kvi_sharedfiles.cpp index 83ea82a4..86c1837e 100644 --- a/src/kvilib/ext/moc_kvi_sharedfiles.cpp +++ b/src/kvilib/ext/moc_kvi_sharedfiles.cpp @@ -2,21 +2,21 @@ ** KviSharedFilesManager meta object code from reading C++ file 'kvi_sharedfiles.h' ** ** Created: Sun Mar 23 20:56:15 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_sharedfiles.h" -#include <qmetaobject.h> -#include <qapplication.h> - -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include <tqmetaobject.h> +#include <tqapplication.h> + +#include <private/tqucomextra_p.h> +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviSharedFilesManager::className() const @@ -24,134 +24,134 @@ const char *KviSharedFilesManager::className() const return "KviSharedFilesManager"; } -QMetaObject *KviSharedFilesManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviSharedFilesManager( "KviSharedFilesManager", &KviSharedFilesManager::staticMetaObject ); +TQMetaObject *KviSharedFilesManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviSharedFilesManager( "KviSharedFilesManager", &KviSharedFilesManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviSharedFilesManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviSharedFilesManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSharedFilesManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviSharedFilesManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviSharedFilesManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviSharedFilesManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSharedFilesManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviSharedFilesManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviSharedFilesManager::staticMetaObject() +TQMetaObject* KviSharedFilesManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"cleanup", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "cleanup()", &slot_0, QMetaData::Private } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"cleanup", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "cleanup()", &slot_0, TQMetaData::Private } }; - static const QUMethod signal_0 = {"sharedFilesChanged", 0, 0 }; - static const QUParameter param_signal_1[] = { - { "f", &static_QUType_ptr, "KviSharedFile", QUParameter::In } + static const TQUMethod signal_0 = {"sharedFilesChanged", 0, 0 }; + static const TQUParameter param_signal_1[] = { + { "f", &static_TQUType_ptr, "KviSharedFile", TQUParameter::In } }; - static const QUMethod signal_1 = {"sharedFileAdded", 1, param_signal_1 }; - static const QUParameter param_signal_2[] = { - { "f", &static_QUType_ptr, "KviSharedFile", QUParameter::In } + static const TQUMethod signal_1 = {"sharedFileAdded", 1, param_signal_1 }; + static const TQUParameter param_signal_2[] = { + { "f", &static_TQUType_ptr, "KviSharedFile", TQUParameter::In } }; - static const QUMethod signal_2 = {"sharedFileRemoved", 1, param_signal_2 }; - static const QMetaData signal_tbl[] = { - { "sharedFilesChanged()", &signal_0, QMetaData::Private }, - { "sharedFileAdded(KviSharedFile*)", &signal_1, QMetaData::Private }, - { "sharedFileRemoved(KviSharedFile*)", &signal_2, QMetaData::Private } + static const TQUMethod signal_2 = {"sharedFileRemoved", 1, param_signal_2 }; + static const TQMetaData signal_tbl[] = { + { "sharedFilesChanged()", &signal_0, TQMetaData::Private }, + { "sharedFileAdded(KviSharedFile*)", &signal_1, TQMetaData::Private }, + { "sharedFileRemoved(KviSharedFile*)", &signal_2, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviSharedFilesManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviSharedFilesManager", tqparentObject, slot_tbl, 1, signal_tbl, 3, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviSharedFilesManager.setMetaObject( metaObj ); return metaObj; } -void* KviSharedFilesManager::qt_cast( const char* clname ) +void* KviSharedFilesManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviSharedFilesManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL sharedFilesChanged +// TQT_SIGNAL sharedFilesChanged void KviSharedFilesManager::sharedFilesChanged() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -#include <qobjectdefs.h> -#include <qsignalslotimp.h> +#include <tqobjectdefs.h> +#include <tqtqsignalslotimp.h> -// SIGNAL sharedFileAdded +// TQT_SIGNAL sharedFileAdded void KviSharedFilesManager::sharedFileAdded( KviSharedFile* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 1 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 1 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -// SIGNAL sharedFileRemoved +// TQT_SIGNAL sharedFileRemoved void KviSharedFilesManager::sharedFileRemoved( KviSharedFile* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 2 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 2 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -bool KviSharedFilesManager::qt_invoke( int _id, QUObject* _o ) +bool KviSharedFilesManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: cleanup(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviSharedFilesManager::qt_emit( int _id, QUObject* _o ) +bool KviSharedFilesManager::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: sharedFilesChanged(); break; - case 1: sharedFileAdded((KviSharedFile*)static_QUType_ptr.get(_o+1)); break; - case 2: sharedFileRemoved((KviSharedFile*)static_QUType_ptr.get(_o+1)); break; + case 1: sharedFileAdded((KviSharedFile*)static_TQUType_ptr.get(_o+1)); break; + case 2: sharedFileRemoved((KviSharedFile*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviSharedFilesManager::qt_property( int id, int f, QVariant* v) +bool KviSharedFilesManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviSharedFilesManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviSharedFilesManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES |