[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [publictransport] /: Rename maxCount to count
From:       Friedrich_Karl_Tilman_Pülz <fpuelz () gmx ! de>
Date:       2012-11-30 20:36:57
Message-ID: 20121130203657.5E942A60CB () git ! kde ! org
[Download RAW message or body]

Git commit 1ea674fdf93f626f6aaddf358f484042ab962287 by Friedrich Karl Tilman Pülz.
Committed on 27/11/2012 at 02:22.
Pushed by fkpulz into branch 'master'.

Rename maxCount to count

Found in data source names as parameter, TimetableDataSource,
AbstractTimetableItemRequest and in scripts.
It refers to the number of timetable items to request,
but less or (some) more items can be returned. A higher 'count'
value can result in more timetable items being found, calling
this parameter 'maxCount' is misleading.

M  +1    -1    applet/publictransport_p.cpp
M  +2    -2    engine/datasource.cpp
M  +4    -4    engine/datasource.h
M  +1    -1    engine/gtfs/serviceprovidergtfs.cpp
M  +11   -11   engine/publictransportdataengine.cpp
M  +7    -5    engine/publictransportdataengine.h
M  +11   -11   engine/request.cpp
M  +21   -18   engine/request.h
M  +2    -2    engine/script/serviceProviders/base_hafas_journeys.js
M  +2    -2    engine/script/serviceProviders/base_hafas_stopsuggestions.js
M  +3    -3    engine/script/serviceProviders/base_hafas_timetable.js
M  +3    -3    engine/script/serviceProviders/ch_opendata.js
M  +1    -1    engine/script/serviceProviders/international_flightstats.js
M  +1    -1    engine/script/serviceProviders/it_orario.js
M  +3    -3    engine/timetablemate/src/javascriptcompletionmodel.cpp
M  +1    -1    engine/timetablemate/src/project.cpp
M  +1    -1    libpublictransporthelper/publictransportlayer.cpp
M  +2    -2    runner/publictransportrunner.cpp

http://commits.kde.org/publictransport/1ea674fdf93f626f6aaddf358f484042ab962287

diff --git a/applet/publictransport_p.cpp b/applet/publictransport_p.cpp
index b95f306..3c38938 100644
--- a/applet/publictransport_p.cpp
+++ b/applet/publictransport_p.cpp
@@ -898,7 +898,7 @@ void PublicTransportAppletPrivate::reconnectSource()
     stopIndexToSourceName.clear();
     for( int i = 0; i < stops.count(); ++i ) {
         QString stopValue = stopIDs[i].isEmpty() ? stops[i] : stopIDs[i];
-        QString currentSource = QString( "%4 %1|stop=%2|maxcount=%3" )
+        QString currentSource = QString( "%4 %1|stop=%2|count=%3" )
                 .arg( providerId ).arg( stopValue ).arg( \
                settings.maximalNumberOfDepartures() )
                 .arg( settings.departureArrivalListType() == ArrivalList
                         ? "Arrivals" : "Departures" );
diff --git a/engine/datasource.cpp b/engine/datasource.cpp
index ad5dd34..e3f2acf 100644
--- a/engine/datasource.cpp
+++ b/engine/datasource.cpp
@@ -97,9 +97,9 @@ QVariantHash ProvidersDataSource::data() const
 
 void TimetableDataSource::addUsingDataSource( const QSharedPointer< AbstractRequest \
>                 &request,
                                               const QString &sourceName, const \
                QDateTime &dateTime,
-                                              int maxCount )
+                                              int count )
 {
-    m_dataSources[ sourceName ] = SourceData( request, dateTime, maxCount );
+    m_dataSources[ sourceName ] = SourceData( request, dateTime, count );
 }
 
 void TimetableDataSource::removeUsingDataSource( const QString &sourceName )
diff --git a/engine/datasource.h b/engine/datasource.h
index 9c032fb..7419b7b 100644
--- a/engine/datasource.h
+++ b/engine/datasource.h
@@ -226,7 +226,7 @@ public:
     virtual ~TimetableDataSource();
 
     void addUsingDataSource( const QSharedPointer<AbstractRequest> &request,
-                             const QString &sourceName, const QDateTime &dateTime, \
int maxCount ); +                             const QString &sourceName, const \
QDateTime &dateTime, int count );  void removeUsingDataSource( const QString \
&sourceName );  int usageCount() const { return m_dataSources.count(); };
     QStringList usingDataSources() const { return m_dataSources.keys(); };
@@ -318,12 +318,12 @@ public:
 private:
     struct SourceData {
         SourceData( const QSharedPointer<AbstractRequest> &request = \
                QSharedPointer<AbstractRequest>(),
-                    const QDateTime &dateTime = QDateTime(), int maxCount = 1 )
-                : request(request), dateTime(dateTime), maxCount(maxCount) {}
+                    const QDateTime &dateTime = QDateTime(), int count = 1 )
+                : request(request), dateTime(dateTime), count(count) {}
 
         QSharedPointer< AbstractRequest > request;
         QDateTime dateTime;
