From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/ksycoca.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kdecore/ksycoca.cpp') diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp index fd4d9aa95..2977d609d 100644 --- a/kdecore/ksycoca.cpp +++ b/kdecore/ksycoca.cpp @@ -76,7 +76,7 @@ public: TQString language; bool readError; bool autoRebuild; - Q_UINT32 updateSig; + TQ_UINT32 updateSig; TQStringList allResourceDirs; }; @@ -179,8 +179,8 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound ) TQBuffer *buffer = new TQBuffer( TQByteArray() ); buffer->open(IO_ReadWrite); m_str = new TQDataStream( buffer); - (*m_str) << (Q_INT32) KSYCOCA_VERSION; - (*m_str) << (Q_INT32) 0; + (*m_str) << (TQ_INT32) KSYCOCA_VERSION; + (*m_str) << (TQ_INT32) 0; } else { @@ -262,7 +262,7 @@ void KSycoca::addFactory( KSycocaFactory *factory ) bool KSycoca::isChanged(const char *type) { - return self()->d->changeList.contains(type); + return self()->d->changeList.tqcontains(type); } void KSycoca::notifyDatabaseChanged(const TQStringList &changeList) @@ -285,7 +285,7 @@ TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type) openDatabase(); //kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl; m_str->device()->at(offset); - Q_INT32 aType; + TQ_INT32 aType; (*m_str) >> aType; type = (KSycocaType) aType; //kdDebug(7011) << TQString("KSycoca::found type %1").arg(aType) << endl; @@ -303,7 +303,7 @@ bool KSycoca::checkVersion(bool abortOnError) assert(m_str); } m_str->device()->at(0); - Q_INT32 aVersion; + TQ_INT32 aVersion; (*m_str) >> aVersion; if ( aVersion < KSYCOCA_VERSION ) { @@ -342,8 +342,8 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id) kdWarning(7011) << "Outdated database found" << endl; return 0L; } - Q_INT32 aId; - Q_INT32 aOffset; + TQ_INT32 aId; + TQ_INT32 aOffset; while(true) { (*m_str) >> aId; @@ -368,8 +368,8 @@ TQString KSycoca::kfsstnd_prefixes() { if (bNoDatabase) return ""; if (!checkVersion(false)) return ""; - Q_INT32 aId; - Q_INT32 aOffset; + TQ_INT32 aId; + TQ_INT32 aOffset; // skip factories offsets while(true) { @@ -389,14 +389,14 @@ TQString KSycoca::kfsstnd_prefixes() return prefixes; } -Q_UINT32 KSycoca::timeStamp() +TQ_UINT32 KSycoca::timeStamp() { if (!m_timeStamp) (void) kfsstnd_prefixes(); return m_timeStamp; } -Q_UINT32 KSycoca::updateSignature() +TQ_UINT32 KSycoca::updateSignature() { if (!m_timeStamp) (void) kfsstnd_prefixes(); @@ -424,11 +424,11 @@ TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char TQStringList::ConstIterator dirsit = dirs.begin(); for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) { // might need canonicalPath() ... - if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath + if ( _fullpath.tqfind( *dirsit ) == 0 ) // path is dirs + relativePath sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs } if ( sRelativeFilePath.isEmpty() ) - kdFatal(7011) << TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl; + kdFatal(7011) << TQString("Couldn't tqfind %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl; //else // debug code //kdDebug(7011) << sRelativeFilePath << endl; @@ -469,7 +469,7 @@ bool KSycoca::readError() void KSycocaEntry::read( TQDataStream &s, TQString &str ) { - Q_UINT32 bytes; + TQ_UINT32 bytes; s >> bytes; // read size of string if ( bytes > 8192 ) { // null string or too big if (bytes != 0xffffffff) @@ -479,7 +479,7 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str ) else if ( bytes > 0 ) { // not empty int bt = bytes/2; str.setLength( bt ); - TQChar* ch = (TQChar *) str.unicode(); + TQChar* ch = (TQChar *) str.tqunicode(); char t[8192]; char *b = t; s.readRawBytes( b, bytes ); @@ -495,14 +495,14 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str ) void KSycocaEntry::read( TQDataStream &s, TQStringList &list ) { list.clear(); - Q_UINT32 count; + TQ_UINT32 count; s >> count; // read size of list if (count >= 1024) { KSycoca::flagError(); return; } - for(Q_UINT32 i = 0; i < count; i++) + for(TQ_UINT32 i = 0; i < count; i++) { TQString str; read(s, str); -- cgit v1.2.1