mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +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();
|
||||
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
|
||||
// and seems to hangup forever on qt6.3 ,so the best solution for now is to comment out the following lines.
|
||||
|
||||
// if( view->lastContextMenuRequest())
|
||||
// {
|
||||
// page->triggerAction( QWebEnginePage::InspectElement );
|
||||
// }
|
||||
#else
|
||||
// and seems to hangup forever on qt6.3.0 ,so the best solution for now is to comment out the following lines.
|
||||
page->triggerAction( QWebEnginePage::InspectElement );
|
||||
#endif
|
||||
|
||||
|
|
2
dsl.cc
2
dsl.cc
|
@ -322,7 +322,7 @@ DslDictionary::DslDictionary( string const & id,
|
|||
|
||||
resourceDir1 = getDictionaryFilenames()[ 0 ] + ".files" + FsEncoding::separator();
|
||||
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 );
|
||||
resourceDir2 = FsEncoding::encode( s ) + ".files" + FsEncoding::separator();
|
||||
|
||||
|
|
|
@ -1151,6 +1151,11 @@ void processUnsortedParts( wstring & str, bool strip )
|
|||
void expandOptionalParts( wstring & str, list< wstring > * result,
|
||||
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 > * headwords;
|
||||
headwords = inside_recurse ? result : &expanded;
|
||||
|
|
Loading…
Reference in a new issue