-        int maxCount;
+        int count;
     };
 
     QHash< uint, TimetableData > m_additionalData;
diff --git a/engine/gtfs/serviceprovidergtfs.cpp \
b/engine/gtfs/serviceprovidergtfs.cpp index d1ee4df..f66e746 100644
--- a/engine/gtfs/serviceprovidergtfs.cpp
+++ b/engine/gtfs/serviceprovidergtfs.cpp
@@ -491,7 +491,7 @@ void ServiceProviderGtfs::requestDeparturesOrArrivals( const \
DepartureRequest *r  "LIMIT %3" )
             .arg( stopId )
             .arg( time.hour() * 60 * 60 + time.minute() * 60 + time.second() )
-            .arg( request->maxCount() )
+            .arg( request->count() )
             .arg( request->parseMode() == ParseForArrivals ? '<' : '>' ) // For \
                arrivals route_stops/route_times need stops before the home stop
             .arg( routeSeparator );
     if ( !query.prepare(queryString) || !query.exec() ) {
diff --git a/engine/publictransportdataengine.cpp \
b/engine/publictransportdataengine.cpp index e2348b5..cb75792 100644
--- a/engine/publictransportdataengine.cpp
+++ b/engine/publictransportdataengine.cpp
@@ -951,7 +951,7 @@ bool PublicTransportEngine::enoughDataAvailable( DataSource \
*dataSource,  }
 
     AbstractTimetableItemRequest *request = sourceData.request;
-    return timetableDataSource->enoughDataAvailable( request->dateTime(), \
request->maxCount() ); +    return timetableDataSource->enoughDataAvailable( \
request->dateTime(), request->count() );  }
 
 bool PublicTransportEngine::updateTimetableDataSource( const SourceRequestData &data \
) @@ -964,7 +964,7 @@ bool PublicTransportEngine::updateTimetableDataSource( const \
SourceRequestData &  TimetableDataSource *dataSource =
                 dynamic_cast< TimetableDataSource* >( \
                m_dataSources[nonAmbiguousName] );
         dataSource->addUsingDataSource( \
                QSharedPointer<AbstractRequest>(data.request->clone()),
-                                        data.name, data.request->dateTime(), \
data.request->maxCount() ); +                                        data.name, \
data.request->dateTime(), data.request->count() );  setData( data.name, \
dataSource->data() );  } else if ( m_runningSources.contains(nonAmbiguousName) ) {
         // Source gets already processed
@@ -978,7 +978,7 @@ bool PublicTransportEngine::updateTimetableDataSource( const \
SourceRequestData &  : new TimetableDataSource(nonAmbiguousName);
         dataSource->clear();
         dataSource->addUsingDataSource( \
                QSharedPointer<AbstractRequest>(data.request->clone()),
-                                        data.name, data.request->dateTime(), \
data.request->maxCount() ); +                                        data.name, \
data.request->dateTime(), data.request->count() );  m_dataSources[ nonAmbiguousName ] \
= dataSource;  
         // Start the request
@@ -1088,9 +1088,9 @@ QString PublicTransportEngine::fixProviderId( const QString \
&providerId )  
 QString PublicTransportEngine::disambiguateSourceName( const QString &sourceName )
 {
-    // Remove maxcount argument
+    // Remove count argument
     QString ret = sourceName;
-    ret.remove( QRegExp("(maxcount=[^\\|]+)") );
+    ret.remove( QRegExp("(count=[^\\|]+)") );
 
     // Round time parameter values to 15 minutes precision
     QRegExp rx( "(time=[^\\|]+|datetime=[^\\|]+)" );
@@ -1160,8 +1160,8 @@ QString PublicTransportEngine::disambiguateSourceName( const \
QString &sourceName  if ( parameters.contains(QLatin1String("datetime")) ) {
         ret += "|datetime=" + parameters["datetime"];
     }
-    if ( parameters.contains(QLatin1String("maxcount")) ) {
-        ret += "|maxcount=" + parameters["maxcount"];
+    if ( parameters.contains(QLatin1String("count")) ) {
+        ret += "|count=" + parameters["count"];
     }
     if ( parameters.contains(QLatin1String("longitude")) ) {
         ret += "|longitude=" + parameters["longitude"];
@@ -1396,12 +1396,12 @@ PublicTransportEngine::SourceRequestData::SourceRequestData( \
const QString &name  if ( !request->dateTime().isValid() ) {
                         request->setDateTime( QDateTime::fromString(parameterValue, \
Qt::ISODate) );  }
-                } else if ( parameterName == QLatin1String("maxcount") ) {
+                } else if ( parameterName == QLatin1String("count") ) {
                     bool ok;
-                    request->setMaxCount( parameterValue.toInt(&ok) );
+                    request->setCount( parameterValue.toInt(&ok) );
                     if ( !ok ) {
-                        kWarning() << "Bad value for 'maxcount' in source name:" << \
                parameterValue;
-                        request->setMaxCount( 20 );
+                        kWarning() << "Bad value for 'count' in source name:" << \
parameterValue; +                        request->setCount( 20 );
                     }
                 } else if ( dynamic_cast<StopsByGeoPositionRequest*>(request) ) {
                     StopsByGeoPositionRequest *stopRequest =
diff --git a/engine/publictransportdataengine.h b/engine/publictransportdataengine.h
index aae8ecc..d1567b5 100644
--- a/engine/publictransportdataengine.h
+++ b/engine/publictransportdataengine.h
@@ -996,7 +996,8 @@ The following parameters are allowed:<br />
 <table>
 <tr><td><i>stop</i></td> <td>The name or ID of the stop to get departures/arrivals \
for.</td></tr>  <tr><td><i>city</i></td> <td>The city to get departures/arrivals for, \
                if needed.</td></tr>
-<tr><td><i>maxcount</i></td> <td>The maximum departure/arrival count to \
get.</td></tr> +<tr><td><i>count</i></td> <td>The number of departures/arrivals to \
get. + @note This is just a hint for the provider.</td></tr>
 <tr><td><i>timeoffset</i></td> <td>The offset in minutes from now for the first \
departure /  arrival to get.</td></tr>
 <tr><td><i>time</i></td> <td>The time of the first departure/arrival to get \
("hh:mm"). This uses @@ -1010,7 +1011,7 @@ QDateTime::toString()).</td></tr>
 <b>"Departures de_db|stop=Pappelstraße, Bremen"</b><br />
 Gets departures for the stop "Pappelstraße, Bremen" using the service provider \
db.de.<br /><br />  
-<b>"Arrivals de_db|stop=Leipzig|timeoffset=5|maxcount=99"</b><br />
+<b>"Arrivals de_db|stop=Leipzig|timeoffset=5|count=99"</b><br />
 Gets arrivals for the stop "Leipzig" using db.de, the first possible arrival is in \
five minutes  from now, the maximum arrival count is 99.<br /><br />
 
@@ -1018,7 +1019,7 @@ from now, the maximum arrival count is 99.<br /><br />
 Gets departures for the stop "Frankfurt (Main) Speyerer Straße" using rmv.de, the \
first possible  departure is at eight o'clock.<br /><br />
 
-<b>"Departures de_rmv|stop=3000019|maxcount=20|timeoffset=1"</b><br />
+<b>"Departures de_rmv|stop=3000019|count=20|timeoffset=1"</b><br />
 Gets departures for the stop with the ID "3000019", the first possible departure is \
in one minute  from now, the maximum departure count is 20.<br /><br />
 
@@ -1146,7 +1147,8 @@ The following parameters are allowed:<br />
 <tr><td><i>originstop</i></td> <td>The name or ID of the origin stop.</td></tr>
 <tr><td><i>targetstop</i></td> <td>The name or ID of the target stop.</td></tr>
 <tr><td><i>city</i></td> <td>The city to get journeys for, if needed.</td></tr>
-<tr><td><i>maxcount</i></td> <td>The maximum journey count to get.</td></tr>
+<tr><td><i>count</i></td> <td>The number of journeys to get.
+ @note This is just a hint for the provider</td></tr>
 <tr><td><i>timeoffset</i></td>
 <td>The offset in minutes from now for the first journey to get.</td></tr>
 <tr><td><i>time</i></td> <td>The time for the first journey to get (in format \
"hh:mm").</td></tr> @@ -1160,7 +1162,7 @@ The following parameters are allowed:<br />
 Gets journeys from stop "Pappelstraße, Bremen" to stop "Kirchweg, Bremen"
 using the service provider db.de.<br /><br />
 
-<b>"Journeys de_db|originstop=Leipzig|targetstop=Hannover|timeoffset=5|maxCount=99"</b><br \
/> +<b>"Journeys de_db|originstop=Leipzig|targetstop=Hannover|timeoffset=5|count=99"</b><br \
/>  Gets journeys from stop "Leipzig" to stop "Hannover" using db.de, the first
 possible journey departs in five minutes from now, the maximum journey count is \
99.<br /><br />  
diff --git a/engine/request.cpp b/engine/request.cpp
index c499bfe..381ad92 100644
--- a/engine/request.cpp
+++ b/engine/request.cpp
@@ -54,8 +54,8 @@ QString AbstractRequest::parseModeName( ParseDocumentMode parseMode \
)  
 QString DepartureRequest::argumentsString() const
 {
-    return QString("{stop: \"%1\", city: \"%2\", maxCount: %3, dateTime: %4, \
                dataType: %5}")
-            .arg(m_stop, m_city).arg(m_maxCount)
+    return QString("{stop: \"%1\", city: \"%2\", count: %3, dateTime: %4, dataType: \
%5}") +            .arg(m_stop, m_city).arg(m_count)
             .arg(m_dateTime.toString(Qt::SystemLocaleShortDate), parseModeName());
 }
 
@@ -66,13 +66,13 @@ QString ArrivalRequest::argumentsString() const
 
 QString StopSuggestionRequest::argumentsString() const
 {
-    return QString("{stop: \"%1\", city: \"%2\", maxCount: %3}").arg(m_stop, \
m_city).arg(m_maxCount); +    return QString("{stop: \"%1\", city: \"%2\", count: \
%3}").arg(m_stop, m_city).arg(m_count);  }
 
 QString StopsByGeoPositionRequest::argumentsString() const
 {
-    return QString("{longitude: %1, longitude: %2, distance: %3, maxCount: %4}")
-            .arg(m_longitude).arg(m_latitude).arg(m_distance).arg(m_maxCount);
+    return QString("{longitude: %1, longitude: %2, distance: %3, count: %4}")
+            .arg(m_longitude).arg(m_latitude).arg(m_distance).arg(m_count);
 }
 
 QString AdditionalDataRequest::argumentsString() const
@@ -85,9 +85,9 @@ QString AdditionalDataRequest::argumentsString() const
 
 QString JourneyRequest::argumentsString() const
 {
-    return QString("{stop: \"%1\", city: \"%2\", maxCount: %3, originStop: \"%4\", "
+    return QString("{stop: \"%1\", city: \"%2\", count: %3, originStop: \"%4\", "
                    "targetStop: \"%5\", dateTime: %6}")
-            .arg(m_stop, m_city).arg(m_maxCount)
+            .arg(m_stop, m_city).arg(m_count)
             .arg(m_stop, m_targetStop, \
m_dateTime.toString(Qt::SystemLocaleShortDate));  }
 
@@ -123,7 +123,7 @@ QScriptValue StopSuggestionRequest::toScriptValue( QScriptEngine \
*engine ) const  QScriptValue value = engine->newObject();
     value.setProperty( QLatin1String("stop"), m_stop );
     value.setProperty( QLatin1String("city"), m_city );
-    value.setProperty( QLatin1String("maxCount"), m_maxCount );
+    value.setProperty( QLatin1String("count"), m_count );
     return value;
 }
 
@@ -133,7 +133,7 @@ QScriptValue StopsByGeoPositionRequest::toScriptValue( \
QScriptEngine *engine ) c  value.setProperty( QLatin1String("longitude"), m_longitude \
);  value.setProperty( QLatin1String("latitude"), m_latitude );
     value.setProperty( QLatin1String("distance"), m_distance );
-    value.setProperty( QLatin1String("maxCount"), m_maxCount );
+    value.setProperty( QLatin1String("count"), m_count );
     return value;
 }
 
@@ -142,7 +142,7 @@ QScriptValue DepartureRequest::toScriptValue( QScriptEngine \
*engine ) const  QScriptValue value = engine->newObject();
     value.setProperty( QLatin1String("stop"), m_stop );
     value.setProperty( QLatin1String("city"), m_city );
-    value.setProperty( QLatin1String("maxCount"), m_maxCount );
+    value.setProperty( QLatin1String("count"), m_count );
     value.setProperty( QLatin1String("dateTime"), engine->newDate(m_dateTime) );
     value.setProperty( QLatin1String("dataType"), parseModeName() );
     value.setProperty( QLatin1String("moreItemsDirection"), Enums::RequestedItems );
@@ -161,7 +161,7 @@ QScriptValue JourneyRequest::toScriptValue( QScriptEngine *engine \
) const  QScriptValue value = engine->newObject();
     value.setProperty( QLatin1String("stop"), m_stop );
     value.setProperty( QLatin1String("city"), m_city );
-    value.setProperty( QLatin1String("maxCount"), m_maxCount );
+    value.setProperty( QLatin1String("count"), m_count );
     value.setProperty( QLatin1String("originStop"), m_stop ); // Already in argument \
as "stop"  value.setProperty( QLatin1String("targetStop"), m_targetStop );
     value.setProperty( QLatin1String("dateTime"), engine->newDate(m_dateTime) );
diff --git a/engine/request.h b/engine/request.h
index 350d306..77dd4d5 100644
--- a/engine/request.h
+++ b/engine/request.h
@@ -85,16 +85,16 @@ class AbstractTimetableItemRequest : public AbstractRequest {
 public:
     AbstractTimetableItemRequest( const QString &sourceName = QString(),
                                   ParseDocumentMode parseMode = ParseInvalid )
-            : AbstractRequest(sourceName, parseMode), m_maxCount(20) {};
+            : AbstractRequest(sourceName, parseMode), m_count(20) {};
     AbstractTimetableItemRequest( const QString &sourceName, const QString &stop,
-                                  const QDateTime &dateTime, int maxCount,
+                                  const QDateTime &dateTime, int count,
                                   const QString &city = QString(),
                                   ParseDocumentMode parseMode = ParseInvalid )
             : AbstractRequest(sourceName, parseMode),
-              m_dateTime(dateTime), m_stop(stop), m_maxCount(maxCount), m_city(city) \
{}; +              m_dateTime(dateTime), m_stop(stop), m_count(count), m_city(city) \
                {};
     AbstractTimetableItemRequest( const AbstractTimetableItemRequest &other )
             : AbstractRequest(other), m_dateTime(other.m_dateTime), \
                m_stop(other.m_stop),
-              m_maxCount(other.m_maxCount), m_city(other.m_city) {};
+              m_count(other.m_count), m_city(other.m_city) {};
 
     virtual ~AbstractTimetableItemRequest() {};
 
@@ -114,8 +114,11 @@ public:
     /** @brief The stop name of the request. */
     QString stop() const { return m_stop; };
 
-    /** @brief The maximum number of result items, eg. departures or stop \
                suggestions. */
-    int maxCount() const { return m_maxCount; };
+    /**
+     * @brief The number of timetable items to request, eg. departures or stop \
suggestions. +     * @note This is just a hint for the provider
+     **/
+    int count() const { return m_count; };
 
     /**
      * @brief The city to get stop suggestions for.
@@ -126,13 +129,13 @@ public:
     void setDateTime( const QDateTime &dateTime ) { m_dateTime = dateTime; };
     void setStop( const QString &stop ) { m_stop = stop; };
     void setCity( const QString &city ) { m_city = city; };
-    void setMaxCount( int maxCount ) { m_maxCount = maxCount; };
+    void setCount( int count ) { m_count = count; };
 
 protected:
     /** @brief The date and time to get results for. */
     QDateTime m_dateTime;
     QString m_stop;
-    int m_maxCount;
+    int m_count;
     QString m_city;
 };
 
@@ -142,9 +145,9 @@ public:
                            ParseDocumentMode parseMode = ParseForStopSuggestions )
         : AbstractTimetableItemRequest(sourceName, parseMode) {};
     StopSuggestionRequest( const QString &sourceName, const QString &stop,
-                           int maxCount, const QString &city = QString(),
+                           int count, const QString &city = QString(),
                            ParseDocumentMode parseMode = ParseForStopSuggestions )
-        : AbstractTimetableItemRequest(sourceName, stop, QDateTime(), maxCount, \
city, parseMode) {}; +        : AbstractTimetableItemRequest(sourceName, stop, \
QDateTime(), count, city, parseMode) {};  StopSuggestionRequest( const \
StopSuggestionRequest &other )  : AbstractTimetableItemRequest(other) {};
 
@@ -166,9 +169,9 @@ public:
             : StopSuggestionRequest(sourceName, parseMode),
               m_longitude(0.0), m_latitude(0.0), m_distance(5000) {};
     StopsByGeoPositionRequest( const QString &sourceName, qreal longitude, qreal \
                latitude,
-                               int maxCount = 200, int distance = 5000,
+                               int count = 200, int distance = 5000,
                                ParseDocumentMode parseMode = ParseForStopSuggestions \
                )
-            : StopSuggestionRequest(sourceName, QString(), maxCount, QString(), \
parseMode), +            : StopSuggestionRequest(sourceName, QString(), count, \
                QString(), parseMode),
               m_longitude(longitude), m_latitude(latitude), m_distance(distance) {};
     StopsByGeoPositionRequest( const StopsByGeoPositionRequest &request )
             : StopSuggestionRequest(request),
@@ -207,10 +210,10 @@ public:
                       ParseDocumentMode parseMode = ParseForDepartures )
         : AbstractTimetableItemRequest(sourceName, parseMode) {};
     DepartureRequest( const QString &sourceName, const QString &stop,
-                      const QDateTime &dateTime, int maxCount,
+                      const QDateTime &dateTime, int count,
                       const QString &city = QString(),
                       ParseDocumentMode parseMode = ParseForDepartures )
-        : AbstractTimetableItemRequest(sourceName, stop, dateTime, maxCount, city, \
parseMode) {}; +        : AbstractTimetableItemRequest(sourceName, stop, dateTime, \
                count, city, parseMode) {};
     DepartureRequest( const DepartureRequest &info ) : \
AbstractTimetableItemRequest(info) {};  
     virtual AbstractRequest *clone() const { return new DepartureRequest(*this); };
@@ -230,10 +233,10 @@ public:
                     ParseDocumentMode parseMode = ParseForArrivals )
         : DepartureRequest(sourceName, parseMode) {};
     ArrivalRequest( const QString &sourceName, const QString &stop,
-                    const QDateTime &dateTime, int maxCount,
+                    const QDateTime &dateTime, int count,
                     const QString &city = QString(),
                     ParseDocumentMode parseMode = ParseForArrivals )
-        : DepartureRequest(sourceName, stop, dateTime, maxCount, city, parseMode) \
{}; +        : DepartureRequest(sourceName, stop, dateTime, count, city, parseMode) \
{};  
     virtual AbstractRequest *clone() const { return new ArrivalRequest(*this); };
     virtual QString argumentsString() const;
@@ -259,10 +262,10 @@ public:
     };
 
     JourneyRequest( const QString &sourceName, const QString &startStop,
-            const QString &targetStop, const QDateTime &dateTime, int maxCount,
+            const QString &targetStop, const QDateTime &dateTime, int count,
             const QString &urlToUse, const QString &city = QString(),
             ParseDocumentMode parseMode = ParseForJourneysByDepartureTime )
