summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-06-29 21:43:21 (UTC)
committer zautrix <zautrix>2005-06-29 21:43:21 (UTC)
commit54dd512d3980381c2b02263462db03ae7c5a0264 (patch) (unidiff)
tree82a31315a85ad5e0a95ef37274fa96f7c4a88dfa /kaddressbook
parent7ccfe9b674bd5cc52eab708c2e7dfb02c3328deb (diff)
downloadkdepimpi-54dd512d3980381c2b02263462db03ae7c5a0264.zip
kdepimpi-54dd512d3980381c2b02263462db03ae7c5a0264.tar.gz
kdepimpi-54dd512d3980381c2b02263462db03ae7c5a0264.tar.bz2
fixxx
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaimportoldialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp
index 7bb8bd8..2f794d6 100644
--- a/kaddressbook/kaimportoldialog.cpp
+++ b/kaddressbook/kaimportoldialog.cpp
@@ -17,24 +17,25 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <qframe.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qprogressbar.h> 28#include <qprogressbar.h>
29#include <qprogressdialog.h>
29#include <qwidgetstack.h> 30#include <qwidgetstack.h>
30#include <qdatetime.h> 31#include <qdatetime.h>
31#include <qdir.h> 32#include <qdir.h>
32#include <qregexp.h> 33#include <qregexp.h>
33#include <qapplication.h> 34#include <qapplication.h>
34#include <qhbox.h> 35#include <qhbox.h>
35#include <qheader.h> 36#include <qheader.h>
36#include <qdatetime.h> 37#include <qdatetime.h>
37#include <qlistview.h> 38#include <qlistview.h>
38 39
39#include <kdebug.h> 40#include <kdebug.h>
40#include <klocale.h> 41#include <klocale.h>
@@ -209,31 +210,31 @@ void KAImportOLdialog::slotApply()
209void KAImportOLdialog::readContactData( DWORD folder ) 210void KAImportOLdialog::readContactData( DWORD folder )
210{ 211{
211 212
212 LPDISPATCH dispItem = (LPDISPATCH)folder; 213 LPDISPATCH dispItem = (LPDISPATCH)folder;
213 dispItem->AddRef(); 214 dispItem->AddRef();
214 MAPIFolder mf(dispItem); 215 MAPIFolder mf(dispItem);
215 mf.m_lpDispatch->AddRef(); 216 mf.m_lpDispatch->AddRef();
216 _Items folderItems; 217 _Items folderItems;
217 _variant_t indx((long)0); 218 _variant_t indx((long)0);
218 LPDISPATCH itm; 219 LPDISPATCH itm;
219 int i; 220 int i;
220 folderItems = mf.GetItems(); 221 folderItems = mf.GetItems();
221 QProgressBar bar( folderItems.GetCount(),0 ); 222 QProgressDialog bar( i18n("Importing contact data"),i18n("Abort"), folderItems.GetCount(),this);
222 bar.setCaption (i18n("Importing - close to abort!") ); 223 bar.setCaption (i18n("Importing!") );
223 int h = bar.sizeHint().height() ; 224 int h = bar.sizeHint().height() ;
224 int w = 300; 225 int w = 300;
225 int dw = QApplication::desktop()->width(); 226 int dw = QApplication::desktop()->width();
226 int dh = QApplication::desktop()->height(); 227 int dh = QApplication::desktop()->height();
227 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 228 //bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
228 bar.show(); 229 bar.show();
229 for(i=1; i <= folderItems.GetCount(); ++i) 230 for(i=1; i <= folderItems.GetCount(); ++i)
230 { 231 {
231 qApp->processEvents(); 232 qApp->processEvents();
232 if ( ! bar.isVisible() ) 233 if ( ! bar.isVisible() )
233 return ; 234 return ;
234 bar.setProgress( i ); 235 bar.setProgress( i );
235 indx = (long)i; 236 indx = (long)i;
236 itm = folderItems.Item(indx.Detach()); 237 itm = folderItems.Item(indx.Detach());
237 _ContactItem * pItem = (_ContactItem *)&itm; 238 _ContactItem * pItem = (_ContactItem *)&itm;
238 ol2kapiContact( pItem ); 239 ol2kapiContact( pItem );
239 itm->Release(); 240 itm->Release();