summaryrefslogtreecommitdiffstats
path: root/tdeabc/plugins/sql
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-05-29 02:24:21 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-05-29 02:24:21 +0200
commit51efac909d7b116c8b0ca58fcd4e74ff58f31091 (patch)
treed817aab5133718fff032df3f1e517713a6fcfe4a /tdeabc/plugins/sql
parent5fac044f8da14563a3afca64bd05facd6811df91 (diff)
downloadtdelibs-51efac909d7b116c8b0ca58fcd4e74ff58f31091.tar.gz
tdelibs-51efac909d7b116c8b0ca58fcd4e74ff58f31091.zip
cmake: Add tdeabc tests
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdeabc/plugins/sql')
-rw-r--r--tdeabc/plugins/sql/resourcesql.cpp5
-rw-r--r--tdeabc/plugins/sql/resourcesql.h15
2 files changed, 13 insertions, 7 deletions
diff --git a/tdeabc/plugins/sql/resourcesql.cpp b/tdeabc/plugins/sql/resourcesql.cpp
index 9635dd77b..b72afea15 100644
--- a/tdeabc/plugins/sql/resourcesql.cpp
+++ b/tdeabc/plugins/sql/resourcesql.cpp
@@ -78,6 +78,11 @@ Ticket *ResourceSql::requestSaveTicket()
return createTicket( this );
}
+void ResourceSql::releaseSaveTicket( Ticket *ticket )
+{
+ delete ticket;
+}
+
bool ResourceSql::open()
{
TQStringList drivers = TQSqlDatabase::drivers();
diff --git a/tdeabc/plugins/sql/resourcesql.h b/tdeabc/plugins/sql/resourcesql.h
index 7ce26956c..a1c085c83 100644
--- a/tdeabc/plugins/sql/resourcesql.h
+++ b/tdeabc/plugins/sql/resourcesql.h
@@ -30,22 +30,23 @@ class TQSqlDatabase;
namespace TDEABC {
-class ResourceSql : public Resource
+class KABC_EXPORT ResourceSql : public Resource
{
public:
ResourceSql( AddressBook *ab, const TQString &user, const TQString &password,
const TQString &db, const TQString &host );
ResourceSql( AddressBook *ab, const TDEConfig * );
- bool open();
- void close();
+ virtual bool open();
+ virtual void close();
- Ticket *requestSaveTicket();
+ virtual Ticket *requestSaveTicket();
+ virtual void releaseSaveTicket( Ticket* );
- bool load();
- bool save( Ticket * ticket );
+ virtual bool load();
+ virtual bool save( Ticket * ticket );
- TQString identifier() const;
+ virtual TQString identifier() const;
private:
void init(const TQString &user, const TQString &password,