mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 07:24:07 +00:00
Fix "file://" urls correction for case of launch portable GD via network
This commit is contained in:
parent
ebc301a7bf
commit
a722b3f43d
|
@ -327,7 +327,10 @@ QNetworkReply * ArticleNetworkAccessManager::createRequest( Operation op,
|
||||||
if( req.url().host().isEmpty() && articleMaker.adjustFilePath( fileName ) )
|
if( req.url().host().isEmpty() && articleMaker.adjustFilePath( fileName ) )
|
||||||
{
|
{
|
||||||
QUrl newUrl( req.url() );
|
QUrl newUrl( req.url() );
|
||||||
newUrl.setPath( Qt4x5::Url::ensureLeadingSlash( QUrl::fromLocalFile( fileName ).path() ) );
|
QUrl localUrl = QUrl::fromLocalFile( fileName );
|
||||||
|
|
||||||
|
newUrl.setHost( localUrl.host() );
|
||||||
|
newUrl.setPath( Qt4x5::Url::ensureLeadingSlash( localUrl.path() ) );
|
||||||
|
|
||||||
QNetworkRequest newReq( req );
|
QNetworkRequest newReq( req );
|
||||||
newReq.setUrl( newUrl );
|
newReq.setUrl( newUrl );
|
||||||
|
|
Loading…
Reference in a new issue