X-Git-Url: http://git.maemo.org/git/?p=jenirok;a=blobdiff_plain;f=src%2Fgui%2Fdetailwindow.cpp;fp=src%2Fgui%2Fdetailwindow.cpp;h=39cc7bfe4fe723f0e60f1d09b7196631d1633fb1;hp=12d5ef740f94f36e911d3f063ba398a4fc70abdd;hb=e40e77e82cb5d34ad45221cefe89327b89e30c18;hpb=9fb05eb3e2c1d41961d8343ddb1b2b9137a23159;ds=sidebyside diff --git a/src/gui/detailwindow.cpp b/src/gui/detailwindow.cpp index 12d5ef7..39cc7bf 100644 --- a/src/gui/detailwindow.cpp +++ b/src/gui/detailwindow.cpp @@ -154,8 +154,10 @@ void DetailWindow::addToContacts() ContactManager cm; ContactManager::Contact contact; - getDetails(contact.street, contact.streetNumber, - contact.zipCode, contact.city); + QString number; + QString street; + getDetails(street, number, + contact.zipCode, contact.city, contact.street); contact.name = addContactInput_->text(); contact.number = numberButton_->valueText(); contact.country = country_; @@ -222,8 +224,9 @@ void DetailWindow::openMaps() OviMaps maps; OviMaps::Address addr; + QString streetAndNumber; getDetails(addr.street, addr.number, - addr.zipCode, addr.city); + addr.zipCode, addr.city, streetAndNumber); addr.country = country_; //qDebug() << addr.street << addr.number << addr.zipCode << addr.city << addr.country; @@ -237,11 +240,14 @@ void DetailWindow::openMaps() } void DetailWindow::getDetails(QString& street, QString& streetNumber, - QString& zip, QString& city) + QString& zip, QString& city, QString& streetAndNumber) { int pos = 0; QString streetVal = streetButton_->valueText(); + streetVal = streetVal.replace("Str.", QString::fromUtf8("Straße")); + streetVal = streetVal.replace("str.", QString::fromUtf8("straße")); + streetAndNumber = streetVal; QString cityVal = cityButton_->valueText(); city = cityVal; @@ -285,8 +291,6 @@ void DetailWindow::getDetails(QString& street, QString& streetNumber, } streetNumber = streetNumber.trimmed(); - street = street.replace("Str.", QString::fromUtf8("Straße")); - street = street.replace("str.", QString::fromUtf8("straße")); street = street.trimmed(); if((pos = cityVal.indexOf(" ")) > 0)