Merge pull request #347 from xiaoyifang/fix/local-file-dictionary

fix: file:/// local file dictionary support
This commit is contained in:
xiaoyifang 2023-02-17 14:50:17 +08:00 committed by GitHub
commit 737d4421f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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