From b1057f437bf65300831a0ccb45b920787c6b318d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 06:00:15 +0000 Subject: TQt4 port kdemultimedia This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- juk/cache.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'juk/cache.cpp') diff --git a/juk/cache.cpp b/juk/cache.cpp index ada9334b..6cfed63f 100644 --- a/juk/cache.cpp +++ b/juk/cache.cpp @@ -84,9 +84,9 @@ void Cache::save() TQDataStream fs(&f); - Q_INT32 checksum = qChecksum(data.data(), data.size()); + TQ_INT32 checksum = qChecksum(data.data(), data.size()); - fs << Q_INT32(m_currentVersion) + fs << TQ_INT32(m_currentVersion) << checksum << data; @@ -106,7 +106,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static TQDataStream fs(&f); - Q_INT32 version; + TQ_INT32 version; fs >> version; switch(version) { @@ -117,7 +117,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static // we want to get a byte array with just the checksummed data. TQByteArray data; - Q_UINT16 checksum; + TQ_UINT16 checksum; fs >> checksum >> data; if(checksum != qChecksum(data.data(), data.size())) @@ -129,7 +129,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static while(!s.atEnd()) { - Q_INT32 playlistType; + TQ_INT32 playlistType; s >> playlistType; Playlist *playlist = 0; @@ -175,7 +175,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static break; } if(version == 2) { - Q_INT32 sortColumn; + TQ_INT32 sortColumn; s >> sortColumn; if(playlist) playlist->setSorting(sortColumn); @@ -217,33 +217,33 @@ void Cache::savePlaylists(const PlaylistList &playlists) for(PlaylistList::ConstIterator it = playlists.begin(); it != playlists.end(); ++it) { if(*it) { if(dynamic_cast(*it)) { - s << Q_INT32(History) + s << TQ_INT32(History) << *static_cast(*it); } else if(dynamic_cast(*it)) { - s << Q_INT32(Search) + s << TQ_INT32(Search) << *static_cast(*it); } else if(dynamic_cast(*it)) { if(!action("saveUpcomingTracks")->isChecked()) continue; - s << Q_INT32(Upcoming) + s << TQ_INT32(Upcoming) << *static_cast(*it); } else if(dynamic_cast(*it)) { - s << Q_INT32(Folder) + s << TQ_INT32(Folder) << *static_cast(*it); } else { - s << Q_INT32(Normal) + s << TQ_INT32(Normal) << *(*it); } - s << Q_INT32((*it)->sortColumn()); + s << TQ_INT32((*it)->sortColumn()); } } TQDataStream fs(&f); - fs << Q_INT32(playlistCacheVersion); + fs << TQ_INT32(playlistCacheVersion); fs << qChecksum(data.data(), data.size()); fs << data; @@ -275,9 +275,9 @@ void Cache::load() if(!f.open(IO_ReadOnly)) return; - CacheDataStream s(&f); + CacheDataStream s(TQT_TQIODEVICE(&f)); - Q_INT32 version; + TQ_INT32 version; s >> version; TQBuffer buffer; @@ -288,7 +288,7 @@ void Cache::load() case 1: { s.setCacheVersion(1); - Q_INT32 checksum; + TQ_INT32 checksum; TQByteArray data; s >> checksum >> data; -- cgit v1.2.1