diff options
Diffstat (limited to 'juk/cache.cpp')
-rw-r--r-- | juk/cache.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
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<HistoryPlaylist *>(*it)) { - s << Q_INT32(History) + s << TQ_INT32(History) << *static_cast<HistoryPlaylist *>(*it); } else if(dynamic_cast<SearchPlaylist *>(*it)) { - s << Q_INT32(Search) + s << TQ_INT32(Search) << *static_cast<SearchPlaylist *>(*it); } else if(dynamic_cast<UpcomingPlaylist *>(*it)) { if(!action<KToggleAction>("saveUpcomingTracks")->isChecked()) continue; - s << Q_INT32(Upcoming) + s << TQ_INT32(Upcoming) << *static_cast<UpcomingPlaylist *>(*it); } else if(dynamic_cast<FolderPlaylist *>(*it)) { - s << Q_INT32(Folder) + s << TQ_INT32(Folder) << *static_cast<FolderPlaylist *>(*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; |