mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
fix: local dictionary file:/// support
This commit is contained in:
parent
1688481bc3
commit
c5b9e48e0e
16
website.cc
16
website.cc
|
@ -42,16 +42,18 @@ public:
|
||||||
netMgr( netMgr_ ),
|
netMgr( netMgr_ ),
|
||||||
experimentalIframe(false)
|
experimentalIframe(false)
|
||||||
{
|
{
|
||||||
QString temp=urlTemplate_;
|
if( urlTemplate_.startsWith( "http://" ) || urlTemplate_.startsWith( "https://" ) )
|
||||||
if(temp.endsWith("##")){
|
{
|
||||||
temp.chop(2);
|
|
||||||
}
|
|
||||||
//make this default.
|
|
||||||
experimentalIframe = true;
|
experimentalIframe = true;
|
||||||
|
}
|
||||||
|
//else file:/// local dictionary file path
|
||||||
|
|
||||||
urlTemplate = QUrl( temp ).toEncoded() ;
|
|
||||||
|
|
||||||
dictionaryDescription = temp;
|
if(experimentalIframe)
|
||||||
|
urlTemplate = QUrl( urlTemplate_ ).toEncoded() ;
|
||||||
|
|
||||||
|
|
||||||
|
dictionaryDescription = urlTemplate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
string getName() noexcept override
|
string getName() noexcept override
|
||||||
|
|
Loading…
Reference in a new issue