mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
fix: allow video to be dragged around
This commit is contained in:
parent
ffc4ccbb03
commit
245923a084
|
@ -976,17 +976,17 @@ void MdxDictionary::replaceLinks( QString & id, QString & article )
|
||||||
match = RX::Mdx::srcRe.match( linkTxt );
|
match = RX::Mdx::srcRe.match( linkTxt );
|
||||||
if ( match.hasMatch() ) {
|
if ( match.hasMatch() ) {
|
||||||
QString newText;
|
QString newText;
|
||||||
if ( linkType.at( 1 ) == 'o' ) // "source" tag
|
QString scheme;
|
||||||
{
|
// "source" tag
|
||||||
QString filename = match.captured( 3 );
|
if ( linkType.compare( "source" ) == 0 ) {
|
||||||
QString newName = getCachedFileName( filename );
|
scheme = "gdvideo://";
|
||||||
newName.replace( '\\', '/' );
|
|
||||||
newText = match.captured( 1 ) + match.captured( 2 ) + "file:///" + newName + match.captured( 2 );
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newText = match.captured( 1 ) + match.captured( 2 ) + "bres://" + id + "/" + match.captured( 3 )
|
scheme = "bres://";
|
||||||
+ match.captured( 2 );
|
|
||||||
}
|
}
|
||||||
|
newText =
|
||||||
|
match.captured( 1 ) + match.captured( 2 ) + scheme + id + "/" + match.captured( 3 ) + match.captured( 2 );
|
||||||
|
|
||||||
newLink = linkTxt.replace( match.capturedStart(), match.capturedLength(), newText );
|
newLink = linkTxt.replace( match.capturedStart(), match.capturedLength(), newText );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue