Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Jenirok
Summary Tracker SCM Files
authoreshe <jessehakanen@gmail.com>
Tue, 10 Aug 2010 14:20:58 +0000 (15:20 +0100)
committereshe <jessehakanen@gmail.com>
Tue, 10 Aug 2010 14:20:58 +0000 (15:20 +0100)
src/common/source.cpp
src/gui/detailwindow.cpp

index 21245b9..ac246ab 100644 (file)
@@ -307,7 +307,7 @@ QString& Source::htmlEntityDecode(QString& string)
         38,
         60,
         62,
-        160,
+        32,
         192,
         193,
         194,
index f7088c2..12d5ef7 100644 (file)
@@ -226,6 +226,8 @@ void DetailWindow::openMaps()
                addr.zipCode, addr.city);
     addr.country = country_;
 
+    //qDebug() << addr.street << addr.number << addr.zipCode << addr.city << addr.country;
+
     if(!maps.openMaps(addr))
     {
         QMaemo5InformationBox::information(this, tr("Unable to find coordinates for address."));
@@ -241,6 +243,7 @@ void DetailWindow::getDetails(QString& street, QString& streetNumber,
 
     QString streetVal = streetButton_->valueText();
     QString cityVal = cityButton_->valueText();
+    city = cityVal;
 
     QStringList words = streetVal.split(" ", QString::SkipEmptyParts);
 
@@ -270,7 +273,20 @@ void DetailWindow::getDetails(QString& street, QString& streetNumber,
         }
     }
 
+    if(streetNumber.isEmpty())
+    {
+        static QRegExp addrCheck(" ([0-9]+)");
+
+        if((pos = addrCheck.indexIn(street)) != -1)
+        {
+            streetNumber = addrCheck.cap(1);
+            street = street.left(pos);
+        }
+    }
+
     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)

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment