mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +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_ ),
|
||||
experimentalIframe(false)
|
||||
{
|
||||
QString temp=urlTemplate_;
|
||||
if(temp.endsWith("##")){
|
||||
temp.chop(2);
|
||||
}
|
||||
//make this default.
|
||||
if( urlTemplate_.startsWith( "http://" ) || urlTemplate_.startsWith( "https://" ) )
|
||||
{
|
||||
experimentalIframe = true;
|
||||
}
|
||||
//else file:/// local dictionary file path
|
||||
|
||||
urlTemplate = QUrl( temp ).toEncoded() ;
|
||||
|
||||
dictionaryDescription = temp;
|
||||
urlTemplate = QUrl( urlTemplate_ ).toEncoded() ;
|
||||
dictionaryDescription = urlTemplate_;
|
||||
}
|
||||
|
||||
string getName() noexcept override
|
||||
|
|
Loading…
Reference in a new issue