summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp47
1 files changed, 39 insertions, 8 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 238b0ef..1a9ccbc 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -98,2 +98,4 @@ public:
for (j=0;j<ToDo->EntriesNum;j++) {
+
+ //qDebug(" for todo %d",ToDo->Location );
switch (ToDo->Entries[j].EntryType) {
@@ -123,3 +125,4 @@ public:
case TODO_TEXT:
- todo->setSummary( QString ( (const char*) ToDo->Entries[j].Text ));
+ //qDebug(" text *%s* ", (const char*) DecodeUnicodeConsole(ToDo->Entries[j].Text ));
+ todo->setSummary( QString::fromUtf8 ( (const char*)DecodeUnicodeConsole(ToDo->Entries[j].Text )));
break;
@@ -236,3 +239,3 @@ public:
- qDebug(" for ");
+ //qDebug(" for ev");
switch (Note->Entries[i].EntryType) {
@@ -272,6 +275,7 @@ public:
case CAL_TEXT:
- event->setSummary( QString ( (const char*) Note->Entries[i].Text ));
+ //qDebug(" ev text %s", DecodeUnicodeConsole(Note->Entries[i].Text) );
+ event->setSummary( QString::fromUtf8 ( (const char*)DecodeUnicodeConsole( Note->Entries[i].Text )));
break;
case CAL_LOCATION:
- event->setLocation(QString ((const char*) Note->Entries[i].Text ));
+ event->setLocation(QString::fromUtf8 ((const char*) DecodeUnicodeConsole(Note->Entries[i].Text) ));
break;
@@ -614,2 +618,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
s.ConfigNum = 0;
+#if 0
static char *cp;
@@ -655,2 +660,27 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
+#endif
+ setlocale(LC_ALL, "");
+ GSM_ReadConfig(NULL, &s.Config[0], 0);
+ s.ConfigNum = 1;
+ GSM_Config *cfg = &s.Config[0];
+ di.coding = "utf8";
+ if ( ! connection.isEmpty() ) {
+ cfg->Connection = strdup(connection.latin1());
+ cfg->DefaultConnection = false;
+ qDebug("Connection set %s ", cfg->Connection );
+
+ }
+ if ( ! device.isEmpty() ) {
+ cfg->Device = strdup(device.latin1());
+ cfg->DefaultDevice = false;
+ qDebug("Device set %s ", cfg->Device);
+
+ }
+ if ( ! model.isEmpty() ) {
+ strcpy(cfg->Model,model.latin1() );
+ cfg->DefaultModel = false;
+ qDebug("Model set %s ",cfg->Model );
+
+
+ }
int error=GSM_InitConnection(&s,3);
@@ -662,3 +692,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
GSM_CalendarEntry note;
- bool refresh = true;
+ bool start = true;
Phone=s.Phone.Functions;
@@ -667,7 +697,8 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
int ccc = 0;
- while (!gshutdown && ccc++ < 10 ) {
+ while (!gshutdown && ccc++ < 3) {
qDebug("readEvent %d ", ccc);
- error=Phone->GetNextCalendar(&s,&note,refresh);
+ error=Phone->GetNextCalendar(&s,&note,start);
if (error == ERR_EMPTY) break;
+ start = false;
handler.readEvent( existingCal, &note );
@@ -675,3 +706,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
- bool start = true;
+ start = true;
GSM_ToDoEntry ToDo;