diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
commit | 70b9eea2ba01c3691497f49e4c45cb070c16193c (patch) | |
tree | 9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/plugins/streaming/streaming-job.cpp | |
parent | 998c1384ace4ae4655997c181fa33242148cd0a4 (diff) | |
download | tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip |
TQt4 port kradio
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/streaming/streaming-job.cpp')
-rw-r--r-- | kradio3/plugins/streaming/streaming-job.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kradio3/plugins/streaming/streaming-job.cpp b/kradio3/plugins/streaming/streaming-job.cpp index 0c3736a..4374de9 100644 --- a/kradio3/plugins/streaming/streaming-job.cpp +++ b/kradio3/plugins/streaming/streaming-job.cpp @@ -24,8 +24,8 @@ StreamingJob::StreamingJob() - : QObject(), - m_URL(QString::null), + : TQObject(), + m_URL(TQString()), m_SoundFormat(), m_BufferSize(65536), m_Buffer(m_BufferSize), @@ -38,8 +38,8 @@ StreamingJob::StreamingJob() { } -StreamingJob::StreamingJob(const QString &_URL, const SoundFormat &_SoundFormat, size_t _bufferSize) - : QObject(), +StreamingJob::StreamingJob(const TQString &_URL, const SoundFormat &_SoundFormat, size_t _bufferSize) + : TQObject(), m_URL(_URL), m_SoundFormat(_SoundFormat), m_BufferSize(_bufferSize), @@ -54,7 +54,7 @@ StreamingJob::StreamingJob(const QString &_URL, const SoundFormat &_SoundFormat, } StreamingJob::StreamingJob(const StreamingJob &c) - : QObject(), + : TQObject(), m_URL(c.m_URL), m_SoundFormat(c.m_SoundFormat), m_BufferSize(c.m_BufferSize), @@ -73,7 +73,7 @@ StreamingJob::~StreamingJob() } -void StreamingJob::setURL(const QString &url) +void StreamingJob::setURL(const TQString &url) { if (m_URL != url) { m_URL = url; @@ -109,10 +109,10 @@ bool StreamingJob::startPutJob() if (!m_KIO_Job) return false; m_KIO_Job->setAsyncDataEnabled(true); - connect (m_KIO_Job, SIGNAL(dataReq(KIO::Job *job, QByteArray &data)), - this, SLOT(slotWriteData (KIO::Job *job, QByteArray &data))); - connect (m_KIO_Job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotIOJobResult(KIO::Job *))); + connect (m_KIO_Job, TQT_SIGNAL(dataReq(KIO::Job *job, TQByteArray &data)), + this, TQT_SLOT(slotWriteData (KIO::Job *job, TQByteArray &data))); + connect (m_KIO_Job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotIOJobResult(KIO::Job *))); return true; } @@ -154,10 +154,10 @@ bool StreamingJob::startGetJob() if (!m_KIO_Job) return false; m_KIO_Job->setAsyncDataEnabled(true); - connect (m_KIO_Job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotReadData(KIO::Job *, const QByteArray &))); - connect (m_KIO_Job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotIOJobResult(KIO::Job *))); + connect (m_KIO_Job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotReadData(KIO::Job *, const TQByteArray &))); + connect (m_KIO_Job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotIOJobResult(KIO::Job *))); return true; } @@ -196,12 +196,12 @@ bool StreamingJob::stopCapture() } -void StreamingJob::slotReadData (KIO::Job */*job*/, const QByteArray &data) +void StreamingJob::slotReadData (KIO::Job */*job*/, const TQByteArray &data) { size_t free = m_Buffer.getFreeSize(); if (free < data.size()) { m_SkipCount += data.size() - free; - emit logStreamWarning(m_URL, i18n("skipped %1 bytes").arg(data.size() - free)); + emit logStreamWarning(m_URL, i18n("skipped %1 bytes").tqarg(data.size() - free)); } else { free = data.size(); @@ -216,13 +216,13 @@ void StreamingJob::slotReadData (KIO::Job */*job*/, const QByteArray &data) } -void StreamingJob::slotWriteData (KIO::Job */*job*/, QByteArray &) +void StreamingJob::slotWriteData (KIO::Job */*job*/, TQByteArray &) { size_t size = m_Buffer.getFillSize(); if (size) { char *buf = new char [size]; size = m_Buffer.takeData(buf, size); - QByteArray data; + TQByteArray data; data.assign(buf, size); m_KIO_Job->sendAsyncData(data); m_StreamPos += size; |