diff options
Diffstat (limited to 'librss/loader.cpp')
-rw-r--r-- | librss/loader.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/librss/loader.cpp b/librss/loader.cpp index c38400f4..696d4f86 100644 --- a/librss/loader.cpp +++ b/librss/loader.cpp @@ -15,9 +15,9 @@ #include <kprocess.h> #include <kurl.h> -#include <qdom.h> -#include <qbuffer.h> -#include <qregexp.h> +#include <tqdom.h> +#include <tqbuffer.h> +#include <tqregexp.h> using namespace RSS; @@ -42,7 +42,7 @@ struct FileRetriever::Private delete buffer; } - QBuffer *buffer; + TQBuffer *buffer; int lastError; }; @@ -65,11 +65,11 @@ void FileRetriever::retrieveData(const KURL &url) d->buffer->open(IO_WriteOnly); KIO::Job *job = KIO::get(url, false, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); - connect(job, SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), - SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), + TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); } int FileRetriever::errorCode() const @@ -77,14 +77,14 @@ int FileRetriever::errorCode() const return d->lastError; } -void FileRetriever::slotData(KIO::Job *, const QByteArray &data) +void FileRetriever::slotData(KIO::Job *, const TQByteArray &data) { d->buffer->writeBlock(data.data(), data.size()); } void FileRetriever::slotResult(KIO::Job *job) { - QByteArray data = d->buffer->buffer(); + TQByteArray data = d->buffer->buffer(); data.detach(); delete d->buffer; @@ -114,7 +114,7 @@ struct OutputRetriever::Private } KShellProcess *process; - QBuffer *buffer; + TQBuffer *buffer; int lastError; }; @@ -138,10 +138,10 @@ void OutputRetriever::retrieveData(const KURL &url) d->buffer->open(IO_WriteOnly); d->process = new KShellProcess(); - connect(d->process, SIGNAL(processExited(KProcess *)), - SLOT(slotExited(KProcess *))); - connect(d->process, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(slotOutput(KProcess *, char *, int))); + connect(d->process, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(slotExited(KProcess *))); + connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(slotOutput(KProcess *, char *, int))); *d->process << url.path(); d->process->start(KProcess::NotifyOnExit, KProcess::Stdout); } @@ -161,7 +161,7 @@ void OutputRetriever::slotExited(KProcess *p) if (!p->normalExit()) d->lastError = p->exitStatus(); - QByteArray data = d->buffer->buffer(); + TQByteArray data = d->buffer->buffer(); data.detach(); delete d->buffer; @@ -194,10 +194,10 @@ Loader *Loader::create() return new Loader; } -Loader *Loader::create(QObject *object, const char *slot) +Loader *Loader::create(TQObject *object, const char *slot) { Loader *loader = create(); - connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)), + connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), object, slot); return loader; } @@ -218,8 +218,8 @@ void Loader::loadFrom(const KURL &url, DataRetriever *retriever) d->retriever = retriever; - connect(d->retriever, SIGNAL(dataRetrieved(const QByteArray &, bool)), - this, SLOT(slotRetrieverDone(const QByteArray &, bool))); + connect(d->retriever, TQT_SIGNAL(dataRetrieved(const TQByteArray &, bool)), + this, TQT_SLOT(slotRetrieverDone(const TQByteArray &, bool))); d->retriever->retrieveData(url); } @@ -229,7 +229,7 @@ int Loader::errorCode() const return d->lastError; } -void Loader::slotRetrieverDone(const QByteArray &data, bool success) +void Loader::slotRetrieverDone(const TQByteArray &data, bool success) { d->lastError = d->retriever->errorCode(); @@ -240,7 +240,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) Status status = Success; if (success) { - QDomDocument doc; + TQDomDocument doc; /* Some servers insert whitespace before the <?xml...?> declaration. * QDom doesn't tolerate that (and it's right, that's invalid XML), @@ -250,7 +250,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) const char *charData = data.data(); int len = data.count(); - while (len && QChar(*charData).isSpace()) { + while (len && TQChar(*charData).isSpace()) { --len; ++charData; } @@ -259,12 +259,12 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) * with the three leading unicode characters 0357, 0273, 0277. For * an example, check http://msdn.microsoft.com/rss.xml */ - if (len > 3 && QChar(*charData) == QChar(0357)) { + if (len > 3 && TQChar(*charData) == TQChar(0357)) { len -= 3; charData += 3; } - QByteArray tmpData; + TQByteArray tmpData; tmpData.setRawData(charData, len); if (doc.setContent(tmpData)) |