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_ ),
experimentalIframe(false)
{
QString temp=urlTemplate_;
if(temp.endsWith("##")){
temp.chop(2);
if( urlTemplate_.startsWith( "http://" ) || urlTemplate_.startsWith( "https://" ) )
{
experimentalIframe = true;
}
//make this default.
experimentalIframe = true;
//else file:/// local dictionary file path
urlTemplate = QUrl( temp ).toEncoded() ;
dictionaryDescription = temp;
urlTemplate = QUrl( urlTemplate_ ).toEncoded() ;
dictionaryDescription = urlTemplate_;
}
string getName() noexcept override