You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdelibs/kabc/tests/testdb.cpp

34 lines
621 B

#include <kaboutdata.h>
#include <kapplication.h>
#include <kdebug.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include "addressbook.h"
#include "vcardformat.h"
#include "resourcesql.h"
using namespace KABC;
int main(int argc,char **argv)
{
KAboutData aboutData("testdb","TestKabcDB","0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
// KApplication app( false, false );
KApplication app;
AddressBook ab;
ResourceSql r( &ab, "root", "kde4ever", "kabc", "localhost" );
if ( ! r.open() ) {
kdDebug() << "Failed to open resource." << endl;
}
r.load();
r.close();
ab.dump();
}