diff --git a/article_inspect.cpp b/article_inspect.cpp index 40b3d112..dc0e69c0 100644 --- a/article_inspect.cpp +++ b/article_inspect.cpp @@ -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 diff --git a/dsl.cc b/dsl.cc index b7ffbf34..a873f6bb 100644 --- a/dsl.cc +++ b/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(); diff --git a/dsl_details.cc b/dsl_details.cc index 465309ac..965ce1c6 100644 --- a/dsl_details.cc +++ b/dsl_details.cc @@ -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;