-        : AbstractTimetableItemRequest(sourceName, startStop, dateTime, maxCount, \
city, parseMode), +        : AbstractTimetableItemRequest(sourceName, startStop, \
dateTime, count, city, parseMode),  m_targetStop(targetStop), m_urlToUse(urlToUse), \
m_roundTrips(0)  {
     };
diff --git a/engine/script/serviceProviders/base_hafas_journeys.js \
b/engine/script/serviceProviders/base_hafas_journeys.js index cc83b36..2f8cbd0 100644
--- a/engine/script/serviceProviders/base_hafas_journeys.js
+++ b/engine/script/serviceProviders/base_hafas_journeys.js
@@ -15,7 +15,7 @@ var __hafas_journeys = function(hafas) {
         get: function( values, options ) {
             HafasPrivate.checkValues( values,
                     {required: {originStop: 'string', targetStop: 'string'}},
-                    {optional: {maxCount: 'number', dataType: 'string'}} );
+                    {optional: {count: 'number', dataType: 'string'}} );
             var options = HafasPrivate.prepareOptions( options, processor.options, \
hafas.options );  var url = processor.url( values, options );
             var userUrl = processor.userUrl( values, options );
@@ -38,7 +38,7 @@ var __hafas_journeys = function(hafas) {
             postData += '<ReqT a="' + (values.dataType == "arrivals" ? '1' : '0') + \
                '" ' +
                 'date="' + helper.formatDateTime(values.dateTime, "yyyy.MM.dd") + '" \
                ' +
                 'time="' + helper.formatDateTime(values.dateTime, "hh:mm") + '" />';
-            postData += '<RFlags b="0" f="' + Math.max(6, values.maxCount) +
+            postData += '<RFlags b="0" f="' + Math.max(6, values.count) +
                 '" chExtension="0" sMode="N" />';
             postData += '</ConReq>';
             postData += '</ReqC>';
diff --git a/engine/script/serviceProviders/base_hafas_stopsuggestions.js \
b/engine/script/serviceProviders/base_hafas_stopsuggestions.js index 49b1bf8..7d2fcf7 \
                100644
--- a/engine/script/serviceProviders/base_hafas_stopsuggestions.js
+++ b/engine/script/serviceProviders/base_hafas_stopsuggestions.js
@@ -49,7 +49,7 @@ var __hafas_stopsuggestions = function(hafas) {
         **/
         get: function( values, options ) {
             HafasPrivate.checkValues( values,
-                    {optional: {stop: 'string', maxCount: 'number',
+                    {optional: {stop: 'string', count: 'number',
                                 longitude: 'number', latitude: 'number',
                                 distance: 'number'}} );
             var byGeoPosition = values.stop == undefined &&
@@ -184,7 +184,7 @@ var __hafas_stopsuggestions = function(hafas) {
 
             var query = "performLocating=2" +
                 "&tpl=stop2json" +
-                "&look_maxno=" + (values.maxCount != undefined ? \
Math.min(values.maxCount, 999) : 200) + +                "&look_maxno=" + \
                (values.count != undefined ? Math.min(values.count, 999) : 200) +
                 "&look_maxdist=" + (values.distance != undefined ? values.distance : \
500) + // maximal distance in meters  "&look_stopclass=11111111111111" + // All \
products  "&look_nv=deleteDoubles|yes" + //get_stopweight|yes" +
diff --git a/engine/script/serviceProviders/base_hafas_timetable.js \
b/engine/script/serviceProviders/base_hafas_timetable.js index 2cc4090..917f789 \
                100644
--- a/engine/script/serviceProviders/base_hafas_timetable.js
+++ b/engine/script/serviceProviders/base_hafas_timetable.js
@@ -32,7 +32,7 @@ var __hafas_timetable = function(hafas) {
         get: function( values, options ) {
             HafasPrivate.checkValues( values,
                     {required: {stop: 'string'},
-                     optional: {dateTime: 'object', maxCount: 'number'}} );
+                     optional: {dateTime: 'object', count: 'number'}} );
             var options = HafasPrivate.prepareOptions( options,
 		    processor.options, hafas.options );
             var url = processor.url( values, options );
@@ -81,7 +81,7 @@ var __hafas_timetable = function(hafas) {
                 query += "&date=" + helper.formatDateTime(values.dateTime, \
                options.urlDateFormat) +
                          "&time=" + helper.formatDateTime(values.dateTime, \
options.urlTimeFormat);  }
-            query += "&maxJourneys=" + Math.max(20, values.maxCount == undefined ? 0 \
: values.maxCount) + // Maximum number of results +            query += \
"&maxJourneys=" + Math.max(20, values.count == undefined ? 0 : values.count) + // \
Maximum number of results  "&disableEquivs=yes" + // Do not use nearby stations
                 (options.layout == undefined ? "" : ("&L=" + options.layout)) + // \
                Specify the output layout
                 "&start=yes" + // Start the request instead of showing a form
@@ -525,7 +525,7 @@ var __hafas_timetable = function(hafas) {
                         // First get an URL to the mobile version of the departure \
board  // which contains traininfo.exe URLs
                         var urlValues = values;
-                        urlValues.maxCount = options.batchSize;
+                        urlValues.count = options.batchSize;
                         var url = processor.url( urlValues, options );
 
                         // Download and parse new data and add it to the old cached \
                items
diff --git a/engine/script/serviceProviders/ch_opendata.js \
b/engine/script/serviceProviders/ch_opendata.js index 79351ea..101d296 100644
--- a/engine/script/serviceProviders/ch_opendata.js
+++ b/engine/script/serviceProviders/ch_opendata.js
@@ -8,13 +8,13 @@ function features() {
              PublicTransport.ProvidesStopPosition,
              PublicTransport.ProvidesStopsByGeoPosition];
 }
-  
+
 function getTimetable( values ) {
     // Construct an URL from the given values
     // Cannot tell date or time nor can arrivals be requested
     var url = baseUrl + "stationboard" +
             "?station=" + values.stop + "!" + // TODO "&id=" + values.stopID
-            "&limit=" + values.maxCount;
+            "&limit=" + values.count;
 
     // Create and connect a NetworkRequest object for the URL
     var request = network.createRequest( url );
@@ -99,7 +99,7 @@ function getJourneys( values ) {
             "&date=" + helper.formatDateTime(values.dateTime, "yyyy-MM-dd") +
             "&time=" + helper.formatDateTime(values.dateTime, "hh:mm") +
             "&isArrivalTime=" + (values.dataType == "arrivals" ? "1" : "0") +
-            "&limit=" + Math.min(6, values.maxCount); // Can be 1-6
+            "&limit=" + Math.min(6, values.count); // Can be 1-6
 
     // Create a NetworkRequest object for the URL
     var request = network.createRequest( url );
diff --git a/engine/script/serviceProviders/international_flightstats.js \
b/engine/script/serviceProviders/international_flightstats.js index ccee5aa..1b17cdb \
                100644
--- a/engine/script/serviceProviders/international_flightstats.js
+++ b/engine/script/serviceProviders/international_flightstats.js
@@ -103,7 +103,7 @@ function parseTimetable( html ) {
 
 function getStopSuggestions( values ) {
     var url = "http://www.flightstats.com/go/Suggest/airportSuggest.do" +
-            "?desiredResults=" + values.maxCount +
+            "?desiredResults=" + values.count +
             "&searchSubstring=" + values.stop;
     var document = network.getSynchronous( url );
     if ( network.lastDownloadAborted ) {
diff --git a/engine/script/serviceProviders/it_orario.js \
b/engine/script/serviceProviders/it_orario.js index 63c8a95..ae32c41 100644
--- a/engine/script/serviceProviders/it_orario.js
+++ b/engine/script/serviceProviders/it_orario.js
@@ -14,7 +14,7 @@ function getTimetable( values ) {
 	    "&boardType=" + (values.dataType == "arrivals" ? "arr" : "dep") +
 	    "&date=" + helper.formatDateTime(values.dateTime, "dd.MM.yy") +
 	    "&disableEquivs=no" +
-	    "&maxJourneys=" + values.maxCount +
+	    "&maxJourneys=" + values.count +
 	    "&start=yes&productsFilter=111111111";
 
     var request = network.createRequest( url );
diff --git a/engine/timetablemate/src/javascriptcompletionmodel.cpp \
b/engine/timetablemate/src/javascriptcompletionmodel.cpp index 1185671..f76d13b \
                100644
--- a/engine/timetablemate/src/javascriptcompletionmodel.cpp
+++ b/engine/timetablemate/src/javascriptcompletionmodel.cpp
@@ -253,7 +253,7 @@ void JavaScriptCompletionModel::initGlobalFunctionCompletion() {
             "getTimetable( values )",
             i18nc("@info The description for the 'getTimetable' function",
                   "Requests and parses departure/arrival documents. The argument has \
                the "
-                  "following properties: stop, dateTime (Date object), maxCount, \
dataType " +                  "following properties: stop, dateTime (Date object), \
count, dataType "  "('departures' or 'arrivals'), city.<nl/>"
                   "This function is called by the data engine. Found \
departures/arrivals can be "  "handed over to the data engine like this:<nl/>"
@@ -306,7 +306,7 @@ void JavaScriptCompletionModel::initGlobalFunctionCompletion() {
             i18nc("@info The description for the 'getJourneys' function",
                   "Requests and parses journey documents. The argument has the "
                   "following properties: originStop, targetStop, dateTime (Date \
                object), "
-                  "maxCount, dataType, city.<nl/>"
+                  "count, dataType, city.<nl/>"
                   "This function is called by the data engine. Found journeys can "
                   "be handed over to the data engine like this:<nl/>"
                   "<icode>  // Add timetable data to the result set</icode><nl/>"
@@ -330,7 +330,7 @@ void JavaScriptCompletionModel::initGlobalFunctionCompletion() {
             "getStopSuggestions( values )",
             i18nc("@info The description for the 'getStopSuggestions' function",
                   "Requests and parses stop suggestion documents. The argument has \
                the "
-                  "following properties: stop, maxCount, city.<nl/>"
+                  "following properties: stop, count, city.<nl/>"
                   "This function is called by the data engine. The parameter "
                   "contains the contents of the document body. Found stop data "
                   "can be handed over to the data engine like this:<nl/>"
diff --git a/engine/timetablemate/src/project.cpp \
b/engine/timetablemate/src/project.cpp index 564e09b..2d75936 100644
--- a/engine/timetablemate/src/project.cpp
+++ b/engine/timetablemate/src/project.cpp
@@ -218,7 +218,7 @@ public:
                     "            \"&boardType=\" + (values.dataType == \"arrivals\" \
                ? \"arr\" : \"dep\") +\n"
                     "            \"&date=\" + helper.formatDateTime(values.dateTime, \
                \"dd.MM.yy\") +\n"
                     "            \"&time=\" + helper.formatDateTime(values.dateTime, \
                \"hh:mm\") +\n"
-                    "            \"&maxJourneys=\" + values.maxCount;\n"
+                    "            \"&maxJourneys=\" + values.count;\n"
                     "\n"
                     "    // Create a NetworkRequest object for the URL\n"
                     "    var request = network.createRequest( url );\n"
diff --git a/libpublictransporthelper/publictransportlayer.cpp \
b/libpublictransporthelper/publictransportlayer.cpp index fbde9bc..c07af05 100644
--- a/libpublictransporthelper/publictransportlayer.cpp
+++ b/libpublictransporthelper/publictransportlayer.cpp
@@ -353,7 +353,7 @@ public:
         const qreal distance = qBound( 500, qCeil(2 * radius * angle), 20000 );
 
         // Connect data source
-        dataSource = QString("Stops \
%1|latitude=%2|longitude=%3|distance=%4|maxcount=999") +        dataSource = \
                QString("Stops %1|latitude=%2|longitude=%3|distance=%4|count=999")
                 .arg(serviceProvider)
                 .arg(viewBox.center().latitude(unit))
                 .arg(viewBox.center().longitude(unit))
diff --git a/runner/publictransportrunner.cpp b/runner/publictransportrunner.cpp
index 2f12b9d..8d0552d 100644
--- a/runner/publictransportrunner.cpp
+++ b/runner/publictransportrunner.cpp
@@ -383,7 +383,7 @@ void AsyncDataEngineUpdater::query( Plasma::DataEngine *engine,
             return;
         }
 
-        m_sourceName = QString( "Journeys \
%1|originstop=%2|targetstop=%3|maxcount=%4|datetime=%5" ) +        m_sourceName = \
                QString( "Journeys \
                %1|originstop=%2|targetstop=%3|count=%4|datetime=%5" )
                        .arg( m_settings.serviceProviderID ).arg( stop ).arg( stop2 )
                        .arg( resultCount )
                        .arg( QDateTime::currentDateTime()
@@ -401,7 +401,7 @@ void AsyncDataEngineUpdater::query( Plasma::DataEngine *engine,
             type = "Departures";
         }
 
-        m_sourceName = QString( "%1 %2|stop=%3|maxcount=%4|timeoffset=%5" )
+        m_sourceName = QString( "%1 %2|stop=%3|count=%4|timeoffset=%5" )
                        .arg( type ).arg( m_settings.serviceProviderID ).arg( stop )
                        .arg( resultCount ).arg( data.minutesUntilFirstResult );
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic