[Marble-bugs] [marble] [Bug 334543] New: If an apex ( like: ' ) is present in the search term of the address the query fails because the query itself uses the apexes
Renato
rfringuello at gmail.com
Fri May 9 07:19:40 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=334543
Bug ID: 334543
Summary: If an apex ( like: ' ) is present in the search
term of the address the query fails because the query
itself uses the apexes
Classification: Unclassified
Product: marble
Version: 1.7 (KDE 4.12)
Platform: Compiled Sources
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: marble-bugs at kde.org
Reporter: rfringuello at gmail.com
The local-osm-search plugin uses the method:
QString OsmDatabase::wildcardQuery( const QString &term ) const
in order to inglobe the searched place in the query
The problem is that the returned QString uses the single apex and if the
QString term already contains an apex the returned value will be wrong because
will be interrupted at the first apex of the term.
Reproducible: Always
Steps to Reproduce:
1. Insert an address containing an apex (like: Via Sant'Orsola, Milano).
2. Try to search it and wait the result.
3. Check the result.
Actual Results:
The results are wrong because marble will search for: "Via Sant, Milano"
Expected Results:
The software should search for "Via Sant'Orsola, Milano"
the following block:
if ( term.contains( '*' ) ) {
return " LIKE '" + result.replace( '*', '%' ) + '\'';
} else {
return " = '" + result + '\'';
}
should be like this:
if ( term.contains( '*' ) ) {
return " LIKE \"" + result.replace( '*', '%' ) + "\" ";
} else {
return " = \"" + result + "\"";
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Marble-bugs
mailing list