summaryrefslogtreecommitdiff
path: root/libopie
Side-by-side diff
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index 9230b8b..178559b 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -473,21 +473,22 @@ QString OContact::toRichText() const
marker = true;
}
if ( !(value = businessStreet()).isEmpty() )
text += Qtopia::escapeString(value) + "<br>";
state = businessState();
+ if ( !(value = businessZip()).isEmpty() )
+ text += Qtopia::escapeString(value) + " ";
if ( !(value = businessCity()).isEmpty() ) {
text += Qtopia::escapeString(value);
if ( state )
text += ", " + Qtopia::escapeString(state);
text += "<br>";
} else if ( !state.isEmpty() )
text += Qtopia::escapeString(state) + "<br>";
- if ( !(value = businessZip()).isEmpty() )
- text += Qtopia::escapeString(value) + "<br>";
+
if ( !(value = businessCountry()).isEmpty() )
text += Qtopia::escapeString(value) + "<br>";
// rest of Business data
str = office();
if ( !str.isEmpty() ){
@@ -534,21 +535,21 @@ QString OContact::toRichText() const
text += "<br>";
}
if ( !(value = homeStreet()).isEmpty() )
text += Qtopia::escapeString(value) + "<br>";
state = homeState();
+ if ( !(value = homeZip()).isEmpty() )
+ text += Qtopia::escapeString(value) + " ";
if ( !(value = homeCity()).isEmpty() ) {
text += Qtopia::escapeString(value);
if ( !state.isEmpty() )
text += ", " + Qtopia::escapeString(state);
text += "<br>";
} else if (!state.isEmpty())
text += Qtopia::escapeString(state) + "<br>";
- if ( !(value = homeZip()).isEmpty() )
- text += Qtopia::escapeString(value) + "<br>";
if ( !(value = homeCountry()).isEmpty() )
text += Qtopia::escapeString(value) + "<br>";
// rest of Home data
str = homeWebpage();
if ( !str.isEmpty() ){
@@ -630,13 +631,13 @@ QString OContact::toRichText() const
text += "<b>" + QObject::tr( "Category:") + "</b> ";
text += categoryNames().join(", ");
text += "<br>";
}
// notes last
- if ( (value = notes()) ) {
+ if ( !(value = notes()).isEmpty() ) {
text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> ";
QRegExp reg("\n");
//QString tmp = Qtopia::escapeString(value);
QString tmp = QStyleSheet::convertFromPlainText(value);
//tmp.replace( reg, "<br>" );