Merge pull request #258 from xiaoyifang/staged

merge staged to dev
This commit is contained in:
xiaoyifang 2022-12-16 21:01:18 +08:00 committed by GitHub
commit af973764f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 193 additions and 385 deletions

130
.github/workflows/cmake build test.yml vendored Normal file
View file

@ -0,0 +1,130 @@
name: CMake Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
# push:
# branches:
# - dev
# pull_request:
# types: [opened, synchronize, reopened]
jobs:
job1:
name: ubuntu Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.3.2
arch: gcc_64
cached: 'false'
#serialport linuxdeploy need serialport to work.
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtserialport
setup-python: 'false'
- name: ubuntu install thirdparty dependencies
run: |
sudo apt-get install git pkg-config build-essential
sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev
sudo apt-get install libxtst-dev liblzo2-dev libbz2-dev
sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev
sudo apt-get install doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld
#build opencc
git clone https://github.com/BYVoid/OpenCC
cd OpenCC/
make PREFIX=/usr -j$(nproc)
sudo make install
cd ..
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: Run build-wrapper
run: |
cmake .
cmake --build .
job2:
name: windows Build and analyze
runs-on: windows-2019
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.3.2
arch: win64_msvc2019_64
cached: 'false'
#serialport linuxdeploy need serialport to work.
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtserialport
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: Run build-wrapper
run: |
cmake -S . -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
job3:
name: macos Build and analyze
runs-on: macos-12
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.3.2
arch: clang_64
cached: 'false'
#serialport linuxdeploy need serialport to work.
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtserialport
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: install dependencies
run: |
brew install pcre2 harfbuzz freetype
brew install cmake ninja python
brew install automake
brew install autoconf
brew install libtool
brew install opencc
brew install ffmpeg@5
#brew reinstall $(brew deps ffmpeg) ffmpeg
brew install libao
brew install libiconv
brew install lzo bzip2
brew install libogg
brew install zstd lzip
brew install libtiff
brew install libvorbis --force
brew install hunspell
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2
tar xvjf eb-4.4.3.tar.bz2
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
#brew install qt # or use official offline installer
brew install xz lzo
brew install pkg-config
- name: Run build-wrapper
run: |
cmake .
cmake --build .

View file

