diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c7e23dd75..c4c52a702 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,4 +1,7 @@ -name: MacOS +name: macos +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true on: workflow_dispatch: push: @@ -90,8 +93,8 @@ jobs: branch: ${{ github.ref_name }} commit: ${{ steps.vars.outputs.sha_short }} Qt version: ${{ matrix.qt_ver }} ${{ matrix.qt_arch }} + 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. + AppImage built with: Ubuntu-20.04 ,latest gcc macos built with: ${{ matrix.os }},clang_64 - - This is a prerelease version ,auto build by github action. use on your on risk:-) - - \ No newline at end of file + This is a prerelease version ,auto build by github action. use on your on risk:-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 6355695a7..b0a1e4d7f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -109,6 +109,7 @@ jobs: commit: ${{ steps.vars.outputs.sha_short }} Qt version: ${{ matrix.qt_ver }} ${{ matrix.qt_arch }} 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. AppImage built with: Ubuntu-20.04 ,latest gcc - - This is a prerelease version ,auto build by github action. use on your on risk:-) + macos built with: ${{ matrix.os }},clang_64 + This is a prerelease version ,auto build by github action. use on your on risk:-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0ba31c303..35b490160 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -148,5 +148,5 @@ jobs: 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. AppImage built with: Ubuntu-20.04 ,latest gcc - + macos built with: ${{ matrix.os }},clang_64 This is a prerelease version ,auto build by github action. use on your on risk:-) diff --git a/article-style-st-lingoes-blue.css b/article-style-st-lingoes-blue.css index fb3eefb7c..21dedbdf4 100644 --- a/article-style-st-lingoes-blue.css +++ b/article-style-st-lingoes-blue.css @@ -226,9 +226,6 @@ h3 { -webkit-border-radius: 100px; text-align: center; vertical-align: text-bottom; -} - -.dsl_s_wav a { color: #FFF; border: 1px solid #798415; -webkit-box-shadow: 1px 1px #CCC, inset -1px -1px #4E7500; diff --git a/article-style.css b/article-style.css index 8103aea63..5e720bd11 100644 --- a/article-style.css +++ b/article-style.css @@ -791,6 +791,8 @@ div.xdxf font-style: italic; } +.mwiki td.mw-label { vertical-align: top; } +.mwiki td.mw-submit { white-space: nowrap; } /** * Forms */ @@ -801,9 +803,6 @@ div.xdxf .mwiki body.rtl td.mw-input { text-align: right; } .mwiki body.rtl td.mw-submit { text-align: right; } -.mwiki td.mw-label { vertical-align: top; } -.mwiki td.mw-submit { white-space: nowrap; } - /** * Image captions */ diff --git a/mainwindow.cc b/mainwindow.cc index 876945cb1..e21412d89 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -3566,7 +3566,7 @@ void MainWindow::on_saveArticle_triggered() // Pull and save resources to files for ( vector< pair< QUrl, QString > >::const_iterator i = downloadResources.begin(); - i != downloadResources.end(); i++ ) + i != downloadResources.end(); ++i ) { ResourceToSaveHandler * handler = view->saveResource( i->first, i->second ); if( !handler->isEmpty() ) @@ -4391,11 +4391,11 @@ void MainWindow::openDictionaryFolder( const QString & id ) if( dictionaries[ x ]->getDictionaryFilenames().size() > 0 ) { QString fileName = FsEncoding::decode( dictionaries[ x ]->getDictionaryFilenames()[ 0 ].c_str() ); - bool explorerLaunched = false; // 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 ") @@ -4425,12 +4425,9 @@ void MainWindow::openDictionaryFolder( const QString & id ) } #endif - if ( !explorerLaunched ) - { - QString folder = QFileInfo( fileName ).absoluteDir().absolutePath(); - if( !folder.isEmpty() ) - QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) ); - } + QString folder = QFileInfo( fileName ).absoluteDir().absolutePath(); + if( !folder.isEmpty() ) + QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) ); } break; } diff --git a/mdictparser.cc b/mdictparser.cc index ca0ae4556..e121ee075 100644 --- a/mdictparser.cc +++ b/mdictparser.cc @@ -165,7 +165,7 @@ bool MdictParser::readNextHeadWordIndex( MdictParser::HeadWordIndex & headWordIn return false; headWordIndex = splitHeadWordBlock( decompressed ); - headWordBlockInfosIter_++; + ++headWordBlockInfosIter_; return true; } diff --git a/mdx.cc b/mdx.cc index 3545210ff..816d94bdb 100644 --- a/mdx.cc +++ b/mdx.cc @@ -848,7 +848,7 @@ void MddResourceRequest::run() catch ( File::exCantOpen & ) { for ( vector< sptr< IndexedMdd > >::const_iterator i = dict.mddResources.begin(); - i != dict.mddResources.end(); i++ ) + i != dict.mddResources.end(); ++i ) { sptr< IndexedMdd > mddResource = *i; if ( mddResource->loadFile( resourceName, data ) ) @@ -1272,7 +1272,7 @@ QString MdxDictionary::getCachedFileName( QString filename ) catch ( File::exCantOpen & ) { for ( vector< sptr< IndexedMdd > >::const_iterator i = mddResources.begin(); - i != mddResources.end(); i++ ) + i != mddResources.end(); ++i ) { sptr< IndexedMdd > mddResource = *i; if ( mddResource->loadFile( resourceName, data ) ) @@ -1447,7 +1447,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f { vector< sptr< Dictionary::Class > > dictionaries; - for ( vector< string >::const_iterator i = fileNames.begin(); i != fileNames.end(); i++ ) + for ( vector< string >::const_iterator i = fileNames.begin(); i != fileNames.end(); ++i ) { // Skip files with the extensions different to .mdx to speed up the // scanning @@ -1477,7 +1477,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f initializing.indexingDictionary( title ); for ( vector< string >::const_iterator mddIter = dictFiles.begin() + 1; - mddIter != dictFiles.end(); mddIter++ ) + mddIter != dictFiles.end(); ++mddIter ) { if ( File::exists( *mddIter ) ) { @@ -1576,7 +1576,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f idxHeader.styleSheetCount = styleSheets.size(); for ( MdictParser::StyleSheets::const_iterator iter = styleSheets.begin(); - iter != styleSheets.end(); iter++ ) + iter != styleSheets.end(); ++iter ) { string styleBegin( iter->second.first.toUtf8().constData() ); string styleEnd( iter->second.second.toUtf8().constData() ); @@ -1607,7 +1607,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f // Build index info for each mdd file vector< IndexInfo > mddIndexInfos; for ( vector< sptr< IndexedWords > >::const_iterator mddIndexIter = mddIndices.begin(); - mddIndexIter != mddIndices.end(); mddIndexIter++ ) + mddIndexIter != mddIndices.end(); ++mddIndexIter ) { IndexInfo resourceIdxInfo = BtreeIndexing::buildIndex( *( *mddIndexIter ), idx ); mddIndexInfos.push_back( resourceIdxInfo ); diff --git a/processwrapper.cc b/processwrapper.cc index 9d5258306..0359e9632 100644 --- a/processwrapper.cc +++ b/processwrapper.cc @@ -112,7 +112,7 @@ unsigned int ProcessWrapper::findProcess(const char *name, unsigned int pid_skip QDir pd("/proc"); QFileInfoList list = pd.entryInfoList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot); QFileInfoList::iterator it, it_end = list.end(); - for (it = list.begin(); it != it_end; it++) + for (it = list.begin(); it != it_end; ++it) { const QFileInfo &fi = *it; if (fi.baseName().at(0).isDigit()) { diff --git a/resources/gd-builtin.js b/resources/gd-builtin.js index b553cbf2b..023fb4463 100644 --- a/resources/gd-builtin.js +++ b/resources/gd-builtin.js @@ -59,7 +59,7 @@ function gdExpandOptPart(expanderId, optionalId) { d2.style.display = 'none'; } } -}; +} function emitClickedEvent(){ try{ diff --git a/winlibs/include/ao/ao_private.h b/winlibs/include/ao/ao_private.h deleted file mode 100644 index c3c50aa52..000000000 --- a/winlibs/include/ao/ao_private.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * - * ao_private.c - * - * Copyright (C) Stan Seibert - July 2001 - * - * This file is part of libao, a cross-platform audio output library. See - * README for a history of this source code. - * - * libao is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * libao is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __AO_PRIVATE_H__ -#define __AO_PRIVATE_H__ - -/* --- Operating System Compatibility --- */ - -/* - OpenBSD systems with a.out binaries require dlsym()ed symbols to be - prepended with an underscore, so we need the following nasty #ifdef - hack. -*/ -#if defined(__OpenBSD__) && !defined(__ELF__) -#define dlsym(h,s) dlsym(h, "_" s) -#endif - -/* RTLD_NOW is the preferred symbol resolution behavior, but - * some platforms do not support it. The autoconf script will have - * already defined DLOPEN_FLAG if the default is unacceptable on the - * current platform. - * - * ALSA requires RTLD_GLOBAL. - */ -#if !defined(DLOPEN_FLAG) -#define DLOPEN_FLAG (RTLD_NOW | RTLD_GLOBAL) -#endif - -/* --- Constants --- */ - -#ifndef AO_SYSTEM_CONFIG -#define AO_SYSTEM_CONFIG "/etc/libao.conf" -#endif -#ifndef AO_USER_CONFIG -#define AO_USER_CONFIG "/.libao" -#endif - -/* --- Structures --- */ - -typedef struct ao_config { - char *default_driver; -} ao_config; - -typedef enum { - AO_OUTPUT_MATRIX_UNDEFINED=0, /* matrix unset */ - AO_OUTPUT_MATRIX_FIXED=1, /* fixed, immutable channel order, eg, ALSA */ - AO_OUTPUT_MATRIX_COLLAPSIBLE=2, /* fixed order but only used channels sent, eg MACOS */ - AO_OUTPUT_MATRIX_PERMUTABLE=3, /* channel map is fully permutable. eg Pulse */ -} ao_outorder; - -struct ao_device { - int type; /* live output or file output? */ - int driver_id; - ao_functions *funcs; - FILE *file; /* File for output if this is a file driver */ - - /* input not necessarily == output. Right now, byte order, channel - count, and channel mappings may be altered. */ - - int client_byte_format; - int machine_byte_format; - int driver_byte_format; - char *swap_buffer; - int swap_buffer_size; /* Bytes allocated to swap_buffer */ - - int input_channels; - int output_channels; - int bytewidth; - int rate; - - ao_outorder output_matrix_order; - char *output_matrix; /* physical output channel - ordering/numbering matrix set by - driver if there's a channel - name->number mapping useful to the - backend driver in some way. Eg, - Pulse has fully permutable input - channel masks, but specific channels - locations (eg, 'Center') still have - assigned numbers even if not a - specific slot int he input - interleave. */ - int output_mask; - int *input_map; /* input permutation mapping from each - input channel to a location in the - output_matrix. Made by ao_open, - intended for convenience use by - driver in device open. */ - - char *inter_matrix; /* channel matrix as presented to the - backend API */ - int *inter_permute; /* maps from each channel in the - inter_matrix back to an input channel - (if any) */ - - void *internal; /* Pointer to driver-specific data */ - - int verbose; -}; - -struct ao_functions { - int (*test)(void); - ao_info* (*driver_info)(void); - int (*device_init)(ao_device *device); - int (*set_option)(ao_device *device, const char *key, - const char *value); - int (*open)(ao_device *device, ao_sample_format *format); - int (*play)(ao_device *device, const char *output_samples, - uint_32 num_bytes); - int (*close)(ao_device *device); - void (*device_clear)(ao_device *device); - const char* (*file_extension)(void); -}; - -/* --- Functions --- */ - -void ao_read_config_files (ao_config *config); - -#define adebug(format, ...) {\ - if(!device || device->verbose==2){ \ - if(strcmp(format,"\n")){ \ - if(device && device->funcs->driver_info()->short_name){ \ - fprintf(stderr,"ao_%s debug: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \ - }else{ \ - fprintf(stderr,"debug: " format,__VA_ARGS__); \ - } \ - }else{ \ - fprintf(stderr,"\n"); \ - } \ - } \ - } - -#define averbose(format, ...) {\ - if(!device || device->verbose>0){ \ - if(strcmp(format,"\n")){ \ - if(device && device->funcs->driver_info()->short_name){ \ - fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \ - }else{ \ - fprintf(stderr,"info: " format,__VA_ARGS__); \ - } \ - }else{ \ - fprintf(stderr,"\n"); \ - } \ - } \ - } - -#define ainfo(format, ...) {\ - if(!device || device->verbose>=0){ \ - if(strcmp(format,"\n")){ \ - if(device && device->funcs->driver_info()->short_name){ \ - fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \ - }else{ \ - fprintf(stderr,"info: " format,__VA_ARGS__); \ - } \ - }else{ \ - fprintf(stderr,"\n"); \ - } \ - } \ - } - -#define awarn(format, ...) {\ - if(!device || device->verbose>=0){ \ - if(strcmp(format,"\n")){ \ - if(device && device->funcs->driver_info()->short_name){ \ - fprintf(stderr,"ao_%s WARNING: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \ - }else{ \ - fprintf(stderr,"WARNING: " format,__VA_ARGS__); \ - } \ - }else{ \ - fprintf(stderr,"\n"); \ - } \ - } \ - } - -#define aerror(format, ...) { \ - if(!device || device->verbose>=0){ \ - if(strcmp(format,"\n")){ \ - if(device && device->funcs->driver_info()->short_name){ \ - fprintf(stderr,"ao_%s ERROR: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \ - }else{ \ - fprintf(stderr,"ERROR: " format,__VA_ARGS__); \ - } \ - }else{ \ - fprintf(stderr,"\n"); \ - } \ - } \ - } - -#endif /* __AO_PRIVATE_H__ */ diff --git a/winlibs/lib/msvc/ao-4.dll b/winlibs/lib/msvc/ao-4.dll new file mode 100644 index 000000000..fc079e68e Binary files /dev/null and b/winlibs/lib/msvc/ao-4.dll differ diff --git a/winlibs/lib/msvc/ao.dll b/winlibs/lib/msvc/ao.dll deleted file mode 100644 index cfc281bd7..000000000 Binary files a/winlibs/lib/msvc/ao.dll and /dev/null differ diff --git a/winlibs/lib/msvc/ao.lib b/winlibs/lib/msvc/ao.lib index 464270218..7334d1676 100644 Binary files a/winlibs/lib/msvc/ao.lib and b/winlibs/lib/msvc/ao.lib differ