mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
+! Fix handling requests with no link text.
This commit is contained in:
parent
3161934f64
commit
1dff1384bc
|
@ -342,9 +342,16 @@ void ArticleView::tryMangleWebsiteClickedUrl( QUrl & url, Contexts & contexts )
|
||||||
|
|
||||||
QUrl target;
|
QUrl target;
|
||||||
|
|
||||||
|
QString queryWord = result.toString();
|
||||||
|
|
||||||
|
// Empty requests are treated as no request, so we work this around by
|
||||||
|
// adding a space.
|
||||||
|
if ( queryWord.isEmpty() )
|
||||||
|
queryWord = " ";
|
||||||
|
|
||||||
target.setScheme( "gdlookup" );
|
target.setScheme( "gdlookup" );
|
||||||
target.setHost( "localhost" );
|
target.setHost( "localhost" );
|
||||||
target.setPath( "/" + result.toString() );
|
target.setPath( "/" + queryWord );
|
||||||
|
|
||||||
url = target;
|
url = target;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue