-rw-r--r-- | kaddressbook/kabcore.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/kaimportoldialog.cpp | 46 | ||||
-rw-r--r-- | korganizer/koimportoldialog.cpp | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 8 |
4 files changed, 57 insertions, 8 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 980e436..1074a62 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -330,8 +330,10 @@ KABCore::~KABCore() KABC::StdAddressBook::close(); delete syncManager; +#ifndef DESKTOP_VERSION if ( infrared ) delete infrared; +#endif } void KABCore::receive( const QCString& cmsg, const QByteArray& data ) { @@ -367,17 +369,19 @@ void KABCore::toggleBeamReceive( ) void KABCore::disableBR(bool b) { +#ifndef DESKTOP_VERSION if ( b ) { if ( infrared ) { toggleBeamReceive( ); - mBRdisabled = true; } + mBRdisabled = true; } else { if ( mBRdisabled ) { mBRdisabled = false; - toggleBeamReceive( ); + //toggleBeamReceive( ); } } +#endif } void KABCore::recieve( QString fn ) diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp index 10e3c76..848d8af 100644 --- a/kaddressbook/kaimportoldialog.cpp +++ b/kaddressbook/kaimportoldialog.cpp @@ -29,6 +29,7 @@ #include <qwidgetstack.h> #include <qdatetime.h> #include <qdir.h> +#include <qregexp.h> #include <qapplication.h> #include <qhbox.h> #include <qheader.h> @@ -267,8 +268,9 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) //addressee.setGeo( const Geo &geo ); //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) ); - addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()) ); + addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") ); QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer()); + notesStr.replace( QRegExp("\\r"), ""); addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) ); //addressee.setRevision( const QDateTime &revision ); @@ -291,7 +293,7 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer()); if ( !tempS.isEmpty() ) addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS ); - tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()); + tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), ""); if ( !tempS.isEmpty() ) addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS ); tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer()); @@ -310,7 +312,7 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) //addressee.setPhoto( const Picture &photo ); //addressee.setSound( const Sound &sound ); //addressee.setAgent( const Agent &agent ); - QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()); + QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), ""); addressee.setCategories( QStringList::split( ";", cat )); QString phoneS; @@ -396,36 +398,43 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) KABC::Address* addressAdd = &addressHome; bool insert = false; phoneS = QString::fromUcs2( aItem->GetHomeAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetHomeAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetHomeAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetHomeAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetHomeAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetHomeAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetHomeAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { // redundant !addressAdd->setExtended(phoneS ); // insert = true; @@ -439,36 +448,43 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) addressAdd = &addressWork; insert = false; phoneS = QString::fromUcs2( aItem->GetBusinessAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetBusinessAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetBusinessAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetBusinessAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetBusinessAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetBusinessAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetBusinessAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { // redundant !addressAdd->setExtended(phoneS ); // insert = true; @@ -482,31 +498,37 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) addressAdd = &addressOther; insert = false; phoneS = QString::fromUcs2( aItem->GetOtherAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetOtherAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetOtherAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetOtherAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetOtherAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetOtherAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); insert = true; @@ -524,36 +546,43 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) addressAdd = &addressMail; insert = false; phoneS = QString::fromUcs2( aItem->GetMailingAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetMailingAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetMailingAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetMailingAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetMailingAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetMailingAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); insert = true; } phoneS = QString::fromUcs2( aItem->GetMailingAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { // redundant ! addressAdd->setExtended(phoneS ); // insert = true; @@ -591,6 +620,7 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) // ++++++++++++++++++++++ end of ALL addresses //GetUserProperties(); tempS = QString::fromUcs2(aItem->GetInternetFreeBusyAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( !tempS.isEmpty() ) addressee.insertCustom( "KADDRESSBOOK", "X-FreeBusyUrl", tempS ); tempS = QString::fromUcs2(aItem->GetChildren().GetBuffer()); @@ -611,41 +641,49 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) additionalInfo += tempAdd; } tempAdd = QString::fromUcs2(aItem->GetHobby().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nHobby: "); additionalInfo += tempAdd;; } tempAdd =QString::fromUcs2(aItem->GetPersonalHomePage().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nHomepage: "); additionalInfo += tempAdd;; } tempAdd = QString::fromUcs2(aItem->GetBillingInformation().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nBilling information: "); additionalInfo += tempAdd;; } tempAdd = QString::fromUcs2(aItem->GetCustomerID().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nCustomer ID: "); additionalInfo += tempAdd;; } tempAdd = QString::fromUcs2(aItem->GetUser1().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser1: "); additionalInfo += tempAdd;; } tempAdd = QString::fromUcs2(aItem->GetUser2().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser2: "); additionalInfo += tempAdd;; } tempAdd = QString::fromUcs2(aItem->GetUser3().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser3: "); additionalInfo += tempAdd;; } - tempAdd = QString::fromUcs2(aItem->GetUser4().GetBuffer()); + tempAdd = QString::fromUcs2(aItem->GetUser4().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser4: "); additionalInfo += tempAdd;; diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp index 0a3c2d5..c0bde0d 100644 --- a/korganizer/koimportoldialog.cpp +++ b/korganizer/koimportoldialog.cpp @@ -31,6 +31,7 @@ #include <qdir.h> #include <qapplication.h> #include <qhbox.h> +#include <qregexp.h> #include <qheader.h> #include <qdatetime.h> #include <qlistview.h> @@ -250,7 +251,7 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe } 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() ) { diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9e215b9..63484d6 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -288,25 +288,31 @@ 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() |