Diffstat (limited to 'kaddressbook/xxport/kde2_xxport.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/xxport/kde2_xxport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp index 03efc1b..72d3fc2 100644 --- a/kaddressbook/xxport/kde2_xxport.cpp +++ b/kaddressbook/xxport/kde2_xxport.cpp | |||
@@ -55,67 +55,67 @@ class KDE2XXPortFactory : public XXPortFactory | |||
55 | { | 55 | { |
56 | return new KDE2XXPort( ab, parent, name ); | 56 | return new KDE2XXPort( ab, parent, name ); |
57 | } | 57 | } |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #endif //KAB_EMBEDDED | 60 | #endif //KAB_EMBEDDED |
61 | 61 | ||
62 | 62 | ||
63 | extern "C" | 63 | extern "C" |
64 | { | 64 | { |
65 | #ifndef KAB_EMBEDDED | 65 | #ifndef KAB_EMBEDDED |
66 | void *init_libkaddrbk_kde2_xxport() | 66 | void *init_libkaddrbk_kde2_xxport() |
67 | #else //KAB_EMBEDDED | 67 | #else //KAB_EMBEDDED |
68 | void *init_microkaddrbk_kde2_xxport() | 68 | void *init_microkaddrbk_kde2_xxport() |
69 | #endif //KAB_EMBEDDED | 69 | #endif //KAB_EMBEDDED |
70 | { | 70 | { |
71 | return ( new KDE2XXPortFactory() ); | 71 | return ( new KDE2XXPortFactory() ); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
76 | KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 76 | KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
77 | : XXPortObject( ab, parent, name ) | 77 | : XXPortObject( ab, parent, name ) |
78 | { | 78 | { |
79 | createImportAction( i18n( "Import KDE 2 Addressbook..." ) ); | 79 | createImportAction( i18n( "Import KDE 2 Addressbook..." ) ); |
80 | } | 80 | } |
81 | 81 | ||
82 | KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const | 82 | KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const |
83 | { | 83 | { |
84 | QString fileName = locateLocal( "data", "kabc/std.vcf" ); | 84 | QString fileName = locateLocal( "data", "kabc/std.vcf" ); |
85 | if ( !QFile::exists( fileName ) ) { | 85 | if ( !QFile::exists( fileName ) ) { |
86 | KMessageBox::sorry( parentWidget(), i18n( "<qt>Couldn't find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); | 86 | KMessageBox::sorry( parentWidget(), i18n( "<qt>Couldn't find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); |
87 | return KABC::AddresseeList(); | 87 | return KABC::AddresseeList(); |
88 | } | 88 | } |
89 | 89 | ||
90 | #ifndef KAB_EMBEDDED | 90 | #ifndef KAB_EMBEDDED |
91 | int result = KMessageBox::questionYesNoCancel( parentWidget(), | 91 | int result = KMessageBox::questionYesNoCancel( parentWidget(), |
92 | i18n( "Override previously imported entries?" ), | 92 | i18n( "Override previously imported entries?" ), |
93 | i18n( "Import KDE 2 Addressbook" ) ); | 93 | i18n( "Import KDE 2 Addressbook" ) ); |
94 | #else //KAB_EMBEDDED | 94 | #else //KAB_EMBEDDED |
95 | int result = KMessageBox::warningYesNoCancel( parentWidget(), | 95 | int result = KMessageBox::warningYesNoCancel( parentWidget(), |
96 | i18n( "Override previously imported entries?" ), | 96 | i18n( "Override previously imported entries?" ), |
97 | i18n( "Import KDE 2 Addressbook" ) ); | 97 | i18n( "Import KDE 2 Addressbook" ) ); |
98 | #endif //KAB_EMBEDDED | 98 | #endif //KAB_EMBEDDED |
99 | 99 | ||
100 | if ( !result ) return KABC::AddresseeList(); | 100 | if ( !result ) return KABC::AddresseeList(); |
101 | 101 | ||
102 | KProcess proc; | 102 | KProcess proc; |
103 | 103 | ||
104 | if ( result == KMessageBox::Yes ) { | 104 | if ( result == KMessageBox::Yes ) { |
105 | proc << "kab2kabc"; | 105 | proc << "kab2kabc"; |
106 | proc << "--override"; | 106 | proc << "--override"; |
107 | } else if ( result == KMessageBox::No ) | 107 | } else if ( result == KMessageBox::No ) |
108 | proc << "kab2kabc"; | 108 | proc << "kab2kabc"; |
109 | else | 109 | else |
110 | kdDebug(5720) << "KAddressBook::importKDE2(): Unknow return value." << endl; | 110 | kdDebug(5720) << "KAddressBook::importKDE2(): Unknow return value." << endl; |
111 | 111 | ||
112 | proc.start( KProcess::Block ); | 112 | proc.start( KProcess::Block ); |
113 | 113 | ||
114 | addressBook()->load(); | 114 | addressBook()->load(); |
115 | 115 | ||
116 | return KABC::AddresseeList(); | 116 | return KABC::AddresseeList(); |
117 | } | 117 | } |
118 | 118 | ||
119 | #ifndef KAB_EMBEDDED | 119 | #ifndef KAB_EMBEDDED_ |
120 | #include "kde2_xxport.moc" | 120 | #include "moc_kde2_xxport.cpp" |
121 | #endif //KAB_EMBEDDED | 121 | #endif //KAB_EMBEDDED |