author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/xxport | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kaddressbook/xxport/csv_xxport.cpp | 14 | ||||
-rw-r--r-- | kaddressbook/xxport/csvimportdialog.cpp | 66 | ||||
-rw-r--r-- | kaddressbook/xxport/csvimportdialog.h | 12 | ||||
-rw-r--r-- | kaddressbook/xxport/kde2_xxport.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/xxport/vcard_xxport.cpp | 20 |
5 files changed, 60 insertions, 56 deletions
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index 7281003..ed5807f 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -25,17 +25,17 @@ Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <qfile.h> #include <qregexp.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <kfiledialog.h> #ifndef KAB_EMBEDDED #include <kio/netaccess.h> #endif //KAB_EMBEDDED #include <klocale.h> @@ -99,17 +99,17 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& } doExport( tmpFile.file(), list ); tmpFile.close(); return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); } else { QFile file( url.path() ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); return false; } doExport( &file, list ); file.close(); @@ -119,17 +119,17 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& #else //KAB_EMBEDDED QString fileName = KFileDialog::getSaveFileName( "addressbook.csv", i18n("Save file"), parentWidget() ); if ( fileName.isEmpty() ) return false; QFile file( fileName ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( fileName ) ); return false; } doExport( &file, list ); file.close(); @@ -146,17 +146,17 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const if ( dlg.exec() ) return dlg.contacts(); else return KABC::AddresseeList(); } void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) { - QTextStream t( fp ); + Q3TextStream t( fp ); t.setCodec( QTextCodec::codecForName("utf8") ); KABC::AddresseeList::ConstIterator iter; KABC::Field::List fields = addressBook()->fields(); KABC::Field::List::Iterator fieldIter; bool first = true; // First output the column headings @@ -182,13 +182,11 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) t << "\"" << (*fieldIter)->value( addr ) << "\""; first = false; } t << "\n"; } } -#ifndef KAB_EMBEDDED -#include "csv_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_csv_xxport.cpp" #endif //KAB_EMBEDDED - - diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index 862241e..7959cac 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -22,46 +22,50 @@ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> #include <qcombobox.h> #ifdef DESKTOP_VERSION #include <qinputdialog.h> #else #include <qtcompat/qinputdialog.h> #endif #include <qlabel.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qradiobutton.h> -#include <qtable.h> +#include <q3table.h> #include <qlayout.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3ValueList> +#include <Q3GridLayout> #include <kapplication.h> #include <kdebug.h> #include <kdialogbase.h> #include <kfiledialog.h> #include <klineedit.h> #include <klocale.h> #include <kglobal.h> #include <kmessagebox.h> #include <kstandarddirs.h> #include <kurlrequester.h> #ifdef DESKTOP_VERSION -#include "qtable.h" +#include "q3table.h" #else #include "qcombotableitem.h" #endif #include "csvimportdialog.h" CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, const char * name ) : KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 | @@ -156,17 +160,17 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, connect( this, SIGNAL( user1Clicked() ), this, SLOT( applyTemplate() ) ); connect( this, SIGNAL( user2Clicked() ), this, SLOT( saveTemplate() ) ); // if ( QApplication::desktop()->width() < 321 ) - QIconSet icon = SmallIcon("filesave"); + QIcon icon = SmallIcon("filesave"); findButton( User2 )->setIconSet (icon ) ; icon = SmallIcon("fileopen"); findButton( User1 )->setIconSet (icon ) ; int wid = findButton( User2 )->sizeHint().height(); findButton( User2 )->setMaximumWidth( wid+4 ); findButton( User1 )->setMaximumWidth( wid+4 ); } @@ -181,17 +185,17 @@ KABC::AddresseeList CSVImportDialog::contacts() const for ( int row = 1; row < mTable->numRows(); ++row ) { KABC::Addressee a; bool emptyRow = true; KABC::Address addrHome( KABC::Address::Home ); KABC::Address addrWork( KABC::Address::Work ); for ( int col = 0; col < mTable->numCols(); ++col ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) ); if ( !item ) { qDebug( "ERROR: item cast failed" ); continue; } QString value = mTable->text( row, col ); if ( !value.isEmpty() ) @@ -224,17 +228,17 @@ KABC::AddresseeList CSVImportDialog::contacts() const a.setNickName( value ); break; case Birthday: //US //the generated code had the following format: a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); // But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? { QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate - a.setBirthday(dt); + a.setBirthday(QDateTime(dt)); } break; case Email: if ( !value.isEmpty() ) a.insertEmail( value, true ); break; case Role: a.setRole( value ); @@ -377,36 +381,36 @@ KABC::AddresseeList CSVImportDialog::contacts() const return contacts; } void CSVImportDialog::initGUI() { QWidget* page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(), + Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHintSmall(), spacingHintSmall() ); - QHBoxLayout *hbox = new QHBoxLayout(); + Q3HBoxLayout *hbox = new Q3HBoxLayout(); hbox->setSpacing( spacingHint() ); QLabel *label = new QLabel( i18n( "File to import:" ), page ); hbox->addWidget( label ); mUrlRequester = new KURLRequester( page ); mUrlRequester->setFilter( "*.csv" ); hbox->addWidget( mUrlRequester ); layout->addMultiCellLayout( hbox, 0, 0, 0, 2 ); // Delimiter: comma, semicolon, tab, space, other - mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), page ); + mDelimiterBox = new Q3ButtonGroup( i18n( "Delimiter" ), page ); mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); mDelimiterBox->layout()->setSpacing( spacingHint() ); mDelimiterBox->layout()->setMargin( marginHint() ); - QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); + Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() ); delimiterLayout->setAlignment( Qt::AlignTop ); layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 ); mRadioComma = new QRadioButton( i18n( "Comma" ), mDelimiterBox ); mRadioComma->setChecked( true ); delimiterLayout->addWidget( mRadioComma, 0, 0 ); mRadioSemicolon = new QRadioButton( i18n( "Semicolon" ), mDelimiterBox ); @@ -445,18 +449,18 @@ void CSVImportDialog::initGUI() layout->addWidget( label, 2, 0 ); label = new QLabel( i18n( "Codec:" ), page ); layout->addWidget( label, 2, 2 ); mIgnoreDuplicates = new QCheckBox( page ); mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 ); - mTable = new QTable( 0, 0, page ); - mTable->setSelectionMode( QTable::NoSelection ); + mTable = new Q3Table( 0, 0, page ); + mTable->setSelectionMode( Q3Table::NoSelection ); //mTable->horizontalHeader()->hide(); layout->addMultiCellWidget( mTable, 5, 5, 0, 2 ); /*US setButtonText( User1, i18n( "Apply Template" ) ); setButtonText( User2, i18n( "Save Template" ) ); */ enableButtonOK( false ); @@ -478,21 +482,21 @@ void CSVImportDialog::fillTable() bool ignoreDups = mIgnoreDuplicates->isChecked(); enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD, S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START; QChar x; QString field = ""; // store previous assignment - QValueList<int> mTypeOld = mTypeStore; + Q3ValueList<int> mTypeOld = mTypeStore; mTypeStore.clear(); for ( column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, column ) ); + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); if ( !item || mClearTypeStore ) mTypeStore.append( typeToPos( Undefined ) ); else if ( item ) mTypeStore.append( item->currentItem() ); } clearTable(); @@ -501,37 +505,37 @@ void CSVImportDialog::fillTable() if ( mComboCodec->currentItem () == 0 ) { mData = QString::fromUtf8( mFileArray.data() ); } else if ( mComboCodec->currentItem () == 1 ) { mData = QString::fromLatin1( mFileArray.data() ); } else { mData = QString::fromLocal8Bit( mFileArray.data() ); } - QTextStream inputStream( mData, IO_ReadOnly ); + Q3TextStream inputStream( mData, QIODevice::ReadOnly ); if ( mComboCodec->currentItem () == 0 ) { - inputStream.setEncoding( QTextStream::UnicodeUTF8 ); + inputStream.setEncoding( Q3TextStream::UnicodeUTF8 ); } else if ( mComboCodec->currentItem () == 1 ) { - inputStream.setEncoding( QTextStream::Latin1 ); + inputStream.setEncoding( Q3TextStream::Latin1 ); } else { - inputStream.setEncoding( QTextStream::Locale ); + inputStream.setEncoding( Q3TextStream::Locale ); } int maxColumn = 0; while ( !inputStream.atEnd() ) { inputStream >> x; // read one char if ( x == '\r' ) inputStream >> x; // eat '\r', to handle DOS/LOSEDOWS files correctly switch ( state ) { case S_START : if ( x == mTextQuote ) { state = S_QUOTED_FIELD; - } else if ( x == mDelimiter ) { + } else if ( QString(x) == mDelimiter ) { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) ++column; lastCharDelimiter = true; } else if ( x == '\n' ) { ++row; column = 1; } else { field += x; @@ -556,34 +560,34 @@ void CSVImportDialog::fillTable() } else { field += x; } break; case S_MAYBE_END_OF_QUOTED_FIELD : if ( x == mTextQuote ) { field += x; state = S_QUOTED_FIELD; - } else if ( x == mDelimiter || x == '\n' ) { + } else if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); field = ""; if ( x == '\n' ) { ++row; column = 1; } else { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) ++column; lastCharDelimiter = true; } state = S_START; } else { state = S_END_OF_QUOTED_FIELD; } break; case S_END_OF_QUOTED_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); field = ""; if ( x == '\n' ) { ++row; column = 1; } else { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) ++column; @@ -596,33 +600,33 @@ void CSVImportDialog::fillTable() break; case S_MAYBE_NORMAL_FIELD : if ( x == mTextQuote ) { field = ""; state = S_QUOTED_FIELD; break; } case S_NORMAL_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); field = ""; if ( x == '\n' ) { ++row; column = 1; } else { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) ++column; lastCharDelimiter = true; } state = S_START; } else { field += x; } } - if ( x != mDelimiter ) + if ( QString(x) != mDelimiter ) lastCharDelimiter = false; if ( column > maxColumn ) maxColumn = column; } // file with only one line without '\n' if ( field.length() > 0 ) { @@ -644,17 +648,17 @@ void CSVImportDialog::fillTable() QMap<QString, uint>::ConstIterator it; for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it) keys[( it.data() )] = it.key(); //US end for ( column = 0; column < mTable->numCols(); ++column ) { //US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); - QComboTableItem *item = new QComboTableItem( mTable, keys ); + Q3ComboTableItem *item = new Q3ComboTableItem( mTable, keys ); mTable->setItem( 0, column, item ); if ( column < mTypeStore.count() ) item->setCurrentItem( mTypeStore[ column ] ); else item->setCurrentItem( typeToPos( Undefined ) ); mTable->adjustColumn( column ); } @@ -759,17 +763,17 @@ void CSVImportDialog::lineSelected( const QString& line ) fillTable(); } void CSVImportDialog::slotOk() { bool assigned = false; for ( int column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); if ( item && posToType( item->currentItem() ) != Undefined ) assigned = true; } if ( assigned ) KDialogBase::slotOk(); else @@ -831,17 +835,17 @@ void CSVImportDialog::applyTemplate() for ( uint i = 0; i < numColumns; ++i ) { int col = config.readNumEntry( QString::number( i ) ); columnMap.insert( i, col ); } // apply the column map for ( uint column = 0; column < columnMap.count(); ++column ) { int type = columnMap[ column ]; - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); if ( item ) item->setCurrentItem( typeToPos( type ) ); } } void CSVImportDialog::saveTemplate() { @@ -873,17 +877,17 @@ void CSVImportDialog::saveTemplate() config.writeEntry( "QuoteType", mComboQuote->currentItem() ); config.setGroup( "Misc" ); config.writeEntry( "Name", name ); config.setGroup( "csv column map" ); for ( uint column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); if ( item ) config.writeEntry( QString::number( column ), posToType( item->currentItem() ) ); else config.writeEntry( QString::number( column ), 0 ); } @@ -929,17 +933,17 @@ void CSVImportDialog::ignoreDuplicatesChanged( int ) } void CSVImportDialog::setFile( const QString &fileName ) { if ( fileName.isEmpty() ) return; QFile file( fileName ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { KMessageBox::sorry( this, i18n( "Cannot open input file!" ) ); file.close(); return; } mFileArray = file.readAll(); file.close(); @@ -959,11 +963,11 @@ void CSVImportDialog::urlChanged( const QString &file ) enableButtonOK( state ); findButton( User1 )->setEnabled( state ); findButton( User2 )->setEnabled( state ); } -#ifndef KAB_EMBEDDED -#include <csvimportdialog.moc> +#ifndef KAB_EMBEDDED_ +#include <moc_csvimportdialog.cpp> #endif //KAB_EMBEDDED diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h index 2661420..520f3fa 100644 --- a/kaddressbook/xxport/csvimportdialog.h +++ b/kaddressbook/xxport/csvimportdialog.h @@ -28,27 +28,27 @@ $Id$ #ifndef CSV_IMPORT_DLG_H #define CSV_IMPORT_DLG_H #include <kabc/addressbook.h> #include <kabc/addresseelist.h> #include <kdialogbase.h> -#include <qvaluelist.h> +#include <q3valuelist.h> class KURLRequester; -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; class QCheckBox; class QLineEdit; class QPushButton; class QRadioButton; -class QTable; +class Q3Table; class CSVImportDialog : public KDialogBase { Q_OBJECT public: CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); @@ -80,18 +80,18 @@ class CSVImportDialog : public KDialogBase HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel, BusinessAddressStreet, BusinessAddressLocality, BusinessAddressRegion, BusinessAddressPostalCode, BusinessAddressCountry, BusinessAddressLabel, HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, MobileWorkPhone, Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories }; - QTable* mTable; - QButtonGroup* mDelimiterBox; + Q3Table* mTable; + Q3ButtonGroup* mDelimiterBox; QRadioButton* mRadioComma; QRadioButton* mRadioSemicolon; QRadioButton* mRadioTab; QRadioButton* mRadioSpace; QRadioButton* mRadioOther; QLineEdit* mDelimiterEdit; QComboBox* mComboLine; QComboBox* mComboQuote; @@ -114,13 +114,13 @@ class CSVImportDialog : public KDialogBase QChar mTextQuote; QString mDelimiter; QString mData; QByteArray mFileArray; QMap<QString, uint> mTypeMap; KABC::AddressBook *mAddressBook; int mCustomCounter; bool mClearTypeStore; - QValueList<int> mTypeStore; + Q3ValueList<int> mTypeStore; }; #endif diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp index 03efc1b..72d3fc2 100644 --- a/kaddressbook/xxport/kde2_xxport.cpp +++ b/kaddressbook/xxport/kde2_xxport.cpp @@ -111,11 +111,11 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const proc.start( KProcess::Block ); addressBook()->load(); return KABC::AddresseeList(); } -#ifndef KAB_EMBEDDED -#include "kde2_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kde2_xxport.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index 9a8fa68..64b9071 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp @@ -24,18 +24,20 @@ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> #include <kabc/vcardconverter.h> #include <kabc/vcardparser/vcardtool.h> #include <kfiledialog.h> #ifndef KAB_EMBEDDED #include <kio/netaccess.h> #endif //KAB_EMBEDDED @@ -97,24 +99,24 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString #else //KAB_EMBEDDED QString fileName = KFileDialog::getSaveFileName( name, i18n("Save file"), parentWidget() ); #endif //KAB_EMBEDDED if ( fileName.isEmpty() ) return false; QFile outFile( fileName ); - if ( !outFile.open( IO_WriteOnly ) ) { + if ( !outFile.open( QIODevice::WriteOnly ) ) { QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); KMessageBox::error( parentWidget(), text.arg( fileName ) ); return false; } - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); KABC::Addressee::List::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { KABC::VCardConverter converter; QString vcard; KABC::VCardConverter::Version version; if ( data == "v21" ) @@ -148,17 +150,17 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const else url = XXPortManager::importURL; if ( url.isEmpty() ) return addrList; QString caption( i18n( "vCard Import Failed" ) ); if ( KIO::NetAccess::download( url, fileName ) ) { QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); file.close(); QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); addrList = parseVCard( data ); if ( !url.isLocalFile() ) KIO::NetAccess::removeTempFile( fileName ); @@ -191,18 +193,18 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const { //US url = XXPortManager::importURL; qDebug("VCardXXPort::importContacts Urls at the moment not supported"); if ( url.isEmpty() ) return addrList; } QFile file( fileName ); - if ( file.open( IO_ReadOnly ) ) { - QCString rawData ( file.readAll().data(),file.size()+1); + if ( file.open( QIODevice::ReadOnly ) ) { + Q3CString rawData ( file.readAll().data(),file.size()+1); file.close(); int start = 0; #ifndef DESKTOP_VERSION while ( start < rawData.size()-2 ) { if ( rawData.at( start ) == '\r' ) if ( rawData.at( start+1 ) == '\n' ) if ( rawData.at( start+2 ) == ' ' ) { rawData.remove(start,3); @@ -262,11 +264,11 @@ KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const if ( addrList.isEmpty() ) { QString text = i18n( "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n" ); KMessageBox::sorry( parentWidget(), text ); } return addrList; } -#ifndef KAB_EMBEDDED -#include "vcard_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_vcard_xxport.cpp" #endif //KAB_EMBEDDED |