diff options
author | Slávek Banko <[email protected]> | 2018-10-29 18:21:41 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2022-01-17 13:30:05 +0100 |
commit | eb6ac02bb511f14a2506fb2f3c94d84d469e42cd (patch) | |
tree | 138827ff0c8800f67b7725c352950f0df421916b /src/kvilib | |
parent | 351c95fe16505298db187a17e4ceff8d2377190b (diff) | |
download | kvirc-eb6ac02bb511f14a2506fb2f3c94d84d469e42cd.tar.gz kvirc-eb6ac02bb511f14a2506fb2f3c94d84d469e42cd.zip |
Fix build with a clean TQt namespace.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 7cc4356bc2eceb5a66c2263bff44aa472d2ca290)
Diffstat (limited to 'src/kvilib')
-rw-r--r-- | src/kvilib/config/kvi_debug.h | 6 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_config.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_crypt.cpp | 4 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_garbage.cpp | 32 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_imagelib.cpp | 2 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_mediatype.cpp | 4 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_regusersdb.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/ext/kvi_sharedfiles.cpp | 2 | ||||
-rw-r--r-- | src/kvilib/file/kvi_fileutils.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/file/kvi_packagefile.cpp | 2 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_avatarcache.cpp | 4 | ||||
-rw-r--r-- | src/kvilib/irc/kvi_ircuserdb.cpp | 4 | ||||
-rw-r--r-- | src/kvilib/net/kvi_dns.cpp | 2 | ||||
-rw-r--r-- | src/kvilib/net/kvi_http.cpp | 6 | ||||
-rw-r--r-- | src/kvilib/net/kvi_netutils.cpp | 2 | ||||
-rw-r--r-- | src/kvilib/net/kvi_ssl.cpp | 8 | ||||
-rw-r--r-- | src/kvilib/system/kvi_locale.cpp | 52 | ||||
-rw-r--r-- | src/kvilib/system/kvi_thread.cpp | 52 | ||||
-rw-r--r-- | src/kvilib/tal/kvi_tal_tooltip.cpp | 4 |
19 files changed, 102 insertions, 102 deletions
diff --git a/src/kvilib/config/kvi_debug.h b/src/kvilib/config/kvi_debug.h index a54704a5..b5ea662f 100644 --- a/src/kvilib/config/kvi_debug.h +++ b/src/kvilib/config/kvi_debug.h @@ -36,15 +36,15 @@ //============================================================================= #ifdef _KVI_DEBUG_CHECK_RANGE_ - #define __range_valid(_expr) if(!(_expr))debug("[kvirc]: ASSERT FAILED: \"%s\" is false in %s (%d)",#_expr,__FILE__,__LINE__) - #define __range_invalid(_expr) if(_expr)debug("[kvirc]: ASSERT FAILED: \"%s\" is true in %s (%d)",#_expr,__FILE__,__LINE__) + #define __range_valid(_expr) if(!(_expr))tqDebug("[kvirc]: ASSERT FAILED: \"%s\" is false in %s (%d)",#_expr,__FILE__,__LINE__) + #define __range_invalid(_expr) if(_expr)tqDebug("[kvirc]: ASSERT FAILED: \"%s\" is true in %s (%d)",#_expr,__FILE__,__LINE__) #else #define __range_valid(_expr) #define __range_invalid(_expr) #endif #if defined(_KVI_DEBUG_) || defined(__KVI_DEBUG__) - #define __ASSERT(_expr) if(!(_expr))debug("[kvirc]: ASSERT FAILED: \"%s\" is false in %s (%d)",#_expr,__FILE__,__LINE__) + #define __ASSERT(_expr) if(!(_expr))tqDebug("[kvirc]: ASSERT FAILED: \"%s\" is false in %s (%d)",#_expr,__FILE__,__LINE__) #else #define __ASSERT(_expr) #endif diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp index fc14dfaf..bd6f8a7a 100644 --- a/src/kvilib/ext/kvi_config.cpp +++ b/src/kvilib/ext/kvi_config.cpp @@ -650,7 +650,7 @@ KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviVa TQString * p_str = p_group->find(szKey); if(!p_str) { - //debug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1()); + //tqDebug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1()); return list; } #ifdef COMPILE_USE_QT4 @@ -660,7 +660,7 @@ KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviVa #endif KviValueList<int> ret; - //debug("Got option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),p_str->latin1()); + //tqDebug("Got option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),p_str->latin1()); for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { @@ -683,7 +683,7 @@ void KviConfig::writeEntry(const TQString & szKey,const KviValueList<int> &list) if(szData.hasData())szData.append(','); szData.append(KviStr::Format,"%d",*it); } - //debug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr()); + //tqDebug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr()); p_group->replace(szKey,new TQString(szData.ptr())); } diff --git a/src/kvilib/ext/kvi_crypt.cpp b/src/kvilib/ext/kvi_crypt.cpp index 959fe510..bbeffa22 100644 --- a/src/kvilib/ext/kvi_crypt.cpp +++ b/src/kvilib/ext/kvi_crypt.cpp @@ -176,13 +176,13 @@ KviCryptEngine::EncryptResult KviCryptEngine::encrypt(const char *,KviStr &) { -// debug("Pure virtual KviCryptEngine::encrypt() called"); +// tqDebug("Pure virtual KviCryptEngine::encrypt() called"); return EncryptError; } KviCryptEngine::DecryptResult KviCryptEngine::decrypt(const char *,KviStr &) { -// debug("Pure virtual KviCryptEngine::decrypt() called"); +// tqDebug("Pure virtual KviCryptEngine::decrypt() called"); return DecryptError; } diff --git a/src/kvilib/ext/kvi_garbage.cpp b/src/kvilib/ext/kvi_garbage.cpp index fc4493a4..6f13aa97 100644 --- a/src/kvilib/ext/kvi_garbage.cpp +++ b/src/kvilib/ext/kvi_garbage.cpp @@ -48,9 +48,9 @@ void KviGarbageCollector::collect(TQObject * g) m_pGarbageList = new KviPointerList<TQObject>; m_pGarbageList->setAutoDelete(true); } - //debug("COLLECTING GARBAGE %s",g->className()); + //tqDebug("COLLECTING GARBAGE %s",g->className()); m_pGarbageList->append(g); -// debug("Registering garbage object %d (%s:%s)",g,g->className(),g->name()); +// tqDebug("Registering garbage object %d (%s:%s)",g,g->className(),g->name()); connect(g,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide())); triggerCleanup(0); } @@ -59,13 +59,13 @@ void KviGarbageCollector::garbageSuicide() { if(!m_pGarbageList) { - debug("Ops... garbage suicide while no garbage list"); + tqDebug("Ops... garbage suicide while no garbage list"); return; } int idx = m_pGarbageList->findRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))); if(idx == -1) { - debug("Ops... unregistered garbage suicide"); + tqDebug("Ops... unregistered garbage suicide"); return; } m_pGarbageList->removeRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))); @@ -77,7 +77,7 @@ void KviGarbageCollector::garbageSuicide() void KviGarbageCollector::triggerCleanup(int iTimeout) { - //debug("TRIGGERING CLEANUP AFTER %d msecs",iTimeout); + //tqDebug("TRIGGERING CLEANUP AFTER %d msecs",iTimeout); if(m_pCleanupTimer) { m_pCleanupTimer->stop(); @@ -90,26 +90,26 @@ void KviGarbageCollector::triggerCleanup(int iTimeout) void KviGarbageCollector::cleanup() { - //debug("CLEANUP CALLED !"); + //tqDebug("CLEANUP CALLED !"); if(m_pGarbageList) { - //debug("SOME GARBAGE TO DELETE"); + //tqDebug("SOME GARBAGE TO DELETE"); KviPointerList<TQObject> dying; dying.setAutoDelete(false); for(TQObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next()) { - //debug("CHECKING GARBAGE CLASS %s",o->className()); + //tqDebug("CHECKING GARBAGE CLASS %s",o->className()); bool bDeleteIt = m_bForceCleanupNow; if(!bDeleteIt) { - //debug("CLEANUP NOT FORCED"); + //tqDebug("CLEANUP NOT FORCED"); TQVariant v = o->property("blockingDelete"); if(v.isValid()) { - //debug("HAS A VALID VARIANT!"); -// debug("[Garbage collector]: garbage has a blockingDelete property"); + //tqDebug("HAS A VALID VARIANT!"); +// tqDebug("[Garbage collector]: garbage has a blockingDelete property"); bDeleteIt = !(v.toBool()); -// if(!bDeleteIt)debug("And doesn't want to be delete now!"); +// if(!bDeleteIt)tqDebug("And doesn't want to be delete now!"); } else bDeleteIt = true; // must be deleted } if(bDeleteIt)dying.append(o); @@ -117,7 +117,7 @@ void KviGarbageCollector::cleanup() for(TQObject * o2 = dying.first();o2;o2 = dying.next()) { - //debug("KILLING GARBAGE CLASS %s",o2->className()); + //tqDebug("KILLING GARBAGE CLASS %s",o2->className()); disconnect(o2,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide())); m_pGarbageList->removeRef(o2); } @@ -131,12 +131,12 @@ void KviGarbageCollector::cleanup() if(m_pGarbageList) { -// debug("[Garbage collector cleanup]: Some stuff left to be deleted, will retry in a while"); +// tqDebug("[Garbage collector cleanup]: Some stuff left to be deleted, will retry in a while"); // something left to be destroyed - if(m_bForceCleanupNow)debug("[Garbage collector]: Ops...I've left some undeleted stuff!"); + if(m_bForceCleanupNow)tqDebug("[Garbage collector]: Ops...I've left some undeleted stuff!"); triggerCleanup(5000); // retry in 5 sec } else { -// debug("[Garbage collector cleanup]: Completed"); +// tqDebug("[Garbage collector cleanup]: Completed"); // nothing left to delete if(m_pCleanupTimer) { diff --git a/src/kvilib/ext/kvi_imagelib.cpp b/src/kvilib/ext/kvi_imagelib.cpp index 90b21af6..104c69d4 100644 --- a/src/kvilib/ext/kvi_imagelib.cpp +++ b/src/kvilib/ext/kvi_imagelib.cpp @@ -86,7 +86,7 @@ bool KviImageLibrary::loadLibrary(const TQString &path) { delete m_pLibrary; m_pLibrary=0; - debug("WARNING : Can not load image library %s",KviTQString::toUtf8(path).data()); + tqDebug("WARNING : Can not load image library %s",KviTQString::toUtf8(path).data()); } return (m_pLibrary != 0); } diff --git a/src/kvilib/ext/kvi_mediatype.cpp b/src/kvilib/ext/kvi_mediatype.cpp index e961359d..2bc60850 100644 --- a/src/kvilib/ext/kvi_mediatype.cpp +++ b/src/kvilib/ext/kvi_mediatype.cpp @@ -263,7 +263,7 @@ KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckM if(lstat(szFullPath.ptr(),&st) != 0) #endif { - //debug("Problems while stating file %s",szFullPath.ptr()); + //tqDebug("Problems while stating file %s",szFullPath.ptr()); // We do just the pattern matching // it's better to avoid magic checks // if the file is a device , we would be blocked while attempting to read data @@ -275,7 +275,7 @@ KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckM { if(stat(szFullPath.ptr(),&st) != 0) { - debug("Problems while stating() target for link %s",szFullPath.ptr()); + tqDebug("Problems while stating() target for link %s",szFullPath.ptr()); // Same as above return findMediaTypeForRegularFile(szFullPath.ptr(),szFile.ptr(),false); } diff --git a/src/kvilib/ext/kvi_regusersdb.cpp b/src/kvilib/ext/kvi_regusersdb.cpp index dcbd58a2..d34fde15 100644 --- a/src/kvilib/ext/kvi_regusersdb.cpp +++ b/src/kvilib/ext/kvi_regusersdb.cpp @@ -417,7 +417,7 @@ KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,Kvi l->setAutoDelete(true); if(!u->addMask(mask)) { - debug(" Ops...got an incoherent regusers action...recovered ?"); + tqDebug(" Ops...got an incoherent regusers action...recovered ?"); delete l; l = 0; } else { @@ -430,7 +430,7 @@ KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,Kvi // Ok...add it if(!u->addMask(mask)) { - debug("ops...got an incoherent regusers action...recovered ?"); + tqDebug("ops...got an incoherent regusers action...recovered ?"); return 0; // ops...already there ? } append_mask_to_list(l,u,mask); @@ -491,7 +491,7 @@ bool KviRegisteredUserDataBase::removeUser(const TQString & name) while(KviIrcMask * mask = u->maskList()->first()) { if(!removeMaskByPointer(mask)) - debug("Ops... removeMaskByPointer(%s) failed ?",KviTQString::toUtf8(name).data()); + tqDebug("Ops... removeMaskByPointer(%s) failed ?",KviTQString::toUtf8(name).data()); } emit(userRemoved(name)); m_pUserDict->remove(name); diff --git a/src/kvilib/ext/kvi_sharedfiles.cpp b/src/kvilib/ext/kvi_sharedfiles.cpp index a0d52a77..d38bd680 100644 --- a/src/kvilib/ext/kvi_sharedfiles.cpp +++ b/src/kvilib/ext/kvi_sharedfiles.cpp @@ -270,7 +270,7 @@ KviSharedFile * KviSharedFilesManager::addSharedFile(const TQString &szName,cons return o; } else { - debug("File %s unreadable: can't add offer",KviTQString::toUtf8(szAbsPath).data()); + tqDebug("File %s unreadable: can't add offer",KviTQString::toUtf8(szAbsPath).data()); return 0; } } diff --git a/src/kvilib/file/kvi_fileutils.cpp b/src/kvilib/file/kvi_fileutils.cpp index 3410773d..8e81f861 100644 --- a/src/kvilib/file/kvi_fileutils.cpp +++ b/src/kvilib/file/kvi_fileutils.cpp @@ -69,7 +69,7 @@ namespace KviFileUtils } if(ch == 0) { - debug("Warning : %s is not an ascii file",f->name().latin1()); + tqDebug("Warning : %s is not an ascii file",f->name().latin1()); } if(cur_len > 0) { @@ -126,7 +126,7 @@ namespace KviFileUtils { if(!d.mkdir(createdDir)) { - debug("Can't create directory %s",KviTQString::toUtf8(createdDir).data()); + tqDebug("Can't create directory %s",KviTQString::toUtf8(createdDir).data()); return false; } } @@ -196,7 +196,7 @@ namespace KviFileUtils { TQByteArray ba = f.readAll(); szBuffer = TQString::fromUtf8(ba.data(),ba.size()); - //debug("BUFFERLEN: %d",szBuffer.length()); + //tqDebug("BUFFERLEN: %d",szBuffer.length()); } else { szBuffer = TQString(f.readAll()); } diff --git a/src/kvilib/file/kvi_packagefile.cpp b/src/kvilib/file/kvi_packagefile.cpp index 1a0d5088..31f69438 100644 --- a/src/kvilib/file/kvi_packagefile.cpp +++ b/src/kvilib/file/kvi_packagefile.cpp @@ -897,7 +897,7 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const TQString &szUnpackPath) return writeError(); } } /* else { THIS HAPPENS FOR ZERO SIZE FILES - debug("hum.... internal, rEWq (ret = %d) (avail_out = %d)",ret,zstr.avail_out); + tqDebug("hum.... internal, rEWq (ret = %d) (avail_out = %d)",ret,zstr.avail_out); inflateEnd(&zstr); setLastError(__tr2qs("Compression library internal error")); diff --git a/src/kvilib/irc/kvi_avatarcache.cpp b/src/kvilib/irc/kvi_avatarcache.cpp index 77578b17..f6166dce 100644 --- a/src/kvilib/irc/kvi_avatarcache.cpp +++ b/src/kvilib/irc/kvi_avatarcache.cpp @@ -44,7 +44,7 @@ void KviAvatarCache::init() { if(m_pAvatarCacheInstance) { - debug("WARNING: trying to initialize the avatar cache twice"); + tqDebug("WARNING: trying to initialize the avatar cache twice"); return; } @@ -55,7 +55,7 @@ void KviAvatarCache::done() { if(!m_pAvatarCacheInstance) { - debug("WARNING: trying to destroy an uninitialized avatar cache"); + tqDebug("WARNING: trying to destroy an uninitialized avatar cache"); return; } diff --git a/src/kvilib/irc/kvi_ircuserdb.cpp b/src/kvilib/irc/kvi_ircuserdb.cpp index 3394b047..7aaa5f25 100644 --- a/src/kvilib/irc/kvi_ircuserdb.cpp +++ b/src/kvilib/irc/kvi_ircuserdb.cpp @@ -150,7 +150,7 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick,cons if(u->m_bNotFoundRegUserLoockup && u->m_szLastRegisteredMatchNick==nick) { //cacheHit++; - //debug("cache hits/miss = %i/%i",cacheHit,cacheMiss); + //tqDebug("cache hits/miss = %i/%i",cacheHit,cacheMiss); return 0; } @@ -182,7 +182,7 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick,cons } } -// debug("cache hits/miss = %i/%i",cacheHit,cacheMiss); +// tqDebug("cache hits/miss = %i/%i",cacheHit,cacheMiss); return pUser; } diff --git a/src/kvilib/net/kvi_dns.cpp b/src/kvilib/net/kvi_dns.cpp index 285c45e3..d537e3fe 100644 --- a/src/kvilib/net/kvi_dns.cpp +++ b/src/kvilib/net/kvi_dns.cpp @@ -363,7 +363,7 @@ KviDns::~KviDns() if(m_pSlaveThread)delete m_pSlaveThread; // will eventually terminate it (but it will also block us!!!) KviThreadManager::killPendingEvents(this); if(m_pDnsResult)delete m_pDnsResult; - if(m_pAuxData)debug("You're leaking memory man! m_pAuxData is non 0!"); + if(m_pAuxData)tqDebug("You're leaking memory man! m_pAuxData is non 0!"); } diff --git a/src/kvilib/net/kvi_http.cpp b/src/kvilib/net/kvi_http.cpp index 9e87d78c..0bcd864b 100644 --- a/src/kvilib/net/kvi_http.cpp +++ b/src/kvilib/net/kvi_http.cpp @@ -532,7 +532,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) s->cutLeft(idx + 1); s->stripWhiteSpace(); hdr.replace(szName.ptr(),new KviStr(*s)); - //debug("FOUND HEADER (%s)=(%s)",szName.ptr(),s->ptr()); + //tqDebug("FOUND HEADER (%s)=(%s)",szName.ptr(),s->ptr()); } } @@ -914,7 +914,7 @@ bool KviHttpRequestThread::processInternalEvents() } break; default: - debug("Unrecognized event in http thread"); + tqDebug("Unrecognized event in http thread"); delete e; return false; break; @@ -1425,7 +1425,7 @@ void KviHttpRequestThread::runInternal() szRequest += "\r\n"; } - //debug("SENDING REQUEST:\n%s",szRequest.ptr()); + //tqDebug("SENDING REQUEST:\n%s",szRequest.ptr()); if(!sendBuffer(szRequest.ptr(),szRequest.len(),60))return; diff --git a/src/kvilib/net/kvi_netutils.cpp b/src/kvilib/net/kvi_netutils.cpp index b4bcd88d..bf5c00bb 100644 --- a/src/kvilib/net/kvi_netutils.cpp +++ b/src/kvilib/net/kvi_netutils.cpp @@ -1206,7 +1206,7 @@ bool kvi_getInterfaceAddress(const char * ifname,TQString &buffer) { - debug("kvi_getInterfaceAddress is deprecated: use KviNetUtils::getInterfaceAddress"); + tqDebug("kvi_getInterfaceAddress is deprecated: use KviNetUtils::getInterfaceAddress"); TQString szRet; diff --git a/src/kvilib/net/kvi_ssl.cpp b/src/kvilib/net/kvi_ssl.cpp index 3404b80b..038e124a 100644 --- a/src/kvilib/net/kvi_ssl.cpp +++ b/src/kvilib/net/kvi_ssl.cpp @@ -199,7 +199,7 @@ static DH * my_get_dh(int keylength) break; default: // What the hell do you want from me ? - debug("OpenSSL is asking for a DH param with keylen %d: no way :D",keylength); + tqDebug("OpenSSL is asking for a DH param with keylen %d: no way :D",keylength); break; } @@ -332,7 +332,7 @@ static int cb(char *buf, int size, int rwflag, void *u) int len = p->len(); if(len >= size)return 0; kvi_memmove(buf,p->ptr(),len + 1); -// debug("PASS REQUESTED: %s",p->ptr()); +// tqDebug("PASS REQUESTED: %s",p->ptr()); return len; } @@ -346,7 +346,7 @@ KviSSL::Result KviSSL::useCertificateFile(const char * cert,const char * pass) FILE * f = fopen(cert,"r"); if(!f)return FileIoError; -// debug("READING CERTIFICATE %s",cert); +// tqDebug("READING CERTIFICATE %s",cert); if(PEM_read_X509(f,&x509,cb,&m_szPass)) { if(!SSL_CTX_use_certificate(m_pSSLCtx,x509)) @@ -372,7 +372,7 @@ KviSSL::Result KviSSL::usePrivateKeyFile(const char * key,const char * pass) FILE * f = fopen(key,"r"); if(!f)return FileIoError; -// debug("READING KEY %s",key); +// tqDebug("READING KEY %s",key); if(PEM_read_PrivateKey(f,&k,cb,&m_szPass)) { if(!SSL_CTX_use_PrivateKey(m_pSSLCtx,k)) diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp index 3ee2ef82..d4f89cc1 100644 --- a/src/kvilib/system/kvi_locale.cpp +++ b/src/kvilib/system/kvi_locale.cpp @@ -33,7 +33,7 @@ #define _KVI_LOCALE_CPP_ #include "kvi_locale.h" -#include <tqglobal.h> //for debug() +#include <tqglobal.h> //for tqDebug() #include <tqtextcodec.h> #include <tqdir.h> @@ -287,14 +287,14 @@ public: g_pUtf8TextCodec = TQTextCodec::codecForName("UTF-8"); if(!g_pUtf8TextCodec) { - debug("Can't find the global utf8 text codec!"); + tqDebug("Can't find the global utf8 text codec!"); g_pUtf8TextCodec = TQTextCodec::codecForLocale(); // try anything else... } } m_pRecvCodec = TQTextCodec::codecForName(szChildCodecName); if(!m_pRecvCodec) { - debug("Can't find the codec for name %s (composite codec creation)",szName); + tqDebug("Can't find the codec for name %s (composite codec creation)",szName); m_pRecvCodec = g_pUtf8TextCodec; } if(bSendInUtf8) @@ -495,7 +495,7 @@ bool KviMessageCatalogue::load(const TQString& name) KviFile f(szCatalogueFile); if(!f.openForReading()) { - debug("[KviLocale]: Failed to open the messages file %s: probably doesn't exist",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("[KviLocale]: Failed to open the messages file %s: probably doesn't exist",KviTQString::toUtf8(szCatalogueFile).data()); return false; } @@ -503,7 +503,7 @@ bool KviMessageCatalogue::load(const TQString& name) if(f.readBlock((char *)&hdr,sizeof(GnuMoFileHeader)) < (int)sizeof(GnuMoFileHeader)) { - debug("KviLocale: Failed to read header of %s",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Failed to read header of %s",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -514,10 +514,10 @@ bool KviMessageCatalogue::load(const TQString& name) { if(hdr.magic == KVI_LOCALE_MAGIC_SWAPPED) { - debug("KviLocale: Swapped magic for file %s: swapping data too",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Swapped magic for file %s: swapping data too",KviTQString::toUtf8(szCatalogueFile).data()); bMustSwap = true; } else { - debug("KviLocale: Bad locale magic for file %s: not a *.mo file ?",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Bad locale magic for file %s: not a *.mo file ?",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -525,7 +525,7 @@ bool KviMessageCatalogue::load(const TQString& name) if(KVI_SWAP_IF_NEEDED(bMustSwap,hdr.revision) != MO_REVISION_NUMBER) { - debug("KviLocale: Invalid *.mo file revision number for file %s",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Invalid *.mo file revision number for file %s",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -534,14 +534,14 @@ bool KviMessageCatalogue::load(const TQString& name) if(numberOfStrings <= 0) { - debug("KviLocale: No translated messages found in file %s",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: No translated messages found in file %s",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } if(numberOfStrings >= 9972) { - debug("Number of strings too big...sure that it is a KVIrc catalog file ?"); + tqDebug("Number of strings too big...sure that it is a KVIrc catalog file ?"); numberOfStrings = 9972; } @@ -554,7 +554,7 @@ bool KviMessageCatalogue::load(const TQString& name) // FIXME: maybe read it in blocks eh ? if(f.readBlock(buffer,fSize) < (int)fSize) { - debug("KviLocale: Error while reading the translation file %s",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Error while reading the translation file %s",KviTQString::toUtf8(szCatalogueFile).data()); kvi_free(buffer); f.close(); return false; @@ -563,7 +563,7 @@ bool KviMessageCatalogue::load(const TQString& name) // Check for broken *.mo files if(fSize < (24 + (sizeof(GnuMoStringDescriptor) * numberOfStrings))) { - debug("KviLocale: Broken translation file %s (too small for all descriptors)",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Broken translation file %s (too small for all descriptors)",KviTQString::toUtf8(szCatalogueFile).data()); kvi_free(buffer); f.close(); return false; @@ -578,7 +578,7 @@ bool KviMessageCatalogue::load(const TQString& name) if(fSize < (unsigned int)expectedFileSize) { - debug("KviLocale: Broken translation file %s (too small for all the message strings)",KviTQString::toUtf8(szCatalogueFile).data()); + tqDebug("KviLocale: Broken translation file %s (too small for all the message strings)",KviTQString::toUtf8(szCatalogueFile).data()); kvi_free(buffer); f.close(); return false; @@ -597,9 +597,9 @@ bool KviMessageCatalogue::load(const TQString& name) for(int i=0;i < numberOfStrings;i++) { // FIXME: "Check for NULL inside strings here ?" - //debug("original seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,origDescriptor[i].offset), + //tqDebug("original seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,origDescriptor[i].offset), // KVI_SWAP_IF_NEEDED(bMustSwap,origDescriptor[i].length)); - //debug("translated seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].offset), + //tqDebug("translated seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].offset), // KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].length)); KviTranslationEntry * e = new KviTranslationEntry( @@ -639,8 +639,8 @@ bool KviMessageCatalogue::load(const TQString& name) m_pTextCodec = KviLocale::codecForName(szHeader.ptr()); if(!m_pTextCodec) { - debug("Can't find the codec for charset=%s",szHeader.ptr()); - debug("Falling back to codecForLocale()"); + tqDebug("Can't find the codec for charset=%s",szHeader.ptr()); + tqDebug("Falling back to codecForLocale()"); m_pTextCodec = TQTextCodec::codecForLocale(); } } @@ -648,8 +648,8 @@ bool KviMessageCatalogue::load(const TQString& name) if(!m_pTextCodec) { - debug("The message catalogue does not have a \"charset\" header"); - debug("Assuming utf8"); // FIXME: or codecForLocale() ? + tqDebug("The message catalogue does not have a \"charset\" header"); + tqDebug("Assuming utf8"); // FIXME: or codecForLocale() ? m_pTextCodec = TQTextCodec::codecForName("UTF-8"); } @@ -871,7 +871,7 @@ namespace KviLocale bool loadCatalogue(const TQString &name,const TQString &szLocaleDir) { - //debug("Looking up catalogue %s",name); + //tqDebug("Looking up catalogue %s",name); if(g_pCatalogueDict->find(KviTQString::toUtf8(name).data()))return true; // already loaded TQString szBuffer; @@ -881,7 +881,7 @@ namespace KviLocale KviMessageCatalogue * c = new KviMessageCatalogue(); if(c->load(szBuffer)) { - //debug("KviLocale: loaded catalogue %s",name); + //tqDebug("KviLocale: loaded catalogue %s",name); g_pCatalogueDict->insert(KviTQString::toUtf8(name).data(),c); return true; } @@ -891,7 +891,7 @@ namespace KviLocale bool unloadCatalogue(const TQString &name) { - //debug("Unloading catalogue : %s",name); + //tqDebug("Unloading catalogue : %s",name); return g_pCatalogueDict->remove(KviTQString::toUtf8(name).data()); } @@ -1011,10 +1011,10 @@ namespace KviLocale kvi_strEqualCI(szTmp.ptr(),"posix"))) { // FIXME: THIS IS NO LONGER VALID!!! - debug("Can't find the catalogue for locale \"%s\" (%s)",g_szLang.ptr(),szTmp.ptr()); - debug("There is no such translation or the $LANG variable was incorrectly set"); - debug("You can use $KVIRC_LANG to override the catalogue name"); - debug("For example you can set KVIRC_LANG to it_IT to force usage of the it.mo catalogue"); + tqDebug("Can't find the catalogue for locale \"%s\" (%s)",g_szLang.ptr(),szTmp.ptr()); + tqDebug("There is no such translation or the $LANG variable was incorrectly set"); + tqDebug("You can use $KVIRC_LANG to override the catalogue name"); + tqDebug("For example you can set KVIRC_LANG to it_IT to force usage of the it.mo catalogue"); } } } diff --git a/src/kvilib/system/kvi_thread.cpp b/src/kvilib/system/kvi_thread.cpp index 02dcdc09..306f6c75 100644 --- a/src/kvilib/system/kvi_thread.cpp +++ b/src/kvilib/system/kvi_thread.cpp @@ -99,7 +99,7 @@ static void kvi_threadIgnoreSigalarm() ignr_act.sa_flags |= SA_RESTART; #endif - if(sigaction(SIGALRM,&ignr_act,0) == -1)debug("Failed to set SIG_IGN for SIGALRM."); + if(sigaction(SIGALRM,&ignr_act,0) == -1)tqDebug("Failed to set SIG_IGN for SIGALRM."); #endif #endif } @@ -108,7 +108,7 @@ static void kvi_threadIgnoreSigalarm() static void kvi_threadSigpipeHandler(int) { - debug("Thread ????: Caught SIGPIPE: ignoring."); + tqDebug("Thread ????: Caught SIGPIPE: ignoring."); } #endif @@ -133,7 +133,7 @@ static void kvi_threadCatchSigpipe() act.sa_flags |= SA_RESTART; #endif - if(sigaction(SIGPIPE,&act,0L) == -1)debug("Failed to set the handler for SIGPIPE."); + if(sigaction(SIGPIPE,&act,0L) == -1)tqDebug("Failed to set the handler for SIGPIPE."); #endif } @@ -171,7 +171,7 @@ void KviThreadManager::globalDestroy() KviThreadManager::KviThreadManager() : TQObject() { - if(g_pThreadManager)debug("Hey...what are ya doing ?"); + if(g_pThreadManager)tqDebug("Hey...what are ya doing ?"); m_pMutex = new KviMutex(); @@ -189,17 +189,17 @@ KviThreadManager::KviThreadManager() if(pipe(m_fd) != 0) { - debug("Ops...thread manager pipe creation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); + tqDebug("Ops...thread manager pipe creation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); } if(fcntl(m_fd[KVI_THREAD_PIPE_SIDE_SLAVE],F_SETFL,O_NONBLOCK) == -1) { - debug("Ops...thread manager slave pipe initialisation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); + tqDebug("Ops...thread manager slave pipe initialisation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); } if(fcntl(m_fd[KVI_THREAD_PIPE_SIDE_MASTER],F_SETFL,O_NONBLOCK) == -1) { - debug("Ops...thread manager master pipe initialisation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); + tqDebug("Ops...thread manager master pipe initialisation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); } m_pSn = new TQSocketNotifier(m_fd[KVI_THREAD_PIPE_SIDE_MASTER],TQSocketNotifier::Read); @@ -349,7 +349,7 @@ void KviThreadManager::postSlaveEvent(TQObject *o,TQEvent *e) { // ops.. failed to write down the event.. // this is quite irritating now... - debug("Ops.. failed to write down the trigger"); + tqDebug("Ops.. failed to write down the trigger"); // FIXME: maybe a single shot timer ? } else { m_iTriggerCount++; @@ -421,7 +421,7 @@ void KviThreadManager::threadLeftWaitState() m_iWaitingThreads--; if(m_iWaitingThreads < 0) { - debug("Ops.. got a negative number of waiting threads ?"); + tqDebug("Ops.. got a negative number of waiting threads ?"); m_iWaitingThreads = 0; } m_pMutex->unlock(); @@ -462,11 +462,11 @@ KviThread::KviThread() KviThread::~KviThread() { -// debug(">> KviThread::~KviThread() : (this = %d)",this); +// tqDebug(">> KviThread::~KviThread() : (this = %d)",this); wait(); delete m_pRunningMutex; g_pThreadManager->unregisterSlaveThread(this); -// debug("<< KviThread::~KviThread() : (this = %d)",this); +// tqDebug("<< KviThread::~KviThread() : (this = %d)",this); } void KviThread::setRunning(bool bRunning) @@ -512,16 +512,16 @@ bool KviThread::start() void KviThread::wait() { // We're on the master side here...and we're waiting the slave to exit -// debug(">> KviThread::wait() (this=%d)",this); +// tqDebug(">> KviThread::wait() (this=%d)",this); while(isStartingUp())usleep(500); // sleep 500 microseconds -// debug("!! KviThread::wait() (this=%d)",this); +// tqDebug("!! KviThread::wait() (this=%d)",this); g_pThreadManager->threadEnteredWaitState(); while(isRunning()) { usleep(500); // sleep 500 microseconds } g_pThreadManager->threadLeftWaitState(); -// debug("<< KviThread::wait() (this=%d)",this); +// tqDebug("<< KviThread::wait() (this=%d)",this); } void KviThread::exit() @@ -534,13 +534,13 @@ void KviThread::exit() void KviThread::internalThreadRun_doNotTouchThis() { // we're on the slave thread here! -// debug(">> KviThread::internalRun (this=%d)",this); +// tqDebug(">> KviThread::internalRun (this=%d)",this); setRunning(true); setStartingUp(false); kvi_threadInitialize(); run(); setRunning(false); -// debug("<< KviThread::internalRun (this=%d",this); +// tqDebug("<< KviThread::internalRun (this=%d",this); } void KviThread::usleep(unsigned long usec) @@ -592,9 +592,9 @@ KviSensitiveThread::KviSensitiveThread() KviSensitiveThread::~KviSensitiveThread() { -// debug("Entering KviSensitiveThread::~KviSensitiveThread (this=%d)",this); +// tqDebug("Entering KviSensitiveThread::~KviSensitiveThread (this=%d)",this); terminate(); -// debug("KviSensitiveThread::~KviSensitiveThread : terminate called (This=%d)",this); +// tqDebug("KviSensitiveThread::~KviSensitiveThread : terminate called (This=%d)",this); m_pLocalEventQueueMutex->lock(); m_pLocalEventQueue->setAutoDelete(true); delete m_pLocalEventQueue; @@ -602,12 +602,12 @@ KviSensitiveThread::~KviSensitiveThread() m_pLocalEventQueueMutex->unlock(); delete m_pLocalEventQueueMutex; m_pLocalEventQueueMutex = 0; -// debug("Exiting KviSensitiveThread::~KviSensitiveThread (this=%d)",this); +// tqDebug("Exiting KviSensitiveThread::~KviSensitiveThread (this=%d)",this); } void KviSensitiveThread::enqueueEvent(KviThreadEvent *e) { -// debug(">>> KviSensitiveThread::enqueueEvent() (this=%d)",this); +// tqDebug(">>> KviSensitiveThread::enqueueEvent() (this=%d)",this); m_pLocalEventQueueMutex->lock(); if(!m_pLocalEventQueue) { @@ -618,27 +618,27 @@ void KviSensitiveThread::enqueueEvent(KviThreadEvent *e) } m_pLocalEventQueue->append(e); m_pLocalEventQueueMutex->unlock(); -// debug("<<< KviSensitiveThread::enqueueEvent() (this=%d)",this); +// tqDebug("<<< KviSensitiveThread::enqueueEvent() (this=%d)",this); } KviThreadEvent * KviSensitiveThread::dequeueEvent() { -// debug(">>> KviSensitiveThread::dequeueEvent() (this=%d)",this); +// tqDebug(">>> KviSensitiveThread::dequeueEvent() (this=%d)",this); KviThreadEvent * ret; m_pLocalEventQueueMutex->lock(); ret = m_pLocalEventQueue->first(); if(ret)m_pLocalEventQueue->removeFirst(); m_pLocalEventQueueMutex->unlock(); -// debug("<<< KviSensitiveThread::dequeueEvent() (this=%d)",this); +// tqDebug("<<< KviSensitiveThread::dequeueEvent() (this=%d)",this); return ret; } void KviSensitiveThread::terminate() { -// debug("Entering KviSensitiveThread::terminate (this=%d)",this); +// tqDebug("Entering KviSensitiveThread::terminate (this=%d)",this); enqueueEvent(new KviThreadEvent(KVI_THREAD_EVENT_TERMINATE)); -// debug("KviSensitiveThread::terminate() : event enqueued waiting (this=%d)",this); +// tqDebug("KviSensitiveThread::terminate() : event enqueued waiting (this=%d)",this); wait(); -// debug("Exiting KviSensitiveThread::terminate (this=%d)",this); +// tqDebug("Exiting KviSensitiveThread::terminate (this=%d)",this); } diff --git a/src/kvilib/tal/kvi_tal_tooltip.cpp b/src/kvilib/tal/kvi_tal_tooltip.cpp index 90d09631..486c0feb 100644 --- a/src/kvilib/tal/kvi_tal_tooltip.cpp +++ b/src/kvilib/tal/kvi_tal_tooltip.cpp @@ -59,7 +59,7 @@ bool KviTalToolTipHelper::eventFilter(TQObject * pObject,TQEvent * pEvent) #ifdef COMPILE_USE_QT4 if((pEvent->type() == TQEvent::ToolTip) && m_pToolTip) { - debug("TOOL TIP EVENT WITH POSITION %d,%d",((TQHelpEvent *)pEvent)->pos().x(),((TQHelpEvent *)pEvent)->pos().y()); + tqDebug("TOOL TIP EVENT WITH POSITION %d,%d",((TQHelpEvent *)pEvent)->pos().x(),((TQHelpEvent *)pEvent)->pos().y()); m_pToolTip->maybeTip(((TQHelpEvent *)pEvent)->pos()); return true; } @@ -110,7 +110,7 @@ void KviTalToolTip::remove(TQWidget * widget) void KviTalToolTip::tip(const TQRect & rect,const TQString & text) { - debug("TOOL TIP AT %d,%d",rect.topLeft().x(),rect.topLeft().y()); + tqDebug("TOOL TIP AT %d,%d",rect.topLeft().x(),rect.topLeft().y()); TQToolTip::showText(m_pParent->mapToGlobal(rect.topLeft()),text); } #endif |