mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Merge pull request #347 from xiaoyifang/fix/local-file-dictionary
fix: file:/// local file dictionary support
This commit is contained in:
commit
737d4421f5
14
website.cc
14
website.cc
|
@ -42,16 +42,14 @@ 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);
|
experimentalIframe = true;
|
||||||
}
|
}
|
||||||
//make this default.
|
//else file:/// local dictionary file path
|
||||||
experimentalIframe = true;
|
|
||||||
|
|
||||||
urlTemplate = QUrl( temp ).toEncoded() ;
|
urlTemplate = QUrl( urlTemplate_ ).toEncoded() ;
|
||||||
|
dictionaryDescription = urlTemplate_;
|
||||||
dictionaryDescription = temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string getName() noexcept override
|
string getName() noexcept override
|
||||||
|
|
Loading…
Reference in a new issue