summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-14 07:24:50 (UTC)
committer zautrix <zautrix>2004-10-14 07:24:50 (UTC)
commit57bd80b04dddd40a897dce8b6902d1046d71c631 (patch) (unidiff)
treec51cb1985344173951109f4bffb12bb6a68ea7f7 /kaddressbook
parenta6dff815a9c6d3a91094573d23c28a8553fc7cc2 (diff)
downloadkdepimpi-57bd80b04dddd40a897dce8b6902d1046d71c631.zip
kdepimpi-57bd80b04dddd40a897dce8b6902d1046d71c631.tar.gz
kdepimpi-57bd80b04dddd40a897dce8b6902d1046d71c631.tar.bz2
phone fixes
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp41
-rw-r--r--kaddressbook/kabcore.h2
2 files changed, 19 insertions, 24 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index dae9cd2..087e9e3 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -695,12 +695,21 @@ void KABCore::export2phone()
695 695
696 QString fileName = getPhoneFile();
697 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
698 return;
699
700 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
701
702}
703QString KABCore::getPhoneFile()
704{
696#ifdef _WIN32_ 705#ifdef _WIN32_
697 QString fileName = locateLocal("tmp", "phonefile.vcf"); 706 return locateLocal("tmp", "phonefile.vcf");
698#else 707#else
699 QString fileName = "/tmp/phonefile.vcf"; 708 return "/tmp/phonefile.vcf";
700#endif 709#endif
701 710
702 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 711}
703 return; 712void KABCore::writeToPhone( )
704 713{
705 if ( PhoneAccess::writeToPhone( fileName ) ) 714 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
706 qDebug("Export okay "); 715 qDebug("Export okay ");
@@ -708,14 +717,2 @@ void KABCore::export2phone()
708 qDebug("Error export contacts "); 717 qDebug("Error export contacts ");
709
710
711#if 0
712
713 setCaption( i18n("Writing to phone..."));
714 if ( PhoneFormat::writeToPhone( cal ) )
715 setCaption( i18n("Export to phone successful!"));
716 else
717 setCaption( i18n("Error exporting to phone!"));
718#endif
719
720
721} 718}
@@ -836,2 +833,3 @@ void KABCore::beamDone( Ir *ir )
836 topLevelWidget()->raise(); 833 topLevelWidget()->raise();
834 message( i18n("Beaming successful!") );
837} 835}
@@ -2820,8 +2818,3 @@ bool KABCore::syncPhone()
2820 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2818 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2821 QString fileName; 2819 QString fileName = getPhoneFile();
2822#ifdef _WIN32_
2823 fileName = locateLocal("tmp", "phonefile.vcf");
2824#else
2825 fileName = "/tmp/phonefile.vcf";
2826#endif
2827 if ( !PhoneAccess::readFromPhone( fileName) ) { 2820 if ( !PhoneAccess::readFromPhone( fileName) ) {
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 3c33923..5871d39 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -150,2 +150,3 @@ class KABCore : public QWidget, public KSyncInterface
150 void synchowto() ; 150 void synchowto() ;
151 void writeToPhone();
151 152
@@ -373,2 +374,3 @@ class KABCore : public QWidget, public KSyncInterface
373 void initActions(); 374 void initActions();
375 QString getPhoneFile();
374 376