author | zautrix <zautrix> | 2004-10-20 12:05:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-20 12:05:18 (UTC) |
commit | 5cf3c1bce58a6487af166e637e54571e98156fd0 (patch) (side-by-side diff) | |
tree | 2e1ba14350aa322bb21729cf462b96e658fa6929 | |
parent | e2a0df411042d986adb31b28f9e0a2f17395358c (diff) | |
download | kdepimpi-5cf3c1bce58a6487af166e637e54571e98156fd0.zip kdepimpi-5cf3c1bce58a6487af166e637e54571e98156fd0.tar.gz kdepimpi-5cf3c1bce58a6487af166e637e54571e98156fd0.tar.bz2 |
OL import fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/kaimportoldialog.cpp | 44 | ||||
-rw-r--r-- | korganizer/koimportoldialog.cpp | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 8 |
4 files changed, 56 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 980e436..1074a62 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -331,6 +331,8 @@ KABCore::~KABCore() delete syncManager; +#ifndef DESKTOP_VERSION if ( infrared ) delete infrared; +#endif } void KABCore::receive( const QCString& cmsg, const QByteArray& data ) @@ -368,15 +370,17 @@ 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 } diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp index 10e3c76..848d8af 100644 --- a/kaddressbook/kaimportoldialog.cpp +++ b/kaddressbook/kaimportoldialog.cpp @@ -30,4 +30,5 @@ #include <qdatetime.h> #include <qdir.h> +#include <qregexp.h> #include <qapplication.h> #include <qhbox.h> @@ -268,6 +269,7 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) //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()) ); @@ -292,5 +294,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) 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 ); @@ -311,5 +313,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) //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 )); @@ -397,4 +399,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) bool insert = false; phoneS = QString::fromUcs2( aItem->GetHomeAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); @@ -402,4 +405,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetHomeAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); @@ -407,4 +411,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetHomeAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); @@ -412,4 +417,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetHomeAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); @@ -417,4 +423,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetHomeAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); @@ -422,4 +429,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetHomeAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); @@ -427,4 +435,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetHomeAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { // redundant !addressAdd->setExtended(phoneS ); @@ -440,4 +449,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) insert = false; phoneS = QString::fromUcs2( aItem->GetBusinessAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); @@ -445,4 +455,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetBusinessAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); @@ -450,4 +461,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetBusinessAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); @@ -455,4 +467,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetBusinessAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); @@ -460,4 +473,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetBusinessAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); @@ -465,4 +479,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetBusinessAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); @@ -470,4 +485,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetBusinessAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { // redundant !addressAdd->setExtended(phoneS ); @@ -483,4 +499,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) insert = false; phoneS = QString::fromUcs2( aItem->GetOtherAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); @@ -488,4 +505,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetOtherAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); @@ -493,4 +511,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetOtherAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); @@ -498,4 +517,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetOtherAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); @@ -503,4 +523,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetOtherAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); @@ -508,4 +529,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetOtherAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); @@ -525,4 +547,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) insert = false; phoneS = QString::fromUcs2( aItem->GetMailingAddressCountry().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setCountry(phoneS ); @@ -530,4 +553,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetMailingAddressState().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setRegion(phoneS ); @@ -535,4 +559,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetMailingAddressCity().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setLocality(phoneS ); @@ -540,4 +565,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetMailingAddressPostalCode().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostalCode(phoneS ); @@ -545,4 +571,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetMailingAddressPostOfficeBox().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setPostOfficeBox(phoneS ); @@ -550,4 +577,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetMailingAddressStreet().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { addressAdd->setStreet(phoneS ); @@ -555,4 +583,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } phoneS = QString::fromUcs2( aItem->GetMailingAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! phoneS.isEmpty()) { // redundant ! addressAdd->setExtended(phoneS ); @@ -592,4 +621,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) //GetUserProperties(); tempS = QString::fromUcs2(aItem->GetInternetFreeBusyAddress().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( !tempS.isEmpty() ) addressee.insertCustom( "KADDRESSBOOK", "X-FreeBusyUrl", tempS ); @@ -612,4 +642,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetHobby().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nHobby: "); @@ -617,4 +648,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd =QString::fromUcs2(aItem->GetPersonalHomePage().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nHomepage: "); @@ -622,4 +654,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetBillingInformation().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nBilling information: "); @@ -627,4 +660,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetCustomerID().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nCustomer ID: "); @@ -632,4 +666,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetUser1().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser1: "); @@ -637,4 +672,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetUser2().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser2: "); @@ -642,4 +678,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetUser3().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser3: "); @@ -647,4 +684,5 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) } tempAdd = QString::fromUcs2(aItem->GetUser4().GetBuffer()); + phoneS.replace( QRegExp("\\r"), ""); if ( ! tempAdd.isEmpty() ) { additionalInfo += i18n("\nUser4: "); diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp index 0a3c2d5..c0bde0d 100644 --- a/korganizer/koimportoldialog.cpp +++ b/korganizer/koimportoldialog.cpp @@ -32,4 +32,5 @@ #include <qapplication.h> #include <qhbox.h> +#include <qregexp.h> #include <qheader.h> #include <qdatetime.h> @@ -251,5 +252,5 @@ 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 )); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9e215b9..63484d6 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -289,6 +289,8 @@ MainWindow::~MainWindow() delete mCalendar; delete mSyncManager; +#ifndef DESKTOP_VERSION if ( infrared ) delete infrared; +#endif @@ -297,4 +299,5 @@ MainWindow::~MainWindow() void MainWindow::disableBR(bool b) { +#ifndef DESKTOP_VERSION if ( b ) { if ( infrared ) { @@ -302,10 +305,13 @@ void MainWindow::disableBR(bool b) mBRdisabled = true; } + mBRdisabled = true; } else { if ( mBRdisabled ) { mBRdisabled = false; - toggleBeamReceive(); + //makes no sense,because other cal ap is probably running + // toggleBeamReceive(); } } +#endif } |