-rw-r--r-- | libkdepim/ksyncprofile.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 15dc152..e7c35fb 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -25,23 +25,18 @@ #include <kconfig.h> #include <kstandarddirs.h> #include <kglobal.h> #include <kdebug.h> #include "ksyncprofile.h" -KSyncProfile::KSyncProfile( const char * identifier): QObject (0, identifier ) +KSyncProfile::KSyncProfile(): QObject () { - setIdentifier( identifier ); - - if (getIdentifier().isEmpty()) - setIdentifier( "noID" ); - setDefault(); } KSyncProfile::~KSyncProfile() { } @@ -63,17 +58,17 @@ KSyncProfile* KSyncProfile::clone() myClone->setWriteBackFuture( mWriteBackFuture ); myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); myClone->setIncludeInRingSync( mIncludeInRingSync ); myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); myClone->setSyncPrefs( mSyncPrefs); myClone->setIsLocalFileSync( mIsLocalFileSync ); myClone->setIsPhoneSync( mIsPhoneSync ); myClone->setName( "noName" ); - myClone->setIdentifier( "noID" ); + //myClone->setIdentifier( "noID" ); return myClone; } void KSyncProfile::setDefault() { mPreSyncCommand = i18n("command for downloading remote file to local device"); mPostSyncCommand = i18n("command for uploading local temp file to remote device"); @@ -99,17 +94,17 @@ void KSyncProfile::setDefault() mPhoneConnection = "irda"; mPhoneModel = "6310i"; } void KSyncProfile::readConfig(KConfig *config ) { if (config) { - config->setGroup("SyncProfile_" + mIdentifier); + config->setGroup( mName ); mName = config->readEntry( "Name", mName ); mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); @@ -135,22 +130,22 @@ void KSyncProfile::readConfig(KConfig *config ) else { setDefault(); } } void KSyncProfile::deleteConfig(KConfig *config ) { - config->deleteGroup( "SyncProfile_" + mIdentifier ); + config->deleteGroup( mName ); } void KSyncProfile::writeConfig( KConfig * config ) { - config->setGroup("SyncProfile_" + mIdentifier); + config->setGroup(mName); config->writeEntry( "Name", mName ); config->writeEntry( "PreSyncCommand",mPreSyncCommand ); config->writeEntry( "PostSyncCommand", mPostSyncCommand ); config->writeEntry( "LocalTempFile", mLocalTempFile ); config->writeEntry( "RemoteFileName", mRemoteFileName ); config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); |