author | zautrix <zautrix> | 2004-10-17 20:33:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-17 20:33:08 (UTC) |
commit | 50470fdeb0ed62f05ff6780607cc30a8e84ef5b1 (patch) (unidiff) | |
tree | 87fbffa1db9d979dbe9c2e018cd2bdc5d833823f /libkdepim | |
parent | 4220d587eb43d4117e5d5a8a8f0cb6e8381b5fbe (diff) | |
download | kdepimpi-50470fdeb0ed62f05ff6780607cc30a8e84ef5b1.zip kdepimpi-50470fdeb0ed62f05ff6780607cc30a8e84ef5b1.tar.gz kdepimpi-50470fdeb0ed62f05ff6780607cc30a8e84ef5b1.tar.bz2 |
compile fixes
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 8851097..40d8e47 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -736,97 +736,101 @@ QString KSyncManager::getPassword( ) | |||
736 | lab.setEchoMode( QLineEdit::Password ); | 736 | lab.setEchoMode( QLineEdit::Password ); |
737 | QVBoxLayout lay( &dia ); | 737 | QVBoxLayout lay( &dia ); |
738 | lay.setMargin(7); | 738 | lay.setMargin(7); |
739 | lay.setSpacing(7); | 739 | lay.setSpacing(7); |
740 | lay.addWidget( &lab); | 740 | lay.addWidget( &lab); |
741 | dia.setFixedSize( 230,50 ); | 741 | dia.setFixedSize( 230,50 ); |
742 | dia.setCaption( i18n("Enter password") ); | 742 | dia.setCaption( i18n("Enter password") ); |
743 | QPushButton pb ( "OK", &dia); | 743 | QPushButton pb ( "OK", &dia); |
744 | lay.addWidget( &pb ); | 744 | lay.addWidget( &pb ); |
745 | connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); | 745 | connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); |
746 | dia.show(); | 746 | dia.show(); |
747 | int res = dia.exec(); | 747 | int res = dia.exec(); |
748 | if ( res ) | 748 | if ( res ) |
749 | retfile = lab.text(); | 749 | retfile = lab.text(); |
750 | dia.hide(); | 750 | dia.hide(); |
751 | qApp->processEvents(); | 751 | qApp->processEvents(); |
752 | return retfile; | 752 | return retfile; |
753 | 753 | ||
754 | } | 754 | } |
755 | 755 | ||
756 | 756 | ||
757 | void KSyncManager::confSync() | 757 | void KSyncManager::confSync() |
758 | { | 758 | { |
759 | static KSyncPrefsDialog* sp = 0; | 759 | static KSyncPrefsDialog* sp = 0; |
760 | if ( ! sp ) { | 760 | if ( ! sp ) { |
761 | sp = new KSyncPrefsDialog( mParent, "syncprefs", true ); | 761 | sp = new KSyncPrefsDialog( mParent, "syncprefs", true ); |
762 | } | 762 | } |
763 | sp->usrReadConfig(); | 763 | sp->usrReadConfig(); |
764 | #ifndef DESKTOP_VERSION | 764 | #ifndef DESKTOP_VERSION |
765 | sp->showMaximized(); | 765 | sp->showMaximized(); |
766 | #else | 766 | #else |
767 | sp->show(); | 767 | sp->show(); |
768 | #endif | 768 | #endif |
769 | sp->exec(); | 769 | sp->exec(); |
770 | mSyncProfileNames = sp->getSyncProfileNames(); | 770 | mSyncProfileNames = sp->getSyncProfileNames(); |
771 | mLocalMachineName = sp->getLocalMachineName (); | 771 | mLocalMachineName = sp->getLocalMachineName (); |
772 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); | 772 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); |
773 | } | 773 | } |
774 | void KSyncManager::syncKDE() | 774 | void KSyncManager::syncKDE() |
775 | { | 775 | { |
776 | emit save(); | 776 | emit save(); |
777 | switch(mTargetApp) | 777 | switch(mTargetApp) |
778 | { | 778 | { |
779 | case (KAPI): | 779 | case (KAPI): |
780 | 780 | ||
781 | break; | 781 | break; |
782 | case (KOPI): | 782 | case (KOPI): |
783 | { | 783 | { |
784 | QString command = qApp->applicationDirPath () + "/kdecaldump"; | 784 | #ifdef DESKTOP_VERSION |
785 | QString command = qApp->applicationDirPath () + "/kdecaldump"; | ||
786 | #else | ||
787 | QString command = "kdecaldump"; | ||
788 | #endif | ||
785 | if ( ! QFile::exists ( command ) ) | 789 | if ( ! QFile::exists ( command ) ) |
786 | command = "kdecaldump"; | 790 | command = "kdecaldump"; |
787 | QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; | 791 | QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; |
788 | system ( command.latin1()); | 792 | system ( command.latin1()); |
789 | if ( syncWithFile( fileName,true ) ) { | 793 | if ( syncWithFile( fileName,true ) ) { |
790 | if ( mWriteBackFile ) { | 794 | if ( mWriteBackFile ) { |
791 | command += " --read"; | 795 | command += " --read"; |
792 | system ( command.latin1()); | 796 | system ( command.latin1()); |
793 | } | 797 | } |
794 | } | 798 | } |
795 | 799 | ||
796 | } | 800 | } |
797 | break; | 801 | break; |
798 | case (PWMPI): | 802 | case (PWMPI): |
799 | 803 | ||
800 | break; | 804 | break; |
801 | default: | 805 | default: |
802 | qDebug("KSyncManager::slotSyncMenu: invalid apptype selected"); | 806 | qDebug("KSyncManager::slotSyncMenu: invalid apptype selected"); |
803 | break; | 807 | break; |
804 | 808 | ||
805 | } | 809 | } |
806 | } | 810 | } |
807 | 811 | ||
808 | void KSyncManager::syncSharp() | 812 | void KSyncManager::syncSharp() |
809 | { | 813 | { |
810 | 814 | ||
811 | if ( ! syncExternalApplication("sharp") ) | 815 | if ( ! syncExternalApplication("sharp") ) |
812 | qDebug("ERROR sync sharp "); | 816 | qDebug("ERROR sync sharp "); |
813 | } | 817 | } |
814 | 818 | ||
815 | bool KSyncManager::syncExternalApplication(QString resource) | 819 | bool KSyncManager::syncExternalApplication(QString resource) |
816 | { | 820 | { |
817 | 821 | ||
818 | emit save(); | 822 | emit save(); |
819 | 823 | ||
820 | if ( mAskForPreferences ) | 824 | if ( mAskForPreferences ) |
821 | edit_sync_options(); | 825 | edit_sync_options(); |
822 | 826 | ||
823 | qDebug("Sync extern %s", resource.latin1()); | 827 | qDebug("Sync extern %s", resource.latin1()); |
824 | 828 | ||
825 | bool syncOK = mImplementation->syncExternal(this, resource); | 829 | bool syncOK = mImplementation->syncExternal(this, resource); |
826 | 830 | ||
827 | return syncOK; | 831 | return syncOK; |
828 | 832 | ||
829 | } | 833 | } |
830 | 834 | ||
831 | void KSyncManager::syncPhone() | 835 | void KSyncManager::syncPhone() |
832 | { | 836 | { |