author | eilers <eilers> | 2005-01-03 16:44:42 (UTC) |
---|---|---|
committer | eilers <eilers> | 2005-01-03 16:44:42 (UTC) |
commit | 310c7dce0c9043f66725bc79449fe958a12ad459 (patch) (side-by-side diff) | |
tree | 9d789c21b1fb88bdd8a1ad7470867b91c70276b2 /libopie2 | |
parent | 0b3bbec6703c021a188c865e822f536bfa3045fc (diff) | |
download | opie-310c7dce0c9043f66725bc79449fe958a12ad459.zip opie-310c7dce0c9043f66725bc79449fe958a12ad459.tar.gz opie-310c7dce0c9043f66725bc79449fe958a12ad459.tar.bz2 |
Fixing stupid API documentation error.
Moving hasQuerySettings() and querySettings up to OPimAccessTemplate to
be available for all frontends..
-rw-r--r-- | libopie2/opiepim/ChangeLog | 3 | ||||
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp | 1 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessbackend.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessbackend.h | 2 | ||||
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 9 | ||||
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.h | 15 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 43 |
7 files changed, 40 insertions, 35 deletions
diff --git a/libopie2/opiepim/ChangeLog b/libopie2/opiepim/ChangeLog index 2007744..320b189 100644 --- a/libopie2/opiepim/ChangeLog +++ b/libopie2/opiepim/ChangeLog @@ -1 +1,4 @@ +2005-01-03 Stefan Eilers <stefan@eilers-online.net> + * Fixing bug in API documentation + * Moving hasQuerySettings() and querySettings() to OPimAccessTemplate to be available for all frontends 2004-12-28 Stefan Eilers <stefan@eilers-online.net> diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp index 41b714e..629e4da 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp @@ -210,2 +210,3 @@ QArray<int> ODateBookAccessBackend_SQL::allRecords()const QArray<int> ODateBookAccessBackend_SQL::queryByExample(const OPimEvent&, int, const QDateTime& ) { + qDebug( "Accessing ODateBookAccessBackend_SQL::queryByExample() which is not implemented!" ); return QArray<int>(); diff --git a/libopie2/opiepim/backend/otodoaccessbackend.cpp b/libopie2/opiepim/backend/otodoaccessbackend.cpp index f979976..c7ce123 100644 --- a/libopie2/opiepim/backend/otodoaccessbackend.cpp +++ b/libopie2/opiepim/backend/otodoaccessbackend.cpp @@ -56,3 +56,3 @@ bool OPimTodoAccessBackend::hasQuerySettings (uint querySettings) const UIDArray OPimTodoAccessBackend::queryByExample( const UIDArray& uidlist, const OPimTodo& query, int settings, - const QDateTime& endperiod )const + const QDateTime& startperiod )const { diff --git a/libopie2/opiepim/backend/otodoaccessbackend.h b/libopie2/opiepim/backend/otodoaccessbackend.h index 870ee57..06cece3 100644 --- a/libopie2/opiepim/backend/otodoaccessbackend.h +++ b/libopie2/opiepim/backend/otodoaccessbackend.h @@ -66,3 +66,3 @@ public: - UIDArray queryByExample( const UIDArray& uidlist, const OPimTodo& query, int settings, const QDateTime& endperiod = QDateTime() )const; + UIDArray queryByExample( const UIDArray& uidlist, const OPimTodo& query, int settings, const QDateTime& startperiod = QDateTime() )const; UIDArray sorted( const UIDArray&, bool asc, int, int, const QArray<int>& )const; diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index 9bbc820..9d18d47 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp @@ -120,11 +120,2 @@ bool OPimContactAccess::save () -const uint OPimContactAccess::querySettings() -{ - return ( m_backEnd->querySettings() ); -} - -bool OPimContactAccess::hasQuerySettings ( int querySettings ) const -{ - return ( m_backEnd->hasQuerySettings ( querySettings ) ); -} diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h index 5051321..9a2ecaf 100644 --- a/libopie2/opiepim/core/ocontactaccess.h +++ b/libopie2/opiepim/core/ocontactaccess.h @@ -118,17 +118,2 @@ class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact> - /** - * Return all possible settings for queryByExample(). - * @return All settings provided by the current backend - * (i.e.: WildCards & IgnoreCase) - * @see QuerySettings in OPimBase for details of the parameter, queryByExample() - */ - const uint querySettings(); - - /** - * Check whether settings are correct for queryByExample(). - * @return <i>true</i> if the given settings are correct and possible. - * @see QuerySettings in OPimBase for details of the parameter - */ - bool hasQuerySettings ( int querySettings ) const; - /** diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index 3875f09..823f03d 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h @@ -89,2 +89,17 @@ public: + /** + * Return all possible settings for queryByExample(). + * @return All settings provided by the current backend + * (i.e.: WildCards & IgnoreCase) + * @see QuerySettings in OPimBase for details of the parameter, queryByExample() + */ + const uint querySettings(); + + /** + * Check whether settings are correct for queryByExample(). + * @return <i>true</i> if the given settings are correct and possible. + * @see QuerySettings in OPimBase for details of the parameter + */ + bool hasQuerySettings ( int querySettings ) const; + /** @@ -94,3 +109,3 @@ public: * as a search mask which is converted into a query regarding the querySettings. If a time period is needed - * (as for OpimBase::DateDiff), you have to use the date/time in the query object and the endperiod (the last parameter). + * (as for OpimBase::DateDiff), you have to use the date/time in the query object and the startperiod (the last parameter). * @see QuerySettings in class OPimBase @@ -98,5 +113,5 @@ public: * @param querySettings This parameter defines what should be searched and how the query should be interpreted - * @param endperiod Defines the end of a period for some special queries. + * @param startperiod Defines the start of a period for some special queries. */ - virtual List queryByExample( const T& query, int querySettings, const QDateTime& endperiod = QDateTime() ); + virtual List queryByExample( const T& query, int querySettings, const QDateTime& startperiod = QDateTime() ); @@ -107,3 +122,3 @@ public: * as a search mask which is converted into a query regarding the querySettings. If a time period is needed - * (as for OpimBase::DateDiff), you have to use the date/time in the query object and the endperiod (the last parameter). + * (as for OpimBase::DateDiff), you have to use the date/time in the query object and the startperiod (the last parameter). * @see QuerySettings in class OPimBase @@ -111,5 +126,5 @@ public: * @param querySettings This parameter defines what should be searched and how the query should be interpreted - * @param endperiod Defines the end of a period for some special queries. + * @param startperiod Defines the start of a period for some special queries. */ - virtual List queryByExample( const OPimRecord* query, int querySettings, const QDateTime& endperiod = QDateTime() ); + virtual List queryByExample( const OPimRecord* query, int querySettings, const QDateTime& startperiod = QDateTime() ); /** @@ -119,3 +134,3 @@ public: * as a search mask which is converted into a query regarding the querySettings. If a time period is needed - * (as for OpimBase::DateDiff), you have to use the date/time in the query object and the endperiod (the last parameter). + * (as for OpimBase::DateDiff), you have to use the date/time in the query object and the startperiod (the last parameter). * @see QuerySettings in class OPimBase @@ -124,6 +139,6 @@ public: * @param querySettings This parameter defines what should be searched and how the query should be interpreted - * @param endperiod Defines the end of a period for some special queries. + * @param startperiod Defines the start of a period for some special queries. */ virtual List queryByExample( const OPimAccessTemplate::List& uidlist, const T& query, int querySettings, - const QDateTime& endperiod = QDateTime() ); + const QDateTime& startperiod = QDateTime() ); @@ -310,2 +325,12 @@ QArray<int> OPimAccessTemplate<T>::records()const { +template <class T> +const uint OPimAccessTemplate<T>::querySettings(){ + return m_backEnd->querySettings(); +} + +template <class T> +bool OPimAccessTemplate<T>::hasQuerySettings ( int querySettings ) const { + return m_backEnd->hasQuerySettings( querySettings ); +} + |