Merge branch 'temp/staged' into staged

This commit is contained in:
yifang 2022-02-17 22:36:14 +08:00
commit 6943b77972
9 changed files with 35 additions and 63 deletions

View file

@ -7,7 +7,8 @@ on:
push: push:
branches: branches:
- dev - dev
- staged - master
# - staged
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- ".github/**" - ".github/**"
@ -17,7 +18,8 @@ on:
pull_request: pull_request:
branches: branches:
- dev - dev
- staged - master
# - staged
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- ".github/**" - ".github/**"
@ -96,5 +98,5 @@ jobs:
Windows built with: msvc64 Visual studio 2019 Windows built with: msvc64 Visual studio 2019
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle. goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
AppImage built with: Ubuntu-20.04 ,latest gcc AppImage built with: Ubuntu-20.04 ,latest gcc
macos built with: ${{ matrix.os }},clang_64 macos built with: macos-10.15,macos-11.0,clang_64
This is a prerelease version ,auto build by github action. use on your on risk:-) This is a prerelease version ,auto build by github action. use on your on risk:-)

View file

@ -8,7 +8,8 @@ on:
push: push:
branches: branches:
- dev - dev
- staged - master
# - staged
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- ".github/**" - ".github/**"
@ -18,7 +19,8 @@ on:
pull_request: pull_request:
branches: branches:
- dev - dev
- staged - master
# - staged
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- ".github/**" - ".github/**"
@ -111,5 +113,5 @@ jobs:
Windows built with: msvc64 Visual studio 2019 Windows built with: msvc64 Visual studio 2019
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle. goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
AppImage built with: Ubuntu-20.04 ,latest gcc AppImage built with: Ubuntu-20.04 ,latest gcc
macos built with: ${{ matrix.os }},clang_64 macos built with: macos-10.15,macos-11.0,clang_64
This is a prerelease version ,auto build by github action. use on your on risk:-) This is a prerelease version ,auto build by github action. use on your on risk:-)

View file

@ -8,7 +8,8 @@ on:
push: push:
branches: branches:
- dev - dev
- staged - master
# - staged
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- ".github/**" - ".github/**"
@ -18,7 +19,8 @@ on:
pull_request: pull_request:
branches: branches:
- dev - dev
- staged - master
# - staged
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- ".github/**" - ".github/**"
@ -148,5 +150,5 @@ jobs:
Windows built with: msvc64 Visual studio 2019 Windows built with: msvc64 Visual studio 2019
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle. goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
AppImage built with: Ubuntu-20.04 ,latest gcc AppImage built with: Ubuntu-20.04 ,latest gcc
macos built with: ${{ matrix.os }},clang_64 macos built with: macos-10.15,macos-11.0,clang_64
This is a prerelease version ,auto build by github action. use on your on risk:-) This is a prerelease version ,auto build by github action. use on your on risk:-)

View file

@ -134,6 +134,12 @@ a:hover {
display: none; display: none;
} }
/* Headers */
h3 {
color: inherit;
font-family: Arial;
}
/* The first headword in a (possibly) multi-headword DSL article */ /* The first headword in a (possibly) multi-headword DSL article */
.gdarticlebody > div:first-child .dsl_headwords, .gdarticlebody > div:first-child .dsl_headwords,
.gdarticlebody > h3:first-child { .gdarticlebody > h3:first-child {
@ -162,12 +168,6 @@ code::selection {
background: #839EC7; background: #839EC7;
} }
/* Headers */
h3 {
color: inherit;
font-family: Arial;
}
/******** DSL Dictionaries ****************/ /******** DSL Dictionaries ****************/
/* DSL headwords */ /* DSL headwords */

View file

@ -218,14 +218,11 @@ QString ArticleView::scrollToFromDictionaryId( QString const & dictionaryId )
return scrollToPrefix + dictionaryId; return scrollToPrefix + dictionaryId;
} }
ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm, ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm, AudioPlayerPtr const & audioPlayer_,
AudioPlayerPtr const & audioPlayer_,
std::vector< sptr< Dictionary::Class > > const & allDictionaries_, std::vector< sptr< Dictionary::Class > > const & allDictionaries_,
Instances::Groups const & groups_, bool popupView_, Instances::Groups const & groups_, bool popupView_, Config::Class const & cfg_,
Config::Class const & cfg_, QAction & openSearchAction_, QAction * dictionaryBarToggled_,
QAction & openSearchAction_, GroupComboBox const * groupComboBox_ ) :
QAction * dictionaryBarToggled_,
GroupComboBox const * groupComboBox_ ):
QFrame( parent ), QFrame( parent ),
articleNetMgr( nm ), articleNetMgr( nm ),
audioPlayer( audioPlayer_ ), audioPlayer( audioPlayer_ ),

View file

@ -349,7 +349,9 @@ static enum DZ_ERRORS dict_read_header( const char *filename,
} }
header->chunks = xmalloc( sizeof( header->chunks[0] ) header->chunks = xmalloc( sizeof( header->chunks[0] )
* header->chunkCount ); * header->chunkCount );
if( header->chunks == 0 ) { if( header->chunks == 0 )
{
fclose( str );
return DZ_ERR_NOMEMORY; return DZ_ERR_NOMEMORY;
} }

View file

@ -553,11 +553,11 @@ CONFIG( chinese_conversion_support ) {
win32-msvc* { win32-msvc* {
LIBS += -lopencc LIBS += -lopencc
} else { } else {
# mac { mac {
# LIBS += -lopencc.2 LIBS += -lopencc.1.1
# } else { } else {
LIBS += -lopencc LIBS += -lopencc
# } }
} }
} }

View file

@ -4392,39 +4392,6 @@ void MainWindow::openDictionaryFolder( const QString & id )
{ {
QString fileName = FsEncoding::decode( dictionaries[ x ]->getDictionaryFilenames()[ 0 ].c_str() ); QString fileName = FsEncoding::decode( dictionaries[ x ]->getDictionaryFilenames()[ 0 ].c_str() );
// Platform-dependent way to launch a file explorer and to select a file,
// currently only on Windows.
#if defined(Q_OS_WIN)
bool explorerLaunched = false;
if ( !QFileInfo( fileName ).isDir() )
{
QString param = QLatin1String("explorer.exe ")
+ QLatin1String("/select, \"") + QDir::toNativeSeparators( fileName ) + QLatin1String("\"");
qDebug() << "Launching" << param;
// We use CreateProcess() directly instead of QProcess::startDetached() since
// startDetached() does some evil things with quotes breaking explorer arguments.
// E.g., the following file cannot be properly selected via startDetached(), due to equals sign,
// which explorer considers as separator:
// Z:\GoldenDict\content\-=MDict=-\Test.mdx
PROCESS_INFORMATION pinfo;
STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
explorerLaunched = CreateProcess(0, (wchar_t*) param.utf16(),
0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
0, &startupInfo, &pinfo);
if ( explorerLaunched ) {
CloseHandle( pinfo.hThread );
CloseHandle( pinfo.hProcess );
}
}
#endif
QString folder = QFileInfo( fileName ).absoluteDir().absolutePath(); QString folder = QFileInfo( fileName ).absoluteDir().absolutePath();
if( !folder.isEmpty() ) if( !folder.isEmpty() )
QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) ); QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) );