summaryrefslogtreecommitdiffstats
path: root/kscd/kcompactdisc.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 /kscd/kcompactdisc.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 'kscd/kcompactdisc.cpp')
-rw-r--r--kscd/kcompactdisc.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kscd/kcompactdisc.cpp b/kscd/kcompactdisc.cpp
index c412a932..83a9c532 100644
--- a/kscd/kcompactdisc.cpp
+++ b/kscd/kcompactdisc.cpp
@@ -98,13 +98,13 @@ const TQString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
const unsigned KCompactDisc::missingDisc = (unsigned)-1;
KCompactDisc::KCompactDisc(InformationMode infoMode) :
- m_device(TQString::null),
+ m_device(TQString()),
m_status(0),
- m_previousStatus(123456),
+ m_previoustqStatus(123456),
m_discId(missingDisc),
m_previousDiscId(0),
- m_artist(TQString::null),
- m_title(TQString::null),
+ m_artist(TQString()),
+ m_title(TQString()),
m_track(0),
m_previousTrack(99999999),
m_infoMode(infoMode)
@@ -143,7 +143,7 @@ unsigned KCompactDisc::discPosition() const
return cur_pos_abs * 1000 - FRAMES_TO_MS(m_trackStartFrames[0]);
}
-TQString KCompactDisc::discStatus(int status)
+TQString KCompactDisc::disctqStatus(int status)
{
TQString message;
@@ -280,14 +280,14 @@ bool KCompactDisc::setDevice(
kdDebug() << "Device change: "
<< (digitalPlayback ? "WM_CDDA, " : "WM_CDIN, ")
<< m_device << ", "
- << (digitalPlayback ? audioSystem : TQString::null) << ", "
- << (digitalPlayback ? audioDevice : TQString::null) << ", status: "
- << discStatus(status) << endl;
+ << (digitalPlayback ? audioSystem : TQString()) << ", "
+ << (digitalPlayback ? audioDevice : TQString()) << ", status: "
+ << disctqStatus(status) << endl;
if (status < 0)
{
// Severe (OS-level) error.
- m_device = TQString::null;
+ m_device = TQString();
}
else
{
@@ -295,19 +295,19 @@ bool KCompactDisc::setDevice(
setVolume(volume);
}
- m_previousStatus = m_status = wm_cd_status();
+ m_previoustqStatus = m_status = wm_cd_status();
if (m_infoMode == Asynchronous)
timerExpired();
else
timer.start(1000, true);
- return m_device != TQString::null;
+ return m_device != TQString();
}
void KCompactDisc::setVolume(unsigned volume)
{
int status = wm_cd_volume(volume, WM_BALANCE_SYMMETRED);
- kdDebug() << "Volume change: " << volume << ", status: " << discStatus(status) << endl;
+ kdDebug() << "Volume change: " << volume << ", status: " << disctqStatus(status) << endl;
}
void KCompactDisc::stop()
@@ -323,7 +323,7 @@ const TQString &KCompactDisc::trackArtist() const
const TQString &KCompactDisc::trackArtist(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
- return TQString::null;
+ return TQString();
return m_trackArtists[track - 1];
}
@@ -357,7 +357,7 @@ const TQString &KCompactDisc::trackTitle() const
const TQString &KCompactDisc::trackTitle(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
- return TQString::null;
+ return TQString();
return m_trackTitles[track - 1];
}
@@ -378,11 +378,11 @@ void KCompactDisc::timerExpired()
{
m_status = wm_cd_status();
- if (WM_CDS_NO_DISC(m_status) || (m_device == TQString::null))
+ if (WM_CDS_NO_DISC(m_status) || (m_device == TQString()))
{
- if (m_previousStatus != m_status)
+ if (m_previoustqStatus != m_status)
{
- m_previousStatus = m_status;
+ m_previoustqStatus = m_status;
m_discId = missingDisc;
m_previousDiscId = 0;
m_trackArtists.clear();
@@ -428,7 +428,7 @@ void KCompactDisc::timerExpired()
else
{
m_trackArtists.append(i18n("Unknown Artist"));
- m_trackTitles.append(i18n("Track %1").arg(TQString::number(i).rightJustify(2, '0')));
+ m_trackTitles.append(i18n("Track %1").tqarg(TQString::number(i).rightJustify(2, '0')));
}
// FIXME: KDE4
// track.length = cd->trk[i - 1].length;
@@ -450,12 +450,12 @@ void KCompactDisc::timerExpired()
}
if (isPlaying())
{
- m_previousStatus = m_status;
+ m_previoustqStatus = m_status;
// Update the current playing position.
emit trackPlaying(m_track, trackPosition());
}
else
- if (m_previousStatus != m_status)
+ if (m_previoustqStatus != m_status)
{
// If we are not playing, then we are either paused, or stopped.
switch (m_status)
@@ -467,7 +467,7 @@ void KCompactDisc::timerExpired()
emit trayOpening();
break;
default:
- if (m_previousStatus == WM_CDM_PLAYING || m_previousStatus == WM_CDM_PAUSED
+ if (m_previoustqStatus == WM_CDM_PLAYING || m_previoustqStatus == WM_CDM_PAUSED
&& m_status == WM_CDM_STOPPED)
{
emit discStopped();
@@ -475,7 +475,7 @@ void KCompactDisc::timerExpired()
break;
}
- m_previousStatus = m_status;
+ m_previoustqStatus = m_status;
}
}