summaryrefslogtreecommitdiff
authoreilers <eilers>2002-11-09 14:32:55 (UTC)
committer eilers <eilers>2002-11-09 14:32:55 (UTC)
commitcb7218cf112f24976e6f6bbd6e683d38ba31b00b (patch) (side-by-side diff)
treeaa177870ab587c8401f283801db432ea5c452578
parent98a73d0b6feca9105a0ce8bb57a1308f0317badb (diff)
downloadopie-cb7218cf112f24976e6f6bbd6e683d38ba31b00b.zip
opie-cb7218cf112f24976e6f6bbd6e683d38ba31b00b.tar.gz
opie-cb7218cf112f24976e6f6bbd6e683d38ba31b00b.tar.bz2
added
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/contact.h4
-rw-r--r--library/backend/timeconversion.cpp15
-rw-r--r--library/library.pro2
3 files changed, 16 insertions, 5 deletions
diff --git a/library/backend/contact.h b/library/backend/contact.h
index 4999430..2294986 100644
--- a/library/backend/contact.h
+++ b/library/backend/contact.h
@@ -200,22 +200,22 @@ public:
void saveJournal( journal_action action, const QString &key = QString::null );
void save( QString &buf ) const;
void setUid( int i )
{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
+ void setEmails( const QString &v );
+ QString emails() const { return find( Qtopia::Emails ); }
private:
friend class AbEditor;
friend class AbTable;
friend class AddressBookAccessPrivate;
friend class XMLIO;
QString emailSeparator() const { return " "; }
// the emails should be seperated by a comma
- void setEmails( const QString &v );
- QString emails() const { return find( Qtopia::Emails ); }
void insert( int key, const QString &value );
void replace( int key, const QString &value );
QString find( int key ) const;
QString displayAddress( const QString &street,
diff --git a/library/backend/timeconversion.cpp b/library/backend/timeconversion.cpp
index 3c25922..df7b0d5 100644
--- a/library/backend/timeconversion.cpp
+++ b/library/backend/timeconversion.cpp
@@ -22,21 +22,30 @@
#include <qtopia/timeconversion.h>
#include <qregexp.h>
#include <stdlib.h>
QString TimeConversion::toString( const QDate &d )
{
- QString r = QString::number( d.day() ) + "." +
+ QString empty;
+ if ( d.isNull() )
+ return empty;
+
+ QString r = QString::number( d.day() ) + "." +
QString::number( d.month() ) + "." +
QString::number( d.year() );
- //qDebug("TimeConversion::toString %s", r.latin1());
- return r;
+ //qDebug("TimeConversion::toString %s", r.latin1());
+
+ return r;
}
QDate TimeConversion::fromString( const QString &datestr )
{
+ QDate empty;
+ if ( datestr.isEmpty() )
+ return empty;
+
int monthPos = datestr.find('.');
int yearPos = datestr.find('.', monthPos+1 );
if ( monthPos == -1 || yearPos == -1 ) {
qDebug("fromString didn't find . in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, yearPos );
return QDate();
}
diff --git a/library/library.pro b/library/library.pro
index fba98f8..142c609 100644
--- a/library/library.pro
+++ b/library/library.pro
@@ -110,12 +110,14 @@ SOURCES = calendar.cpp \
ir.cpp \
backend/vcc_yacc.cpp \
backend/vobject.cpp \
findwidget_p.cpp \
finddialog.cpp \
lnkproperties.cpp
+# QPE crashes on my Notebook if it tries to play sound
+DEFINES = QT_NO_SOUND
# Qt 3 compatibility
HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h
SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp
INCLUDEPATH += $(OPIEDIR)/include backend
LIBS += -ldl -lcrypt -lm
INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui