Use gdlookup:// scheme instead of bword:// one for close word suggestions.

The latter is prone to problems due to URI conventions and should not be used.
This commit is contained in:
Konstantin Isakov 2009-11-11 13:37:23 +03:00
parent 55916d0aae
commit a134015070

View file

@ -8,6 +8,7 @@
#include "wstring_qt.hh" #include "wstring_qt.hh"
#include <limits.h> #include <limits.h>
#include <QFile> #include <QFile>
#include <QUrl>
using std::vector; using std::vector;
using std::string; using std::string;
@ -490,8 +491,14 @@ void ArticleRequest::stemmedSearchFinished()
for( unsigned x = 0; x < sr.size(); ++x ) for( unsigned x = 0; x < sr.size(); ++x )
{ {
QUrl url;
url.setScheme( "gdlookup" );
url.setHost( "localhost" );
url.setPath( sr[ x ].first );
string escapedResult = Html::escape( sr[ x ].first.toUtf8().data() ); string escapedResult = Html::escape( sr[ x ].first.toUtf8().data() );
footer += "<a href=\"bword://" + escapedResult + "\">" + escapedResult +"</a>"; footer += string( "<a href=\"" ) + url.toEncoded().data() + "\">" + escapedResult +"</a>";
if ( x != sr.size() - 1 ) if ( x != sr.size() - 1 )
{ {