mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Qt5-specific: Fix pictures loading for Bgl and some Stardict dictionaries
This commit is contained in:
parent
f7ea6b1dcc
commit
a1d539ff1f
|
@ -203,7 +203,7 @@ sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource(
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return dictionaries[ x ]->getResource( url.path().mid( 1 ).toUtf8().data() );
|
return dictionaries[ x ]->getResource( Qt4x5::Url::path( url ).mid( 1 ).toUtf8().data() );
|
||||||
}
|
}
|
||||||
catch( std::exception & e )
|
catch( std::exception & e )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ vector< ResourceToSaveHandler * > ArticleView::saveResource( const QUrl & url, c
|
||||||
for( unsigned x = 0; x < activeDicts->size(); ++x )
|
for( unsigned x = 0; x < activeDicts->size(); ++x )
|
||||||
{
|
{
|
||||||
req = (*activeDicts)[ x ]->getResource(
|
req = (*activeDicts)[ x ]->getResource(
|
||||||
url.path().mid( 1 ).toUtf8().data() );
|
Qt4x5::Url::path( url ).mid( 1 ).toUtf8().data() );
|
||||||
|
|
||||||
ResourceToSaveHandler * handler = new ResourceToSaveHandler( this, req, fileName );
|
ResourceToSaveHandler * handler = new ResourceToSaveHandler( this, req, fileName );
|
||||||
handlers.push_back( handler );
|
handlers.push_back( handler );
|
||||||
|
@ -1453,7 +1453,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
||||||
savePath = QDir::homePath();
|
savePath = QDir::homePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString name = url.path().section( '/', -1 );
|
QString name = Qt4x5::Url::path( url ).section( '/', -1 );
|
||||||
|
|
||||||
if ( result == saveSoundAction )
|
if ( result == saveSoundAction )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2964,7 +2964,7 @@ static void filterAndCollectResources( QString & html, QRegExp & rx, const QStri
|
||||||
{
|
{
|
||||||
QUrl url( rx.cap( 1 ) );
|
QUrl url( rx.cap( 1 ) );
|
||||||
QString host = url.host();
|
QString host = url.host();
|
||||||
QString resourcePath = QString::fromLatin1( QUrl::toPercentEncoding( url.path(), "/" ) );
|
QString resourcePath = QString::fromLatin1( QUrl::toPercentEncoding( Qt4x5::Url::path( url ), "/" ) );
|
||||||
|
|
||||||
if ( !host.startsWith( '/' ) )
|
if ( !host.startsWith( '/' ) )
|
||||||
host.insert( 0, '/' );
|
host.insert( 0, '/' );
|
||||||
|
|
Loading…
Reference in a new issue