summaryrefslogtreecommitdiffstats
path: root/dcoprss/query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcoprss/query.cpp')
-rw-r--r--dcoprss/query.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/dcoprss/query.cpp b/dcoprss/query.cpp
index b2c29fdf..9c324890 100644
--- a/dcoprss/query.cpp
+++ b/dcoprss/query.cpp
@@ -27,35 +27,35 @@
using KXMLRPC::Server;
-void SlotCaller::call( QObject *object, const char *slot,
+void SlotCaller::call( TQObject *object, const char *slot,
const KXMLRPC::Query::Result &result )
{
SlotCaller caller;
- connect( &caller, SIGNAL( signal( const KXMLRPC::Query::Result &) ),
+ connect( &caller, TQT_SIGNAL( signal( const KXMLRPC::Query::Result &) ),
object, slot );
emit caller.signal( result );
}
-QueryService::QueryService( RSSService *service ) : QObject(), DCOPObject( "RSSQuery" ),
+QueryService::QueryService( RSSService *service ) : TQObject(), DCOPObject( "RSSQuery" ),
m_service( service )
{
m_xmlrpcServer = new KXMLRPC::Server( KURL( "http://www.syndic8.com/xmlrpc.php"), this );
}
-QStringList QueryService::listActive()
+TQStringList QueryService::listActive()
{
if ( !m_service )
- return QStringList();
+ return TQStringList();
return m_service->list();
}
-void QueryService::cachedCall( const QString &method,
- const QValueList<QVariant> &args,
+void QueryService::cachedCall( const TQString &method,
+ const TQValueList<TQVariant> &args,
const char *slot )
{
kdDebug() << "Calling " << method << endl;
- const QString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(),
+ const TQString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(),
method, args );
CacheEntry *cacheEntry = Cache::self().find( cacheKey );
@@ -70,7 +70,7 @@ void QueryService::cachedCall( const QString &method,
void QueryService::updateCache( const KXMLRPC::Query::Result &result )
{
- const QString cacheKey = Cache::getCacheKey( result.server(),
+ const TQString cacheKey = Cache::getCacheKey( result.server(),
result.method(),
result.args() );
@@ -81,57 +81,57 @@ void QueryService::updateCache( const KXMLRPC::Query::Result &result )
}
}
-void QueryService::findFeeds( const QString &query )
+void QueryService::findFeeds( const TQString &query )
{
kdDebug() << "QueryService::findFeeds()" << endl;
- QStringList args;
+ TQStringList args;
args << query << "headlines_rank";
cachedCall( "syndic8.FindFeeds", Server::toVariantList( args ),
- SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
}
-void QueryService::findSites( const QString& query )
+void QueryService::findSites( const TQString& query )
{
kdDebug() << "QueryService::findSites()" << endl;
cachedCall( "syndic8.FindSites", Server::toVariantList( query ),
- SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
}
-void QueryService::getFeedInfo( const QVariant& ids )
+void QueryService::getFeedInfo( const TQVariant& ids )
{
kdDebug() << "QueryService::getFeedInfo()" << endl;
cachedCall( "syndic8.GetFeedInfo", Server::toVariantList( ids ),
- SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) );
}
-void QueryService::getCategories( const QString &category )
+void QueryService::getCategories( const TQString &category )
{
kdDebug() << "QueryService::getCategories()" << endl;
if ( category == "Top" ) {
- cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( QString::fromLatin1( "DMOZ" ) ),
- SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
+ cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( TQString::fromLatin1( "DMOZ" ) ),
+ TQT_SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
} else {
- QStringList args;
+ TQStringList args;
args << "DMOZ" << category;
cachedCall( "syndic8.GetCategoryChildren", Server::toVariantList( args ),
- SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
}
}
-void QueryService::getFeedsInCategory( const QString &category )
+void QueryService::getFeedsInCategory( const TQString &category )
{
kdDebug() << "QueryService::getFeedsInCategory()" << endl;
- QStringList args;
+ TQStringList args;
args << "DMOZ" << category;
cachedCall( "syndic8.GetFeedsInCategory", Server::toVariantList( args ),
- SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) );
+ TQT_SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) );
}
void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result )
@@ -144,11 +144,11 @@ void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result )
updateCache( result );
- QValueList<int> ids;
+ TQValueList<int> ids;
- const QValueList<QVariant> values = result.data()[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = values.begin();
- QValueList<QVariant>::ConstIterator end = values.end();
+ const TQValueList<TQVariant> values = result.data()[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = values.begin();
+ TQValueList<TQVariant>::ConstIterator end = values.end();
for ( ; it != end; ++it ) {
ids << ( *it ).toInt();
kdDebug() << "Found feed #" << ( *it ).toInt() << endl;
@@ -166,17 +166,17 @@ void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result )
updateCache( result );
- QMap<QString, QString> links;
- QValueList<RSSNewsFeed> feeds;
+ TQMap<TQString, TQString> links;
+ TQValueList<RSSNewsFeed> feeds;
- const QValueList<QVariant> feedInfos = result.data();
- QValueList<QVariant>::ConstIterator it = feedInfos.begin();
- QValueList<QVariant>::ConstIterator end = feedInfos.end();
+ const TQValueList<TQVariant> feedInfos = result.data();
+ TQValueList<TQVariant>::ConstIterator it = feedInfos.begin();
+ TQValueList<TQVariant>::ConstIterator end = feedInfos.end();
for ( ; it != end; ++it ) {
- const QMap<QString, QVariant> feedInfo = ( *it ).toMap();
+ const TQMap<TQString, TQVariant> feedInfo = ( *it ).toMap();
- const QString name = feedInfo[ "sitename" ].toString();
- const QString link = feedInfo[ "dataurl" ].toString();
+ const TQString name = feedInfo[ "sitename" ].toString();
+ const TQString link = feedInfo[ "dataurl" ].toString();
links[ name ] = link;
RSSNewsFeed feed;
@@ -189,7 +189,7 @@ void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result )
feed.m_editor = feedInfo[ "editor" ].toString();
feed.m_publisher = feedInfo[ "publisher" ].toString();
feed.m_creator = feedInfo[ "creator" ].toString();
- QDateTime dateTime;
+ TQDateTime dateTime;
dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_created" ].toString() ) );
feed.m_dateCreated = dateTime;
dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_approved" ].toString() ) );
@@ -231,11 +231,11 @@ void QueryService::slotGotCategories( const KXMLRPC::Query::Result &result )
updateCache( result );
- QStringList categories;
+ TQStringList categories;
- const QValueList<QVariant> cats = result.data()[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = cats.begin();
- QValueList<QVariant>::ConstIterator end = cats.end();
+ const TQValueList<TQVariant> cats = result.data()[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = cats.begin();
+ TQValueList<TQVariant>::ConstIterator end = cats.end();
for ( ; it != end; ++it )
categories << ( *it ).toString();
@@ -254,11 +254,11 @@ void QueryService::slotGotFeedsInCategory( const KXMLRPC::Query::Result &result
updateCache( result );
- QValueList<int> ids;
+ TQValueList<int> ids;
- const QValueList<QVariant> values = result.data()[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = values.begin();
- QValueList<QVariant>::ConstIterator end = values.end();
+ const TQValueList<TQVariant> values = result.data()[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = values.begin();
+ TQValueList<TQVariant>::ConstIterator end = values.end();
for ( ; it != end; ++it ) {
ids << ( *it ).toInt();
kdDebug() << "Got feed in category: #" << ( *it ).toInt() << endl;