summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookE.pro5
-rw-r--r--kmicromail/kmicromailE.pro4
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/korganizerE.pro7
-rw-r--r--libkcal/phoneformat.cpp79
-rw-r--r--libkcal/phoneformat.h14
6 files changed, 66 insertions, 45 deletions
diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro
index 41f293d..86166d8 100644
--- a/kaddressbook/kaddressbookE.pro
+++ b/kaddressbook/kaddressbookE.pro
@@ -24,4 +24,9 @@ LIBS += -lmicrokabc
LIBS += -lqpe
LIBS += -ljpeg
+
+LIBS += -lmicrogammu
+LIBS += -lbluetooth
+LIBS += -lsdp
+
LIBS += $(QTOPIALIB)
LIBS += -L$(QPEDIR)/lib
diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro
index 8d13796..9cedb21 100644
--- a/kmicromail/kmicromailE.pro
+++ b/kmicromail/kmicromailE.pro
@@ -57,4 +57,8 @@ LIBS += $(QTOPIALIB)
#next line for Zaurus only
#LIBS += -luuid
+
+LIBS += -lmicrogammu
+LIBS += -lbluetooth
+LIBS += -lsdp
#
OBJECTS_DIR = obj/$(PLATFORM)
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index a7f7010..b307649 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1189,5 +1189,5 @@ void CalendarView::syncExternal( int mode )
calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
bool syncOK = false;
- boo loadSuccess = false;
+ bool loadSuccess = false;
PhoneFormat* phoneFormat = 0;
#ifndef DESKTOP_VERSION
diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro
index 727764a..b39de35 100644
--- a/korganizer/korganizerE.pro
+++ b/korganizer/korganizerE.pro
@@ -18,4 +18,11 @@ LIBS += -lmicroqtcompat
LIBS += -lmicrokabc
#LIBS += -lmicrokabcwrap
+
+#LIBS += $(QPEDIR)/lib/gammu
+LIBS += -lmicrogammu
+LIBS += -lbluetooth
+LIBS += -lsdp
+
+
LIBS += -lqpe
LIBS += -ljpeg
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index f78730d..fa18683 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -60,8 +60,8 @@ using namespace KCal;
//MDAY
-class SharpParser : public QObject
+class PhoneParser : public QObject
{
public:
- SharpParser( Calendar *calendar ) : mCalendar( calendar ) {
+ PhoneParser( Calendar *calendar ) : mCalendar( calendar ) {
oldCategories = 0;
}
@@ -81,16 +81,16 @@ class SharpParser : public QObject
if ( skip )
return false;
- ulong cSum = SharpFormat::getCsum(attList );
+ ulong cSum = PhoneFormat::getCsum(attList );
if ( qName == "Event" ) {
Event *event;
- event = existingCalendar->event( attList[0].toInt() );
+ event = existingCalendar->event( attList[0] );
if ( event )
event = (Event*)event->clone();
else
event = new Event;
- event->setZaurusId( attList[0].toInt() );
- event->setZaurusUid( cSum );
- event->setZaurusStat( -2 );
+ // event->setZaurusId( attList[0].toInt() );
+ //event->setZaurusUid( cSum );
+ //event->setZaurusStat( -2 );
event->setSummary( attList[2] );
@@ -189,5 +189,5 @@ class SharpParser : public QObject
Todo *todo;
- todo = existingCalendar->todo( attList[0].toInt() );
+ todo = existingCalendar->todo( attList[0] );
if (todo )
todo = (Todo*)todo->clone();
@@ -201,7 +201,7 @@ class SharpParser : public QObject
//2,"Familie,Freunde,Holiday",20040318T000000,20040324T000000,20040317T000000,1,2,tod2,notes
- todo->setZaurusId( attList[0].toInt() );
- todo->setZaurusUid( cSum );
- todo->setZaurusStat( -2 );
+ //todo->setZaurusId( attList[0] );
+ //todo->setZaurusUid( cSum );
+ //todo->setZaurusStat( -2 );
todo->setSummary( attList[7] );
@@ -324,15 +324,15 @@ class SharpParser : public QObject
};
-QMap<QString,QString> SharpParser::mCategoriesMap;
+QMap<QString,QString> PhoneParser::mCategoriesMap;
-SharpFormat::SharpFormat()
+PhoneFormat::PhoneFormat()
{
mCategories = 0;
}
-SharpFormat::~SharpFormat()
+PhoneFormat::~PhoneFormat()
{
}
-ulong SharpFormat::getCsum( const QStringList & attList)
+ulong PhoneFormat::getCsum( const QStringList & attList)
{
int max = attList.count() -1;
@@ -360,5 +360,5 @@ ulong SharpFormat::getCsum( const QStringList & attList)
#include <stdlib.h>
#define DEBUGMODE false
-bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
+bool PhoneFormat::load( Calendar *calendar, Calendar *existngCal )
{
@@ -489,5 +489,5 @@ static char *cp;
return true;
}
-int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
+int PhoneFormat::getNumFromRecord( QString answer, Incidence* inc )
{
int retval = -1;
@@ -530,7 +530,7 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
if ( ok && newnum > 0) {
retval = newnum;
- inc->setZaurusId( newnum );
- inc->setZaurusUid( getCsum( templist ) );
- inc->setZaurusStat( -4 );
+ //inc->setZaurusId( newnum );
+ //inc->setZaurusUid( getCsum( templist ) );
+ //inc->setZaurusStat( -4 );
}
}
@@ -539,5 +539,5 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
return retval;
}
-bool SharpFormat::save( Calendar *calendar)
+bool PhoneFormat::save( Calendar *calendar)
{
@@ -571,9 +571,9 @@ bool SharpFormat::save( Calendar *calendar)
while ( ev ) {
//qDebug("i %d ", ++i);
- if ( ev->zaurusStat() != -2 ) {
+ if ( true /*ev->zaurusStat() != -2*/ ) {
status.setText ( message + QString::number ( ++procCount ) );
qApp->processEvents();
QString eString = getEventString( ev );
- if ( ev->zaurusStat() == -3 ) { // delete
+ if (/* ev->zaurusStat() == -3 */ true) { // delete
// deleting empty strings does not work.
// we write first and x and then delete the record with the x
@@ -584,5 +584,5 @@ bool SharpFormat::save( Calendar *calendar)
changeEnt = true;
}
- else if ( ev->zaurusId() == -1 ) { // add new
+ else if ( /*ev->zaurusId() == -1*/true ) { // add new
command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName;
system ( command.utf8() );
@@ -657,9 +657,9 @@ bool SharpFormat::save( Calendar *calendar)
procCount = 0;
while ( to ) {
- if ( to->zaurusStat() != -2 ) {
+ if ( true /*to->zaurusStat() != -2 */) {
status.setText ( message + QString::number ( ++procCount ) );
qApp->processEvents();
QString eString = getTodoString( to );
- if ( to->zaurusStat() == -3 ) { // delete
+ if ( /*to->zaurusStat() == -3*/true ) { // delete
// deleting empty strings does not work.
// we write first and x and then delete the record with the x
@@ -670,5 +670,5 @@ bool SharpFormat::save( Calendar *calendar)
changeEnt = true;
}
- else if ( to->zaurusId() == -1 ) { // add new
+ else if ( true /*to->zaurusId() == -1*/ ) { // add new
command = "(echo \"" + tPrefix + eString + "\" ) | db2file todo -w -g -c " + codec+ " > "+ fileName;
system ( command.utf8() );
@@ -735,5 +735,5 @@ bool SharpFormat::save( Calendar *calendar)
return true;
}
-QString SharpFormat::dtToString( const QDateTime& dti, bool useTZ )
+QString PhoneFormat::dtToString( const QDateTime& dti, bool useTZ )
{
QString datestr;
@@ -757,6 +757,7 @@ QString SharpFormat::dtToString( const QDateTime& dti, bool useTZ )
return datestr + timestr;
}
-QString SharpFormat::getEventString( Event* event )
+QString PhoneFormat::getEventString( Event* event )
{
+#if 0
QStringList list;
list.append( QString::number(event->zaurusId() ) );
@@ -918,9 +919,11 @@ QString SharpFormat::getEventString( Event* event )
}
return list.join(",");
-
+#endif
+ return QString();
}
-QString SharpFormat::getTodoString( Todo* todo )
+QString PhoneFormat::getTodoString( Todo* todo )
{
+#if 0
QStringList list;
list.append( QString::number( todo->zaurusId() ) );
@@ -970,6 +973,8 @@ QString SharpFormat::getTodoString( Todo* todo )
}
return list.join(",");
+#endif
+ return QString();
}
-QString SharpFormat::getPart( const QString & text, bool &ok, int &start )
+QString PhoneFormat::getPart( const QString & text, bool &ok, int &start )
{
//qDebug("start %d ", start);
@@ -1029,9 +1034,9 @@ QString SharpFormat::getPart( const QString & text, bool &ok, int &start )
}
}
-bool SharpFormat::fromString( Calendar *calendar, const QString & text)
+bool PhoneFormat::fromString( Calendar *calendar, const QString & text)
{
return false;
}
-bool SharpFormat::fromString2Cal( Calendar *calendar,Calendar *existingCalendar, GSM_StateMachine* s, const QString & type)
+bool PhoneFormat::fromString2Cal( Calendar *calendar,Calendar *existingCalendar, GSM_StateMachine* s, const QString & type)
{
GSM_Phone_Functions *Phone;
@@ -1043,5 +1048,5 @@ bool SharpFormat::fromString2Cal( Calendar *calendar,Calendar *existingCalendar,
Phone=s->Phone.Functions;
bool gshutdown = false;
- SharpParser handler( calendar );
+ PhoneParser handler( calendar );
//handler.setCategoriesList( mCategories );
QStringList templist;
@@ -1331,5 +1336,5 @@ typedef struct {
bool ok = true;
start = end;
- SharpParser handler( calendar );
+ PhoneParser handler( calendar );
handler.setCategoriesList( mCategories );
while ( start > 0 ) {
@@ -1354,5 +1359,5 @@ typedef struct {
}
-QString SharpFormat::toString( Calendar * )
+QString PhoneFormat::toString( Calendar * )
{
return QString::null;
diff --git a/libkcal/phoneformat.h b/libkcal/phoneformat.h
index f4cb52c..4ddf6f0 100644
--- a/libkcal/phoneformat.h
+++ b/libkcal/phoneformat.h
@@ -19,6 +19,6 @@
Boston, MA 02111-1307, USA.
*/
-#ifndef SHARPFORMAT_H
-#define SHARPAFORMAT_H
+#ifndef PHONEFORMAT_H
+#define PHONEFORMAT_H
#include <qstring.h>
@@ -28,5 +28,5 @@
#include "calformat.h"
extern "C" {
-#include "gammu.h"
+#include "../gammu/emb/common/gammu.h"
}
@@ -34,12 +34,12 @@ namespace KCal {
/**
- This class implements the calendar format used by Sharp.
+ This class implements the calendar format used by Phone.
*/
-class SharpFormat : public QObject {
+class PhoneFormat : public QObject {
public:
/** Create new iCalendar format. */
- SharpFormat();
- virtual ~SharpFormat();
+ PhoneFormat();
+ virtual ~PhoneFormat();
bool load( Calendar * ,Calendar *);