-rw-r--r-- | kabc/resource.cpp | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 16 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 15 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 5 |
8 files changed, 32 insertions, 17 deletions
diff --git a/kabc/resource.cpp b/kabc/resource.cpp index d39fd6a..7b91239 100644 --- a/kabc/resource.cpp +++ b/kabc/resource.cpp @@ -39,4 +39,4 @@ Resource::Resource( const KConfig *config, bool syncable ) if(syncable == true) { - mSyncProfile = new KSyncProfile( identifier() ); - mSyncProfile->setName(resourceName()); + mSyncProfile = new KSyncProfile( ); + mSyncProfile->setName("pending" /*resourceName()*/); mSyncProfile->readConfig( (KConfig *)config ); diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index f859b90..689618d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1175,2 +1175,6 @@ bool CalendarView::syncCalendar(QString filename, int mode) } +void CalendarView::syncPhone() +{ + qDebug("CalendarView::syncPhone() "); +} void CalendarView::syncSharp() diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index d564473..b2838db 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -427,2 +427,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void syncSharp( ); + void syncPhone( ); void slotSelectPickerDate( QDate ) ; diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 424fa98..446fe2e 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -212,2 +212,5 @@ class KOPrefs : public KPimPrefs QString mLocalTempFile; + QString mPhoneDevice; + QString mPhoneConnection; + QString mPhoneModel; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index c3c4c26..062c95f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -899,3 +899,9 @@ int MainWindow::ringSync() } else { - syncRemote( temp, false ); + if ( temp->getIsPhoneSync() ) { + KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ; + KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( ); + KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( ); + syncPhone(); + } else + syncRemote( temp, false ); @@ -2039,2 +2045,10 @@ void MainWindow::syncSharp() } +void MainWindow::syncPhone() +{ + if ( mCalendarModifiedFlag ) + save(); + mView->syncPhone(); + slotModifiedChanged( true ); + +} diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index fba8c52..1d87db0 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -77,2 +77,3 @@ class MainWindow : public QMainWindow void syncSharp(); + void syncPhone(); void syncLocalFile(); diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 15dc152..e7c35fb 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -32,9 +32,4 @@ -KSyncProfile::KSyncProfile( const char * identifier): QObject (0, identifier ) +KSyncProfile::KSyncProfile(): QObject () { - setIdentifier( identifier ); - - if (getIdentifier().isEmpty()) - setIdentifier( "noID" ); - setDefault(); @@ -70,3 +65,3 @@ KSyncProfile* KSyncProfile::clone() myClone->setName( "noName" ); - myClone->setIdentifier( "noID" ); + //myClone->setIdentifier( "noID" ); return myClone; @@ -106,3 +101,3 @@ void KSyncProfile::readConfig(KConfig *config ) - config->setGroup("SyncProfile_" + mIdentifier); + config->setGroup( mName ); @@ -142,3 +137,3 @@ void KSyncProfile::deleteConfig(KConfig *config ) { - config->deleteGroup( "SyncProfile_" + mIdentifier ); + config->deleteGroup( mName ); } @@ -147,3 +142,3 @@ void KSyncProfile::writeConfig( KConfig * config ) { - config->setGroup("SyncProfile_" + mIdentifier); + config->setGroup(mName); diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index 8995def..a0cfb71 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -48,3 +48,3 @@ class KSyncProfile : public QObject { public: - KSyncProfile( const char * identifier = 0); + KSyncProfile(); ~KSyncProfile() ; @@ -57,4 +57,2 @@ class KSyncProfile : public QObject { - void setIdentifier( const QString& i ) {mIdentifier = i;} - QString getIdentifier( ) { return mIdentifier;} void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;} @@ -114,3 +112,2 @@ class KSyncProfile : public QObject { QString mName; - QString mIdentifier; QString mPreSyncCommand; |