summaryrefslogtreecommitdiffstats
path: root/tdeabc/tests/testdb.cpp
blob: f7ec1d17cc16079925a663a3b596b1ab8a3e8114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <tdeaboutdata.h>
#include <tdeapplication.h>
#include <kdebug.h>
#include <tdelocale.h>
#include <tdecmdlineargs.h>

#include "addressbook.h"
#include "vcardformat.h"
#include "resourcesql.h"

using namespace KABC;

int main(int argc,char **argv)
{
  TDEAboutData aboutData("testdb","TestKabcDB","0.1");
  TDECmdLineArgs::init(argc,argv,&aboutData);

//  TDEApplication app( false, false );
  TDEApplication app;

  AddressBook ab;
  
  ResourceSql r( &ab, "root", "kde4ever", "localhost" );
  if ( ! r.open() ) {
    kdDebug() << "Failed to open resource." << endl;
  }
  
  r.load( &ab );
  
  r.close();
  
  ab.dump();
}