author | zautrix <zautrix> | 2004-10-06 19:41:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-06 19:41:10 (UTC) |
commit | be3a5ea82c9a160eeeaad187a357c9a085fdb20a (patch) (side-by-side diff) | |
tree | 933c685c84430f5c19a0657239b5c8b50a88de05 | |
parent | 656636acfb8c607901c97c4f55129e29e1df9913 (diff) | |
download | kdepimpi-be3a5ea82c9a160eeeaad187a357c9a085fdb20a.zip kdepimpi-be3a5ea82c9a160eeeaad187a357c9a085fdb20a.tar.gz kdepimpi-be3a5ea82c9a160eeeaad187a357c9a085fdb20a.tar.bz2 |
bugfixes
-rw-r--r-- | gammu/emb/common/gsmstate.h | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | libkdepim/phoneaccess.cpp | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/gammu/emb/common/gsmstate.h b/gammu/emb/common/gsmstate.h index 2b4806c..f15a6a7 100644 --- a/gammu/emb/common/gsmstate.h +++ b/gammu/emb/common/gsmstate.h @@ -160,9 +160,8 @@ typedef struct _GSM_Reply_Function GSM_Reply_Function; # undef GSM_ENABLE_PHONETBLUE # undef GSM_ENABLE_FBUS2BLUE # undef GSM_ENABLE_MROUTERBLUE #endif - #ifndef WIN32 # ifdef ENABLE_LGPL # undef GSM_ENABLE_IRDADEVICE # undef GSM_ENABLE_IRDAPHONET @@ -1576,4 +1575,5 @@ void GSM_GetPhoneFeaturesForBackup(GSM_StateMachine *s, GSM_Backup_Info *info); /* How should editor hadle tabs in this file? Add editor commands here. * vim: noexpandtab sw=8 ts=8 sts=8: */ + diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 7bec90a..b014cba 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -34,8 +34,9 @@ $Id$ #include <klocale.h> #include <kfiledialog.h> #include <qtimer.h> #include <qlabel.h> +#include <qregexp.h> #include <qlineedit.h> #include <qcheckbox.h> #include <qpushbutton.h> #include <qprogressbar.h> @@ -725,8 +726,13 @@ void KABCore::export2phone() QTextStream t( &outFile ); // use a text stream t.setEncoding( QTextStream::UnicodeUTF8 ); t <<datastream; outFile.close(); + if ( PhoneAccess::writeToPhone( fileName ) ) + qDebug("Export okay "); + else + qDebug("Error export contacts "); + } else { qDebug("Error open temp file "); return; } diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index c0bd6cc..357cd39 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -39,9 +39,9 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model #else QString fileName = QDir::homeDirPath() +"/.gammurc"; #endif //qDebug("save %d ", load ); - QString content; + QString content = "[gammu]\n";; bool write = false; bool addPort = true, addConnection = true, addModel = true; QFile file( fileName ); if ( QFile::exists( fileName) ) { @@ -52,9 +52,9 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model QString line; while ( file.readLine( line, 1024 ) > 0 ) { //qDebug("*%s* ", line.latin1() ); if ( line.left(7 ) == "[gammu]" ) { - ; + ; } else if ( line.left(4 ) == "port" ) { if ( line == "port = " + device+"\n" ) { content += line ; @@ -92,29 +92,23 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model if ( ! model.isEmpty() ) { addModel = true; } } - + if ( addConnection ) { - if ( ! write ) - content += "[gammu]\n"; write = true; content += "connection = "; content += connection; content += "\n"; } if ( addPort ) { - if ( ! write ) - content += "[gammu]\n"; write = true; content += "port = "; content += device; content += "\n"; } if ( addModel ) { - if ( ! write ) - content += "[gammu]\n"; write = true; content += "model = "; content += model; content += "\n"; |