summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp31
-rw-r--r--kaddressbook/kabcore.h7
2 files changed, 14 insertions, 24 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d9eb391..83fede4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1685,2 +1685,6 @@ void KABCore::initGUI()
+ connect(syncManager , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
+ syncManager->setDefaultFileName(locateLocal( "apps","kabc/std.vcf") );
+ //connect(syncManager , SIGNAL( ), this, SLOT( ) );
@@ -2839,3 +2843,2 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice );
- qDebug("KABCore::syncExternal: why do we acces here KABPrefs and not somehow KSyncProfile? ");
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
@@ -2855,19 +2858,12 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
-//called by the syncmanager to indicate that the work has to marked as dirty.
-void KABCore::sync_setModified()
+void KABCore::getFile( bool success )
{
- setModified();
-}
-
-//called by the syncmanager to ask if the dirty flag is set.
-bool KABCore::sync_isModified()
-{
- return mModified;
-}
-
-
-//called by the syncmanager to indicate that the work has to be saved.
-void KABCore::sync_save()
-{
- save();
+ if ( ! success ) {
+ setCaption( i18n("Error receiving file. Nothing changed!") );
+ return;
+ }
+ //mView->watchSavedFile();
+ //mView->openCalendar( defaultFileName() );
+ // pending: reload received file!
+ setCaption( i18n("Pi-Sync successful!") );
}
@@ -2875,2 +2871 @@ void KABCore::sync_save()
-
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c9c0d38..355e828 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -344,2 +344,3 @@ class KABCore : public QWidget, public KSyncInterface
public slots:
+ void getFile( bool success );
void setDetailsVisible( bool visible );
@@ -463,8 +464,2 @@ class KABCore : public QWidget, public KSyncInterface
- //called by the syncmanager to indicate that the work has to marked as dirty.
- virtual void sync_setModified();
- //called by the syncmanager to ask if the dirty flag is set.
- virtual bool sync_isModified();
- //called by the syncmanager to indicate that the work has to be saved.
- virtual void sync_save();