summaryrefslogtreecommitdiffstats
path: root/juk/cache.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /juk/cache.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
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
Diffstat (limited to 'juk/cache.cpp')
-rw-r--r--juk/cache.cpp32
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;