summaryrefslogtreecommitdiff
authorerik <erik>2007-01-31 21:57:44 (UTC)
committer erik <erik>2007-01-31 21:57:44 (UTC)
commit958e042c5a4d4e38fd1baae50b78a2febfd306ab (patch) (unidiff)
tree7d86d03549cea01b03ce08926624a50fb086890c
parent6b321230cf24e50b11783b3511a457f22ae79a58 (diff)
downloadopie-958e042c5a4d4e38fd1baae50b78a2febfd306ab.zip
opie-958e042c5a4d4e38fd1baae50b78a2febfd306ab.tar.gz
opie-958e042c5a4d4e38fd1baae50b78a2febfd306ab.tar.bz2
The queryByExample member function was not properly overridden by the child
class. This means that the last child in the chain would be called instead. Seeing as how the function is not really implemented in this class I am sure that they do want the override so a user is A. not fooled into thinking it is and B. running into a parent function doing the wrong thing.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp2
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
index 629e4da..78c3bf7 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
@@ -198,25 +198,25 @@ bool ODateBookAccessBackend_SQL::reload()
198} 198}
199 199
200bool ODateBookAccessBackend_SQL::save() 200bool ODateBookAccessBackend_SQL::save()
201{ 201{
202 return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers) 202 return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers)
203} 203}
204 204
205QArray<int> ODateBookAccessBackend_SQL::allRecords()const 205QArray<int> ODateBookAccessBackend_SQL::allRecords()const
206{ 206{
207 return m_uids; 207 return m_uids;
208} 208}
209 209
210QArray<int> ODateBookAccessBackend_SQL::queryByExample(const OPimEvent&, int, const QDateTime& ) { 210QArray<int> ODateBookAccessBackend_SQL::queryByExample(const int& unUsed, int settings, const QDateTime& ) {
211 qDebug( "Accessing ODateBookAccessBackend_SQL::queryByExample() which is not implemented!" ); 211 qDebug( "Accessing ODateBookAccessBackend_SQL::queryByExample() which is not implemented!" );
212 return QArray<int>(); 212 return QArray<int>();
213} 213}
214 214
215void ODateBookAccessBackend_SQL::clear() 215void ODateBookAccessBackend_SQL::clear()
216{ 216{
217 QString qu = "drop table datebook;"; 217 QString qu = "drop table datebook;";
218 qu += "drop table custom_data;"; 218 qu += "drop table custom_data;";
219 219
220 OSQLRawQuery raw( qu ); 220 OSQLRawQuery raw( qu );
221 OSQLResult res = m_driver->query( &raw ); 221 OSQLResult res = m_driver->query( &raw );
222 222
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
index a649d25..2de2dca 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
@@ -50,25 +50,25 @@ namespace Opie {
50class ODateBookAccessBackend_SQL : public ODateBookAccessBackend { 50class ODateBookAccessBackend_SQL : public ODateBookAccessBackend {
51public: 51public:
52 ODateBookAccessBackend_SQL( const QString& appName, 52 ODateBookAccessBackend_SQL( const QString& appName,
53 const QString& fileName = QString::null); 53 const QString& fileName = QString::null);
54 ~ODateBookAccessBackend_SQL(); 54 ~ODateBookAccessBackend_SQL();
55 55
56 bool load(); 56 bool load();
57 bool reload(); 57 bool reload();
58 bool save(); 58 bool save();
59 59
60 QArray<int> allRecords()const; 60 QArray<int> allRecords()const;
61 QArray<int> matchRegexp(const QRegExp &r) const; 61 QArray<int> matchRegexp(const QRegExp &r) const;
62 QArray<int> queryByExample( const OPimEvent&, int, const QDateTime& d = QDateTime() ); 62 QArray<int> queryByExample( const int& unUsed, int settings, const QDateTime& d = QDateTime() );
63 OPimEvent find( int uid )const; 63 OPimEvent find( int uid )const;
64 void clear(); 64 void clear();
65 bool add( const OPimEvent& ev ); 65 bool add( const OPimEvent& ev );
66 bool remove( int uid ); 66 bool remove( int uid );
67 bool replace( const OPimEvent& ev ); 67 bool replace( const OPimEvent& ev );
68 68
69 QArray<UID> rawRepeats()const; 69 QArray<UID> rawRepeats()const;
70 QArray<UID> nonRepeats()const; 70 QArray<UID> nonRepeats()const;
71 71
72 OPimEvent::ValueList directNonRepeats()const; 72 OPimEvent::ValueList directNonRepeats()const;
73 OPimEvent::ValueList directRawRepeats()const; 73 OPimEvent::ValueList directRawRepeats()const;
74 74