diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /libkonq/konq_historymgr.cc | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkonq/konq_historymgr.cc')
-rw-r--r-- | libkonq/konq_historymgr.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libkonq/konq_historymgr.cc b/libkonq/konq_historymgr.cc index b971d39b3..bff8d7328 100644 --- a/libkonq/konq_historymgr.cc +++ b/libkonq/konq_historymgr.cc @@ -31,7 +31,7 @@ #include "konqbookmarkmanager.h" -const Q_UINT32 KonqHistoryManager::s_historyVersion = 3; +const TQ_UINT32 KonqHistoryManager::s_historyVersion = 3; KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name ) : KParts::HistoryProvider( parent, name ), @@ -43,12 +43,12 @@ KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name ) KConfig *config = KGlobal::config(); KConfigGroupSaver cs( config, "HistorySettings" ); m_maxCount = config->readNumEntry( "Maximum of History entries", 500 ); - m_maxCount = QMAX( 1, m_maxCount ); + m_maxCount = TQMAX( 1, m_maxCount ); m_maxAgeDays = config->readNumEntry( "Maximum age of History entries", 90); m_history.setAutoDelete( true ); m_filename = locateLocal( "data", - TQString::fromLatin1("konqueror/konq_history" )); + TQString::tqfromLatin1("konqueror/konq_history" )); if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); @@ -102,7 +102,7 @@ bool KonqHistoryManager::loadHistory() TQDataStream crcStream( data, IO_ReadOnly ); if ( !fileStream.atEnd() ) { - Q_UINT32 version; + TQ_UINT32 version; fileStream >> version; TQDataStream *stream = &fileStream; @@ -111,7 +111,7 @@ bool KonqHistoryManager::loadHistory() bool crcOk = false; if ( version == 2 || version == 3) { - Q_UINT32 crc; + TQ_UINT32 crc; crcChecked = true; fileStream >> crc >> data; crcOk = crc32( 0, reinterpret_cast<unsigned char *>( data.data() ), data.size() ) == crc; @@ -132,7 +132,7 @@ bool KonqHistoryManager::loadHistory() // binary file, this would make backups impossible (they would clear // themselves on startup, because all entries expire). // [But V1 and V2 formats did it, so we do a dummy read] - Q_UINT32 dummy; + TQ_UINT32 dummy; *stream >> dummy; *stream >> dummy; @@ -224,7 +224,7 @@ bool KonqHistoryManager::saveHistory() //For DCOP, transfer strings instead - wire compat. KonqHistoryEntry::marshalURLAsStrings = true; - Q_UINT32 crc = crc32( 0, reinterpret_cast<unsigned char *>( data.data() ), data.size() ); + TQ_UINT32 crc = crc32( 0, reinterpret_cast<unsigned char *>( data.data() ), data.size() ); *fileStream << crc << data; file.close(); @@ -295,12 +295,12 @@ void KonqHistoryManager::addToHistory( bool pending, const KURL& _url, // konqueror's window caption). if ( !pending && u != title ) entry.title = title; - entry.firstVisited = TQDateTime::currentDateTime(); + entry.firstVisited = TQDateTime::tqcurrentDateTime(); entry.lastVisited = entry.firstVisited; // always remove from pending if available, otherwise the else branch leaks // if the map already contains an entry for this key. - TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.find( u ); + TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.tqfind( u ); if ( it != m_pending.end() ) { delete it.data(); m_pending.remove( it ); @@ -342,7 +342,7 @@ void KonqHistoryManager::insert( const TQString& url ) // Local URL -> add to history KonqHistoryEntry entry; entry.url = u; - entry.firstVisited = TQDateTime::currentDateTime(); + entry.firstVisited = TQDateTime::tqcurrentDateTime(); entry.lastVisited = entry.firstVisited; emitAddToHistory( entry ); } @@ -368,7 +368,7 @@ void KonqHistoryManager::removePending( const KURL& url ) if ( url.isLocalFile() ) return; - TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.find( url.prettyURL() ); + TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.tqfind( url.prettyURL() ); if ( it != m_pending.end() ) { KonqHistoryEntry *oldEntry = it.data(); // the old entry, may be 0L emitRemoveFromHistory( url ); // remove the current pending entry @@ -419,22 +419,22 @@ void KonqHistoryManager::emitClear() "notifyClear(TQCString)", data ); } -void KonqHistoryManager::emitSetMaxCount( Q_UINT32 count ) +void KonqHistoryManager::emitSetMaxCount( TQ_UINT32 count ) { TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << count << objId(); kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", - "notifyMaxCount(Q_UINT32, TQCString)", data ); + "notifyMaxCount(TQ_UINT32, TQCString)", data ); } -void KonqHistoryManager::emitSetMaxAge( Q_UINT32 days ) +void KonqHistoryManager::emitSetMaxAge( TQ_UINT32 days ) { TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << days << objId(); kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", - "notifyMaxAge(Q_UINT32, TQCString)", data ); + "notifyMaxAge(TQ_UINT32, TQCString)", data ); } /////////////////////////////////////////////////////////////////// @@ -487,7 +487,7 @@ void KonqHistoryManager::notifyHistoryEntry( KonqHistoryEntry e, emit entryAdded( entry ); } -void KonqHistoryManager::notifyMaxCount( Q_UINT32 count, TQCString ) +void KonqHistoryManager::notifyMaxCount( TQ_UINT32 count, TQCString ) { m_maxCount = count; clearPending(); @@ -503,7 +503,7 @@ void KonqHistoryManager::notifyMaxCount( Q_UINT32 count, TQCString ) } } -void KonqHistoryManager::notifyMaxAge( Q_UINT32 days, TQCString ) +void KonqHistoryManager::notifyMaxAge( TQ_UINT32 days, TQCString ) { m_maxAgeDays = days; clearPending(); @@ -589,7 +589,7 @@ void KonqHistoryManager::notifyRemove( KURL::List urls, TQCString ) // compatibility fallback, try to load the old completion history bool KonqHistoryManager::loadFallback() { - TQString file = locateLocal( "config", TQString::fromLatin1("konq_history")); + TQString file = locateLocal( "config", TQString::tqfromLatin1("konq_history")); if ( file.isEmpty() ) return false; @@ -627,7 +627,7 @@ KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const TQString& item) uint weight = 1; // find out the weighting of this item (appended to the string as ":num") - int index = item.findRev(':'); + int index = item.tqfindRev(':'); if ( index > 0 ) { bool ok; weight = item.mid( index + 1 ).toUInt( &ok ); @@ -646,7 +646,7 @@ KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const TQString& item) entry->url = u; entry->numberOfTimesVisited = weight; // to make it not expire immediately... - entry->lastVisited = TQDateTime::currentDateTime(); + entry->lastVisited = TQDateTime::tqcurrentDateTime(); } return entry; |