@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 0
- name: Set outputs - name: Set outputs
id: githash id: githash
run: | run: |
@ -69,196 +69,10 @@ jobs:
brew install wavpack brew install wavpack
brew install automake fdk-aac git lame libass libtool libvorbis libvpx opus sdl shtool texi2html theora wget x264 x265 xvid nasm brew install automake fdk-aac git lame libass libtool libvorbis libvpx opus sdl shtool texi2html theora wget x264 x265 xvid nasm
brew install speex brew install speex
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --prefix=/usr/local \
--enable-shared \
--disable-static \
--disable-debug \
--disable-programs \
--disable-network \
--disable-avdevice \
--disable-avfilter \
--disable-swscale \
--disable-network \
--disable-muxers \
--disable-demuxers \
--enable-rdft \
--enable-demuxer=aac \
--enable-demuxer=ac3 \
--enable-demuxer=aiff \
--enable-demuxer=ape \
--enable-demuxer=asf \
--enable-demuxer=flac \
--enable-demuxer=matroska \
--enable-demuxer=mp3 \
--enable-demuxer=mpc \
--enable-demuxer=mov \
--enable-demuxer=mpc8 \
--enable-demuxer=ogg \
--enable-demuxer=tta \
--enable-demuxer=wav \
--enable-demuxer=wv \
--disable-bsfs \
--disable-filters \
--disable-parsers \
--enable-parser=aac \
--enable-parser=ac3 \
--enable-parser=mpegaudio \
--disable-protocols \
--disable-indevs \
--disable-outdevs \
--disable-encoders \
--disable-decoders \
--enable-decoder=eightsvx_exp \
--enable-decoder=eightsvx_fib \
--enable-decoder=aac \
--enable-decoder=aac_latm \
--enable-decoder=ac3 \
--enable-decoder=adpcm_4xm \
--enable-decoder=adpcm_adx \
--enable-decoder=adpcm_afc \
--enable-decoder=adpcm_ct \
--enable-decoder=adpcm_ea \
--enable-decoder=adpcm_ea_maxis_xa \
--enable-decoder=adpcm_ea_r1 \
--enable-decoder=adpcm_ea_r2 \
--enable-decoder=adpcm_ea_r3 \
--enable-decoder=adpcm_ea_xas \
--enable-decoder=adpcm_g722 \
--enable-decoder=adpcm_g726 \
--enable-decoder=adpcm_ima_amv \
--enable-decoder=adpcm_ima_apc \
--enable-decoder=adpcm_ima_dk3 \
--enable-decoder=adpcm_ima_dk4 \
--enable-decoder=adpcm_ima_ea_eacs \
--enable-decoder=adpcm_ima_ea_sead \
--enable-decoder=adpcm_ima_iss \
--enable-decoder=adpcm_ima_oki \
--enable-decoder=adpcm_ima_qt \
--enable-decoder=adpcm_ima_smjpeg \
--enable-decoder=adpcm_ima_wav \
--enable-decoder=adpcm_ima_ws \
--enable-decoder=adpcm_ms \
--enable-decoder=adpcm_sbpro_2 \
--enable-decoder=adpcm_sbpro_3 \
--enable-decoder=adpcm_sbpro_4 \
--enable-decoder=adpcm_swf \
--enable-decoder=adpcm_thp \
--enable-decoder=adpcm_xa \
--enable-decoder=adpcm_yamaha \
--enable-decoder=alac \
--enable-decoder=amrnb \
--enable-decoder=libopencore_amrnb \
--enable-decoder=amrwb \
--enable-decoder=libopencore_amrwb \
--enable-decoder=ape \
--enable-decoder=atrac1 \
--enable-decoder=atrac3 \
--enable-decoder=binkaudio_dct \
--enable-decoder=binkaudio_rdft \
--enable-decoder=bmv_audio \
--enable-decoder=comfortnoise \
--enable-decoder=cook \
--enable-decoder=dsicinaudio \
--enable-decoder=dca \
--enable-decoder=eac3 \
--enable-decoder=flac \
--enable-decoder=g723_1 \
--enable-decoder=g729 \
--enable-decoder=gsm \
--enable-decoder=libgsm \
--enable-decoder=gsm_ms \
--enable-decoder=libgsm_ms \
--enable-decoder=iac \
--enable-decoder=imc \
--enable-decoder=interplay_dpcm \
--enable-decoder=mace3 \
--enable-decoder=mace6 \
--enable-decoder=mlp \
--enable-decoder=mp1 \
--enable-decoder=mp1float \
--enable-decoder=mp2 \
--enable-decoder=mp2float \
--enable-decoder=mp3 \
--enable-decoder=mp3float \
--enable-decoder=mp3adu \
--enable-decoder=mp3adufloat \
--enable-decoder=mp3on4 \
--enable-decoder=mp3on4float \
--enable-decoder=als \
--enable-decoder=mpc7 \
--enable-decoder=mpc8 \
--enable-decoder=mp3*,pcm* \
--enable-decoder=nellymoser \
--enable-decoder=libopus \
--enable-decoder=paf_audio \
--enable-decoder=pcm_alaw \
--enable-decoder=pcm_bluray \
--enable-decoder=pcm_dvd \
--enable-decoder=pcm_f32be \
--enable-decoder=pcm_f32le \
--enable-decoder=pcm_f64be \
--enable-decoder=pcm_f64le \
--enable-decoder=pcm_lxf \
--enable-decoder=pcm_mulaw \
--enable-decoder=pcm_s16be \
--enable-decoder=pcm_s16be_planar \
--enable-decoder=pcm_s16le \
--enable-decoder=pcm_s16le_planar \
--enable-decoder=pcm_s24be \
--enable-decoder=pcm_s24daud \
--enable-decoder=pcm_s24le \
--enable-decoder=pcm_s24le_planar \
--enable-decoder=pcm_s32be \
--enable-decoder=pcm_s32le \
--enable-decoder=pcm_s32le_planar \
--enable-decoder=pcm_s8 \
--enable-decoder=pcm_s8_planar \
--enable-decoder=pcm_u16be \
--enable-decoder=pcm_u16le \
--enable-decoder=pcm_u24be \
--enable-decoder=pcm_u24le \
--enable-decoder=pcm_u32be \
--enable-decoder=pcm_u32le \
--enable-decoder=pcm_u8 \
--enable-decoder=pcm_zork \
--enable-decoder=qcelp \
--enable-decoder=qdm2 \
--enable-decoder=ra_144 \
--enable-decoder=ra_288 \
--enable-decoder=ralf \
--enable-decoder=roq_dpcm \
--enable-decoder=s302m \
--enable-decoder=shorten \
--enable-decoder=sipr \
--enable-decoder=smackaud \
--enable-decoder=sol_dpcm \
--enable-decoder=sonic \
--enable-decoder=libspeex \
--enable-decoder=tak \
--enable-decoder=truehd \
--enable-decoder=truespeech \
--enable-decoder=tta \
--enable-decoder=twinvq \
--enable-decoder=vima \
--enable-decoder=vmdaudio \
--enable-decoder=vorbis \
--enable-decoder=ffwavesynth \
--enable-decoder=wavpack \
--enable-decoder=ws_snd1 \
--enable-decoder=wmalossless \
--enable-decoder=wmapro \
--enable-decoder=wmav1 \
--enable-decoder=wmav2 \
--enable-decoder=wmavoice \
--enable-decoder=xan_dpcm \
--enable-libmp3lame \
--enable-libspeex
make brew tap homebrew-ffmpeg/ffmpeg
sudo make install brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-speex
cd ..
brew install libiconv brew install libiconv
brew install lzo bzip2 brew install lzo bzip2
brew install libogg brew install libogg
@ -296,12 +110,14 @@ jobs:
mv ${targetName}.app ./tmp mv ${targetName}.app ./tmp
# --background "installer_background.png" # --background "installer_background.png"
create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/ create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/
- name: Generate changelog - name: Release Changelog Builder
if: ${{!env.prerelease}} id: changelog
id: changelog1 uses: mikepenz/release-changelog-builder-action@v3.5.0
uses: metcalfc/changelog-generator@v3.0.0 env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
myToken: ${{ secrets.GITHUB_TOKEN }} # ignorePreReleases: true
commitMode: true
- name: Set outputs - name: Set outputs
id: vars id: vars
@ -312,20 +128,6 @@ jobs:
echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')"
echo "::set-output name=release_hm::$(date +'%y%m%d')" echo "::set-output name=release_hm::$(date +'%y%m%d')"
- name: changelog
if: $${{env.prerelease}}
id: changelog2
run: |
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'\"'/'%22'}"
CHANGELOG="${CHANGELOG//"'"/ }"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
# tag 上传Release # tag 上传Release
- name: uploadRelease - name: uploadRelease
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
@ -355,5 +157,4 @@ jobs:
Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]** Filename pattern: **[Qt version]-GoldenDict-[OS]-[release-date].[ext]**
CHANGES: CHANGES:
${{ steps.changelog1.outputs.changelog }} ${{ steps.changelog.outputs.changelog }}
${{ steps.changelog2.outputs.COMMIT_SUMMARY }}

