mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +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;
|
||||
|
||||
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.setHost( "localhost" );
|
||||
target.setPath( "/" + result.toString() );
|
||||
target.setPath( "/" + queryWord );
|
||||
|
||||
url = target;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue