From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- knewsticker/common/newsengine.cpp | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'knewsticker/common/newsengine.cpp') diff --git a/knewsticker/common/newsengine.cpp b/knewsticker/common/newsengine.cpp index cce7895c..a283a68b 100644 --- a/knewsticker/common/newsengine.cpp +++ b/knewsticker/common/newsengine.cpp @@ -21,9 +21,9 @@ #include #include -#include +#include -Article::Article(NewsSourceBase *parent, const QString &headline, +Article::Article(NewsSourceBase *parent, const TQString &headline, const KURL &address) : XMLNewsArticle(headline, address), m_parent(parent), @@ -45,22 +45,22 @@ void Article::open() NewsSourceBase::NewsSourceBase(const Data &nsd, ConfigIface *config) : XMLNewsSource(), m_data(nsd), - m_icon(QPixmap()), + m_icon(TQPixmap()), m_cfg(dynamic_cast(config)), m_newsIconMgr(NewsIconMgr::self()) { - connect(this, SIGNAL(loadComplete(XMLNewsSource *, bool)), - SLOT(slotProcessArticles(XMLNewsSource *, bool))); + connect(this, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)), + TQT_SLOT(slotProcessArticles(XMLNewsSource *, bool))); } void NewsSourceBase::getIcon() { - connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), - this, SLOT(slotGotIcon(const KURL &, const QPixmap &))); + connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); m_newsIconMgr->getIcon( KURL( m_data.icon ) ); } -QString NewsSourceBase::newsSourceName() const +TQString NewsSourceBase::newsSourceName() const { if (m_cfg->customNames() || m_name.isEmpty()) return m_data.name; @@ -68,7 +68,7 @@ QString NewsSourceBase::newsSourceName() const return m_name; } -QString NewsSourceBase::subjectText(const Subject subject) +TQString NewsSourceBase::subjectText(const Subject subject) { switch (subject) { case Arts: return i18n("Arts"); @@ -144,7 +144,7 @@ void NewsSourceBase::slotProcessArticles(XMLNewsSource *, bool gotEm) emit newNewsAvailable(this, oldArticles != m_articles); } -Article::Ptr NewsSourceBase::article(const QString &headline) +Article::Ptr NewsSourceBase::article(const TQString &headline) { Article::List::ConstIterator it = m_articles.begin(); Article::List::ConstIterator end = m_articles.end(); @@ -155,13 +155,13 @@ Article::Ptr NewsSourceBase::article(const QString &headline) return 0L; } -void NewsSourceBase::slotGotIcon(const KURL &url, const QPixmap &pixmap) +void NewsSourceBase::slotGotIcon(const KURL &url, const TQPixmap &pixmap) { if (url.url() == m_data.icon) { m_icon = pixmap; - disconnect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), - this, SLOT(slotGotIcon(const KURL &, const QPixmap &))); + disconnect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); } } @@ -181,10 +181,10 @@ ProgramNewsSource::ProgramNewsSource(const NewsSourceBase::Data &nsd, m_program(new KProcess()), m_programOutput(0) { - connect(m_program, SIGNAL(processExited(KProcess *)), - SLOT(slotProgramExited(KProcess *))); - connect(m_program, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(slotGotProgramOutput(KProcess *, char *, int))); + connect(m_program, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(slotProgramExited(KProcess *))); + connect(m_program, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(slotGotProgramOutput(KProcess *, char *, int))); m_data.sourceFile = KURL(m_data.sourceFile).encodedPathAndQuery(); } @@ -213,7 +213,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc) { bool okSoFar = true; - QString errorMsg; + TQString errorMsg; if (!proc->normalExit()) { errorMsg = i18n("

The program '%1' was terminated abnormally.
This can" @@ -228,9 +228,9 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc) } if (!okSoFar) { - QString output = QString(m_programOutput->buffer()); + TQString output = TQString(m_programOutput->buffer()); if (!output.isEmpty()) { - output = QString::fromLatin1("\"") + output + QString::fromLatin1("\""); + output = TQString::fromLatin1("\"") + output + TQString::fromLatin1("\""); errorMsg += i18n("

Program output:
%1
").arg(output); } KMessageBox::detailedError(0, i18n("An error occurred while updating the" @@ -244,7 +244,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc) m_programOutput = 0; } -QString ProgramNewsSource::errorMessage(const ErrorCode errorCode) +TQString ProgramNewsSource::errorMessage(const ErrorCode errorCode) { switch (errorCode) { case EPERM: return i18n("The program '%1' could not be started at all."); -- cgit v1.2.1