-rw-r--r-- | korganizer/koimportoldialog.cpp | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp index 0a3c2d5..c0bde0d 100644 --- a/korganizer/koimportoldialog.cpp +++ b/korganizer/koimportoldialog.cpp @@ -22,24 +22,25 @@ */ #include <qtooltip.h> #include <qframe.h> #include <qpixmap.h> #include <qlayout.h> #include <qprogressbar.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <qdir.h> #include <qapplication.h> #include <qhbox.h> +#include <qregexp.h> #include <qheader.h> #include <qdatetime.h> #include <qlistview.h> #include <kdebug.h> #include <klocale.h> #include <kstandarddirs.h> #include <kmessagebox.h> #include <kfiledialog.h> #include <libkdepim/categoryselectdialog.h> #include <libkdepim/kinputdialog.h> @@ -241,25 +242,25 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe KCal::Event* event = new KCal::Event(); if ( aItem->GetAllDayEvent() ){ event->setDtStart( QDateTime( mDdate2Qdtr( aItem->GetStart()).date(),QTime(0,0,0 ) )); event->setDtEnd( QDateTime( mDdate2Qdtr( aItem->GetEnd()) .date(),QTime(0,0,0 )).addDays(-1)); event->setFloats( true ); } else { event->setDtStart( mDdate2Qdtr( aItem->GetStart()) ); event->setDtEnd( mDdate2Qdtr( aItem->GetEnd()) ); event->setFloats( false ); } event->setSummary( QString::fromUcs2( aItem->GetSubject().GetBuffer()) ); event->setLocation( QString::fromUcs2( aItem->GetLocation().GetBuffer()) ); - event->setDescription( QString::fromUcs2( aItem->GetBody().GetBuffer()) ); + event->setDescription( QString::fromUcs2( aItem->GetBody().GetBuffer()).replace( QRegExp("\\r"), "") ); QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()); event->setCategories( QStringList::split( ";", cat )); if ( aItem->GetReminderSet() ) { event->clearAlarms(); Alarm* alarm = event->newAlarm(); alarm->setStartOffset( -aItem->GetReminderMinutesBeforeStart()*60 ); alarm->setEnabled( true ); if ( aItem->GetReminderPlaySound() ) { alarm->setType( Alarm::Audio ); alarm->setAudioFile( QString::fromUcs2( aItem->GetReminderSoundFile().GetBuffer())); } else diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9e215b9..63484d6 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -279,43 +279,49 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : infrared = 0; #endif mBRdisabled = false; toggleBeamReceive(); } MainWindow::~MainWindow() { //qDebug("MainWindow::~MainWindow() "); //save toolbar location delete mCalendar; delete mSyncManager; +#ifndef DESKTOP_VERSION if ( infrared ) delete infrared; +#endif } void MainWindow::disableBR(bool b) { +#ifndef DESKTOP_VERSION if ( b ) { if ( infrared ) { toggleBeamReceive(); mBRdisabled = true; } + mBRdisabled = true; } else { if ( mBRdisabled ) { mBRdisabled = false; - toggleBeamReceive(); + //makes no sense,because other cal ap is probably running + // toggleBeamReceive(); } } +#endif } bool MainWindow::beamReceiveEnabled() { #ifndef DESKTOP_VERSION return ( infrared != 0 ); #endif return false; } void MainWindow::toggleBeamReceive() { |