summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/opie
Side-by-side diff
Diffstat (limited to 'kabc/plugins/opie') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp11
-rw-r--r--kabc/plugins/opie/resourceopie.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index 22237dc..f610b38 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -29,79 +29,78 @@ $Id$
#include <sys/stat.h>
#include <unistd.h>
#include <qdir.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qregexp.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
//US #include <ksavefile.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
//US #include "formatfactory.h"
//US #include <qpe/qpeapplication.h>
#include <opie/ocontactaccess.h>
#include <opie/ocontactaccessbackend_xml.h>
#include "resourceopieconfig.h"
#include "stdaddressbook.h"
-#include "syncprefwidget.h"
#include "opieconverter.h"
#include "resourceopie.h"
using namespace KABC;
extern "C"
{
void *init_microkabc_opie()
{
- return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>();
}
}
-ResourceOpie::ResourceOpie( const KConfig *config, bool syncable )
- : Resource( config, syncable ), mAccess(0), mConverter (0)
+ResourceOpie::ResourceOpie( const KConfig *config )
+ : Resource( config ), mAccess(0), mConverter (0)
{
QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
KConfig *cfg = (KConfig *)config;
if ( cfg ) {
fileName = cfg->readEntry( "FileName", fileName );
}
init( fileName );
}
-ResourceOpie::ResourceOpie( const QString &fileName, bool syncable )
- : Resource( 0, syncable )
+ResourceOpie::ResourceOpie( const QString &fileName )
+ : Resource( 0 )
{
init( fileName );
}
void ResourceOpie::init( const QString &fileName )
{
qDebug("ResourceOpie::init()");
connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) );
connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
setFileName( fileName );
}
ResourceOpie::~ResourceOpie()
{
if (mConverter != 0)
delete mConverter;
if(mAccess != 0)
delete mAccess;
}
diff --git a/kabc/plugins/opie/resourceopie.h b/kabc/plugins/opie/resourceopie.h
index d5b4ebd..9d05c70 100644
--- a/kabc/plugins/opie/resourceopie.h
+++ b/kabc/plugins/opie/resourceopie.h
@@ -36,54 +36,54 @@ $Id$
#include "resource.h"
class OContactAccess;
namespace KABC {
class ResourceConfigWidget;
class OpieConverter;
/**
@internal
*/
class ResourceOpie : public Resource
{
Q_OBJECT
public:
/**
Constructor.
@param cfg The config object where custom resource settings are stored.
*/
- ResourceOpie( const KConfig *cfg, bool syncable );
+ ResourceOpie( const KConfig *cfg );
/**
Construct file resource on file @arg fileName using format @arg formatName.
*/
- ResourceOpie( const QString &fileName, bool syncable );
+ ResourceOpie( const QString &fileName );
/**
* Destructor.
*/
~ResourceOpie();
/**
Writes the config back.
*/
virtual void writeConfig( KConfig *cfg );
/**
* Tries to open the file and checks for the proper format.
* This method should be called before @ref load().
*/
virtual bool doOpen();
/**
* Closes the file again.
*/
virtual void doClose();
/**
* Requests a save ticket, that is used by @ref save()