summaryrefslogtreecommitdiffstats
path: root/tdenewstuff/provider.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-07 10:59:55 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-07 10:59:55 -0500
commit72a2afc0afd917e93249d034b968079135588c7e (patch)
treefab115088481ab8a74e57ce03b9cce176bd92007 /tdenewstuff/provider.cpp
parent62bfcbe4780e5b08aee6a16895f5e508f0646bd2 (diff)
downloadtdelibs-72a2afc0afd917e93249d034b968079135588c7e.tar.gz
tdelibs-72a2afc0afd917e93249d034b968079135588c7e.zip
Add proper OCS support to the base TDENewStuff class
This relates to Bug 2127
Diffstat (limited to 'tdenewstuff/provider.cpp')
-rw-r--r--tdenewstuff/provider.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tdenewstuff/provider.cpp b/tdenewstuff/provider.cpp
index 8d576ca6c..ee76d887b 100644
--- a/tdenewstuff/provider.cpp
+++ b/tdenewstuff/provider.cpp
@@ -316,7 +316,12 @@ void Provider::slotJobResult( TDEIO::Job *job )
//int maxEntries = 50;
int maxEntries = 100;
- setDownloadUrl( KURL( mBaseURL ) );
+ // FIXME
+ // The download URL assumes no more than 100 entries will be present on the remote server
+ // Any more and assembly of the list from multiple fetched pages will be required; the TDENewStuff Engine class does not have support for paging at this time
+ setDownloadUrl( KURL( mBaseURL + "content/data?categories=" + desiredCategories + "&search=&sortmode=alpha&page=0&pagesize=" + TQString("%1").arg(maxEntries) ) );
+ // FIXME
+ // Uploading is not implemented at this time
setUploadUrl( KURL( mBaseURL ) );
setNoUploadUrl( KURL( mBaseURL ) );
@@ -347,8 +352,9 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList )
cfg->setGroup("TDENewStuff");
TQString providersUrl = providersList;
- if( providersUrl.isEmpty() )
- providersUrl = cfg->readEntry( "ProvidersUrl" );
+ if( providersUrl.isEmpty() ) {
+ providersUrl = cfg->readEntry( "ProvidersUrl" );
+ }
if ( providersUrl.isEmpty() ) {
TQString server = cfg->readEntry( "MasterServer",