View file

@ -75,8 +75,6 @@ jobs:
previousTag=$(git tag --sort=-creatordate | sed -n 1p |cut -c 2-) previousTag=$(git tag --sort=-creatordate | sed -n 1p |cut -c 2-)
echo "$previousTag">version.txt echo "$previousTag">version.txt
cat version.txt cat version.txt
pwd
ls
# # msvc编译 # # msvc编译
- uses: ilammy/msvc-dev-cmd@v1 - uses: ilammy/msvc-dev-cmd@v1

4
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "eb"] [submodule "eb"]
path = eb path = thirdparty/eb
url = git@github.com:xiaoyifang/simple-eb.git url = https://github.com/xiaoyifang/simple-eb.git

View file

@ -5,14 +5,18 @@ cmake_minimum_required(VERSION 3.23)
# LINUX, APPLE and MSVC are used to detect system # LINUX, APPLE and MSVC are used to detect system
option(WITH_FFMPEG_PLAYER "Enable support for FFMPEG player" ON) option(WITH_FFMPEG_PLAYER "Enable support for FFMPEG player" ON)
option(WITH_EPWING_SUPPORT "Enable epwing support" ON)
# Remove this once cmake 5.25 becomes minimum version # Remove this once cmake 5.25 becomes minimum version
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
set(LINUX TRUE) set(LINUX TRUE)
endif() endif()
if (APPLE) if (APPLE)
add_subdirectory(eb) if(WITH_EPWING_SUPPORT)
add_subdirectory(thirdparty/eb)
endif()
include_directories(/usr/local/include /opt/homebrew/include)
endif () endif ()
project(goldendict project(goldendict
@ -76,9 +80,12 @@ if(LINUX)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
pkg_check_modules (LIBXTST IMPORTED_TARGET xtst) pkg_check_modules (LIBXTST IMPORTED_TARGET xtst)
add_library(libeb SHARED IMPORTED) if(WITH_EPWING_SUPPORT)
set_target_properties(libeb PROPERTIES IMPORTED_LOCATION /usr/lib/libeb.so) add_subdirectory(thirdparty/eb EXCLUDE_FROM_ALL)
set_target_properties(libeb PROPERTIES INCLUDE_DIRECTORIES /usr/include/) endif()
# add_library(libeb SHARED IMPORTED)
# set_target_properties(libeb PROPERTIES IMPORTED_LOCATION /usr/lib/libeb.so)
# set_target_properties(libeb PROPERTIES INCLUDE_DIRECTORIES /usr/include/)
endif() endif()
#### Compile time files and preprocessor flags #### Compile time files and preprocessor flags
@ -144,7 +151,7 @@ set(UI_SRC
scanpopup.ui scanpopup.ui
sources.ui sources.ui
) )
if(WITH_EPWING_SUPPORT)
set(EPWING_SUPPORT_SRC set(EPWING_SUPPORT_SRC
epwing.cc epwing.cc
epwing.hh epwing.hh
@ -153,6 +160,9 @@ set(EPWING_SUPPORT_SRC
epwing_charmap.cc epwing_charmap.cc
epwing_charmap.hh epwing_charmap.hh
) )
else()
add_compile_definitions(NO_EPWING_SUPPORT)
endif()
if (APPLE) if (APPLE)
set(MAC_SRC set(MAC_SRC
@ -471,6 +481,9 @@ if(MSVC)
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
${CMAKE_SOURCE_DIR}/winlibs/include/ ${CMAKE_SOURCE_DIR}/winlibs/include/
) )
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif() endif()
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
@ -485,14 +498,18 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
) )
if(APPLE) if(APPLE)
if(WITH_EPWING_SUPPORT)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE eb) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE eb)
endif() endif()
endif()
if(UNIX) if(UNIX)
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
${PROJECT_SOURCE_DIR}/thirdparty)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
# pkg-config packages need manually link # pkg-config packages need manually link
PkgConfig::PKGCONFIG_DEPS PkgConfig::PKGCONFIG_DEPS
BZip2::BZip2 BZip2::BZip2
ZLIB::ZLIB #hidden requirement of dsl_details.cc and more? ZLIB::ZLIB #hidden requirement of dsl_details.cc and more?
) )
@ -507,7 +524,11 @@ endif()
if(LINUX) if(LINUX)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE libeb X11 PkgConfig::LIBXTST) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE X11 PkgConfig::LIBXTST)
if(WITH_EPWING_SUPPORT)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE eb )
endif()
endif () endif ()
if(APPLE) if(APPLE)

