summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koimportoldialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index c0bde0d..cc13395 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -60,35 +60,35 @@
_Application gOlApp;
QDateTime mDdate2Qdtr( DATE dt)
{
COleDateTime odt;
SYSTEMTIME st;
odt = dt;
odt.GetAsSystemTime(st);
QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) );
return qdt;
}
class OLEListViewItem : public QCheckListItem
{
public:
OLEListViewItem( QListView *parent, QString text ) :
- QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; };
+ QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; };
OLEListViewItem( QListViewItem *after, QString text ) :
- QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; };
+ QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
DWORD data() { return mData ;};
private:
DWORD mData;
};
KOImportOLdialog::KOImportOLdialog( const QString &caption,
Calendar *calendar, QWidget *parent ) :
KDialogBase( Plain, caption, User1 | Close, Ok,
parent, caption, true, false, i18n("Import!") )
{
QHBox * mw = new QHBox( this );
setMainWidget( mw );
mListView = new QListView( mw );
mListView->addColumn(i18n("Select Folder to import"));
@@ -179,33 +179,33 @@ void KOImportOLdialog::addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent
break;
default:
ts = i18n("Unknown");
}
hChild->setText( 1,ts);
hChild->setData( (DWORD) mfChild.m_lpDispatch );
mfChild.m_lpDispatch->AddRef();
addFolder(hChild, mfChild.m_lpDispatch);
}
}
void KOImportOLdialog::slotApply()
{
importedItems = 0;
OLEListViewItem* child = (OLEListViewItem*) mListView->firstChild();
while ( child ) {
- if ( child->isOn() )
+ if ( child->isOn()&& child->data() )
readCalendarData( child->data() );
child = (OLEListViewItem*) child->itemBelow();
}
QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems);
KMessageBox::information(this,mes);
}
void KOImportOLdialog::readCalendarData( DWORD folder )
{
LPDISPATCH dispItem = (LPDISPATCH)folder;
dispItem->AddRef();
MAPIFolder mf(dispItem);
mf.m_lpDispatch->AddRef();
_Items folderItems;
_variant_t indx((long)0);
LPDISPATCH itm;