Fixed a bug that caused Eniro search results to sometimes have phone number in street...
[jenirok] / src / common / source.cpp
index a978b45..460f98e 100644 (file)
@@ -395,6 +395,12 @@ void Source::fixUrl(QUrl& url)
     url.setEncodedQuery(path);
 }
 
+bool Source::isPhoneNumber(QString const& string)
+{
+    static QRegExp check("^([0-9 -]{7,25})$");
+    return check.exactMatch(string);
+}
+
 Source::SearchDetails::SearchDetails(QString const& q,
                                      QString const& loc,
                                      SearchType t)