View file

@ -242,7 +242,7 @@ QNetworkReply * ArticleNetworkAccessManager::getArticleReply( QNetworkRequest co
if( url.scheme() == "https") if( url.scheme() == "https")
{ {
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( reply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( reply, SIGNAL( sslErrors( QList< QSslError > ) ),
reply, SLOT( ignoreSslErrors() ) ); reply, SLOT( ignoreSslErrors() ) );
#endif #endif

View file

@ -151,43 +151,6 @@
<height>70</height> <height>70</height>
</size> </size>
</property> </property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>223</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>223</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>212</red>
<green>208</green>
<blue>200</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="toolTip"> <property name="toolTip">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -214,43 +177,6 @@
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="infoLabel"> <widget class="QPlainTextEdit" name="infoLabel">
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>223</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>223</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>212</red>
<green>208</green>
<blue>200</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="toolTip"> <property name="toolTip">
<string notr="true"/> <string notr="true"/>
</property> </property>

1
eb

@ -1 +0,0 @@
Subproject commit cda417343ceedcb4b44e37e54590979f59c748c9

View file

@ -13,7 +13,11 @@ system(git describe --tags --always --dirty): hasGit=1
GIT_HASH=$$system(git rev-parse --short=8 HEAD ) GIT_HASH=$$system(git rev-parse --short=8 HEAD )
} }
!exists( version.txt ) {
message( "generate version.txt...." )
system(echo $${VERSION}.$${GIT_HASH} on $${_DATE_} > version.txt) system(echo $${VERSION}.$${GIT_HASH} on $${_DATE_} > version.txt)
}
!CONFIG( verbose_build_output ) { !CONFIG( verbose_build_output ) {
!win32|*-msvc* { !win32|*-msvc* {

View file

@ -82,7 +82,7 @@ using std::wstring;
using std::map; using std::map;
using std::pair; using std::pair;
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
class InitSSLRunnable : public QRunnable class InitSSLRunnable : public QRunnable
{ {
@ -157,7 +157,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
if( QThreadPool::globalInstance()->maxThreadCount() < MIN_THREAD_COUNT ) if( QThreadPool::globalInstance()->maxThreadCount() < MIN_THREAD_COUNT )
QThreadPool::globalInstance()->setMaxThreadCount( MIN_THREAD_COUNT ); QThreadPool::globalInstance()->setMaxThreadCount( MIN_THREAD_COUNT );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
QThreadPool::globalInstance()->start( new InitSSLRunnable ); QThreadPool::globalInstance()->start( new InitSSLRunnable );
#endif #endif
@ -1197,6 +1197,8 @@ void MainWindow::applyQtStyleSheet( QString const & displayStyle, QString const
darkPalette.setColor( QPalette::Disabled, QPalette::Text, disabledColor ); darkPalette.setColor( QPalette::Disabled, QPalette::Text, disabledColor );
darkPalette.setColor( QPalette::Button, darkColor ); darkPalette.setColor( QPalette::Button, darkColor );
darkPalette.setColor( QPalette::ButtonText, Qt::white ); darkPalette.setColor( QPalette::ButtonText, Qt::white );
darkPalette.setColor( QPalette::Dark, QColor( 35, 35, 35 ) );
darkPalette.setColor( QPalette::Shadow, QColor( 20, 20, 20 ) );
darkPalette.setColor( QPalette::Disabled, QPalette::ButtonText, disabledColor ); darkPalette.setColor( QPalette::Disabled, QPalette::ButtonText, disabledColor );
darkPalette.setColor( QPalette::BrightText, Qt::red ); darkPalette.setColor( QPalette::BrightText, Qt::red );
darkPalette.setColor( QPalette::Link, QColor( 42, 130, 218 ) ); darkPalette.setColor( QPalette::Link, QColor( 42, 130, 218 ) );

View file

@ -135,7 +135,7 @@ MediaWikiWordSearchRequest::MediaWikiWordSearchRequest( wstring const & str,
connect( netReply.get(), SIGNAL( finished() ), connect( netReply.get(), SIGNAL( finished() ),
this, SLOT( downloadFinished() ) ); this, SLOT( downloadFinished() ) );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( netReply.get(), SIGNAL( sslErrors( QList< QSslError > ) ), connect( netReply.get(), SIGNAL( sslErrors( QList< QSslError > ) ),
netReply.get(), SLOT( ignoreSslErrors() ) ); netReply.get(), SLOT( ignoreSslErrors() ) );
@ -279,7 +279,7 @@ void MediaWikiArticleRequest::addQuery( QNetworkAccessManager & mgr,
connect( netReply, &QNetworkReply::errorOccurred, this, [=](QNetworkReply::NetworkError e){ connect( netReply, &QNetworkReply::errorOccurred, this, [=](QNetworkReply::NetworkError e){
qDebug()<< "error:"<<e; qDebug()<< "error:"<<e;
} ); } );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ),
netReply, SLOT( ignoreSslErrors() ) ); netReply, SLOT( ignoreSslErrors() ) );

View file

@ -168,43 +168,6 @@
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="dictionaryDescription"> <widget class="QPlainTextEdit" name="dictionaryDescription">
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>223</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>223</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>212</red>
<green>208</green>
<blue>200</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
@ -266,43 +229,6 @@
<height>65</height> <height>65</height>
</size> </size>
</property> </property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>222</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>222</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>224</red>
<green>223</green>
<blue>222</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>

1
thirdparty/eb vendored Submodule

@ -0,0 +1 @@
Subproject commit b4d020bee71b10c8fc1d15beb5849c5b19fd5fa1

View file

@ -15,7 +15,7 @@ redirectCount( 0 )
reply = mgr.get( QNetworkRequest( url ) ); reply = mgr.get( QNetworkRequest( url ) );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( reply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( reply, SIGNAL( sslErrors( QList< QSslError > ) ),
reply, SLOT( ignoreSslErrors() ) ); reply, SLOT( ignoreSslErrors() ) );
#endif #endif
@ -52,7 +52,7 @@ void WebMultimediaDownload::replyFinished( QNetworkReply * r )
} }
reply = mgr.get( QNetworkRequest( redirectUrl ) ); reply = mgr.get( QNetworkRequest( redirectUrl ) );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( reply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( reply, SIGNAL( sslErrors( QList< QSslError > ) ),
reply, SLOT( ignoreSslErrors() ) ); reply, SLOT( ignoreSslErrors() ) );
#endif #endif

View file

@ -140,7 +140,7 @@ WebSiteArticleRequest::WebSiteArticleRequest( QString const & url_,
request.setAttribute( QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy ); request.setAttribute( QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy );
netReply = mgr.get( request ); netReply = mgr.get( request );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ),
netReply, SLOT( ignoreSslErrors() ) ); netReply, SLOT( ignoreSslErrors() ) );
#endif #endif
@ -173,7 +173,7 @@ void WebSiteArticleRequest::requestFinished( QNetworkReply * r )
disconnect( netReply, 0, 0, 0 ); disconnect( netReply, 0, 0, 0 );
netReply->deleteLater(); netReply->deleteLater();
netReply = mgr.get( QNetworkRequest( redirectUrl ) ); netReply = mgr.get( QNetworkRequest( redirectUrl ) );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ),
netReply, SLOT( ignoreSslErrors() ) ); netReply, SLOT( ignoreSslErrors() ) );
#endif #endif
@ -449,7 +449,7 @@ WebSiteResourceRequest::WebSiteResourceRequest( QString const & url_,
netReply = mgr.get( QNetworkRequest( reqUrl ) ); netReply = mgr.get( QNetworkRequest( reqUrl ) );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ),
netReply, SLOT( ignoreSslErrors() ) ); netReply, SLOT( ignoreSslErrors() ) );
#endif #endif
@ -482,7 +482,7 @@ void WebSiteResourceRequest::requestFinished( QNetworkReply * r )
disconnect( netReply, 0, 0, 0 ); disconnect( netReply, 0, 0, 0 );
netReply->deleteLater(); netReply->deleteLater();
netReply = mgr.get( QNetworkRequest( redirectUrl ) ); netReply = mgr.get( QNetworkRequest( redirectUrl ) );
#ifndef QT_NO_OPENSSL #ifndef QT_NO_SSL
connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ), connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ),
netReply, SLOT( ignoreSslErrors() ) ); netReply, SLOT( ignoreSslErrors() ) );
#endif #endif