mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Merge branch 'staged' into dev
This commit is contained in:
commit
51e5e3bb2a
|
@ -20,15 +20,9 @@ void ArticleInspector::setInspectPage( QWebEngineView * view )
|
||||||
{
|
{
|
||||||
auto page=view->page();
|
auto page=view->page();
|
||||||
viewContainer->page()->setInspectedPage(page);
|
viewContainer->page()->setInspectedPage(page);
|
||||||
#if( QT_VERSION > QT_VERSION_CHECK( 6, 0, 0 ) )
|
#if( QT_VERSION > QT_VERSION_CHECK( 6, 3, 0 ) || QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
|
||||||
// without this line, application will crash on qt6.2 ,see https://bugreports.qt.io/browse/QTBUG-101724
|
// without this line, application will crash on qt6.2 ,see https://bugreports.qt.io/browse/QTBUG-101724
|
||||||
// and seems to hangup forever on qt6.3 ,so the best solution for now is to comment out the following lines.
|
// and seems to hangup forever on qt6.3.0 ,so the best solution for now is to comment out the following lines.
|
||||||
|
|
||||||
// if( view->lastContextMenuRequest())
|
|
||||||
// {
|
|
||||||
// page->triggerAction( QWebEnginePage::InspectElement );
|
|
||||||
// }
|
|
||||||
#else
|
|
||||||
page->triggerAction( QWebEnginePage::InspectElement );
|
page->triggerAction( QWebEnginePage::InspectElement );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
2
dsl.cc
2
dsl.cc
|
@ -322,7 +322,7 @@ DslDictionary::DslDictionary( string const & id,
|
||||||
|
|
||||||
resourceDir1 = getDictionaryFilenames()[ 0 ] + ".files" + FsEncoding::separator();
|
resourceDir1 = getDictionaryFilenames()[ 0 ] + ".files" + FsEncoding::separator();
|
||||||
QString s = FsEncoding::decode( getDictionaryFilenames()[ 0 ].c_str() );
|
QString s = FsEncoding::decode( getDictionaryFilenames()[ 0 ].c_str() );
|
||||||
if( s.endsWith( QString::fromLatin1( ".dz", Qt::CaseInsensitive ) ) )
|
if( s.endsWith( QString::fromLatin1( ".dz" ), Qt::CaseInsensitive ) )
|
||||||
s.chop( 3 );
|
s.chop( 3 );
|
||||||
resourceDir2 = FsEncoding::encode( s ) + ".files" + FsEncoding::separator();
|
resourceDir2 = FsEncoding::encode( s ) + ".files" + FsEncoding::separator();
|
||||||
|
|
||||||
|
|
|
@ -1151,6 +1151,11 @@ void processUnsortedParts( wstring & str, bool strip )
|
||||||
void expandOptionalParts( wstring & str, list< wstring > * result,
|
void expandOptionalParts( wstring & str, list< wstring > * result,
|
||||||
size_t x, bool inside_recurse )
|
size_t x, bool inside_recurse )
|
||||||
{
|
{
|
||||||
|
// if str is too long ,it can never be headwords.
|
||||||
|
if( str.size() > 100 )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
list< wstring > expanded;
|
list< wstring > expanded;
|
||||||
list< wstring > * headwords;
|
list< wstring > * headwords;
|
||||||
headwords = inside_recurse ? result : &expanded;
|
headwords = inside_recurse ? result : &expanded;
|
||||||
|
|
Loading…
Reference in a new issue