diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /knewsticker/common/newsengine.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker/common/newsengine.cpp')
-rw-r--r-- | knewsticker/common/newsengine.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
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 <krun.h> #include <kstandarddirs.h> -#include <qbuffer.h> +#include <tqbuffer.h> -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<ConfigAccess *>(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("<p>The program '%1' was terminated abnormally.<br>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("<p>Program output:<br>%1<br>").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."); |