Commit graph

3982 commits

Author SHA1 Message Date
Xiao YiFang 4ba3bde576 epwing ,fix reference link not found 2022-12-04 14:15:19 +08:00
xiaoyifang 1e29bbd5ba
Create sonar-project.properties 2022-12-02 14:53:36 +08:00
xiaoyifang e80b277e90
Create build.yml 2022-12-02 14:34:21 +08:00
Xiao YiFang 21451c3ed1 translation: make some format modification in the zh_CN welcome page. 2022-12-01 21:04:09 +08:00
Xiao YiFang e99431fa14 style:fix style warning 2022-12-01 20:52:20 +08:00
Xiao YiFang 4e0219adea clean:remove meaningless log 2022-12-01 19:41:56 +08:00
xiaoyifang b285749a35 Revert "fix: right mouse on the history panel and favorite panel should not trigger the click event."
This reverts commit 80fdb8cb82.
2022-12-01 10:19:48 +08:00
Xiao YiFang c8014b482a ffmpeg decode audio to pcm, remove noise . 2022-11-29 21:19:31 +08:00
Xiao YiFang 131b00e728 accidently replace the eb github url 2022-11-29 20:48:24 +08:00
Xiao YiFang 82aea3ec33 remove ffmpeg deprecated method 2022-11-29 20:20:03 +08:00
Xiao YiFang c239973e16 fix: can not play some certain audio files 2022-11-29 20:20:03 +08:00
shenlebantongying 3f0ca1e456
cmake: add zim to linux and macOS (#234) 2022-11-29 13:37:24 +08:00
xiaoyifang 9c95ec2ac5
Merge pull request #231 from shenlebantongying/staged
Refactor: Replace `sptr` with  `shared_ptr`
2022-11-29 13:36:52 +08:00
shenleban tongying 4452c06c3e Replace sptr with std::shared_ptr
* Make sptr an alias of std::shared_ptr
* Make old sptr's implicit conversion explict through std::make_shared
2022-11-28 22:54:31 -05:00
xiaoyifang 732def3945
Merge pull request #233 from xiaoyifang/fix/qt-action
revert qt-install-action to original version
2022-11-29 10:56:03 +08:00
Xiao YiFang e7d4805e95 revert qt-install-action to original action 2022-11-29 10:16:06 +08:00
shenlebantongying 5a284d5c66
Implement "goldendict://nice" url scheme handler for windows and linux (#227)
* windows: add url scheme goldendict://

* linux: add url scheme goldendict:// handler
2022-11-28 09:24:49 +08:00
Xiao YiFang 53d443357b Merge remote-tracking branch 'gd/master' into staged 2022-11-27 08:55:06 +08:00
Igor Kushnir 02c02829f7 Qt 5.14+: don't use deprecated QString::SkipEmptyParts
This change fixes the following GCC warnings:
warning: ‘QString::SkipEmptyParts’ is deprecated [-Wdeprecated-declarations]
warning: ‘QStringList QString::split(const QString&, SplitBehavior, Qt::CaseSensitivity) const’ is deprecated: Use split(const QString &sep, Qt::SplitBehavior ...) variant instead [-Wdeprecated-declarations]
warning: ‘QStringList QString::split(QChar, SplitBehavior, Qt::CaseSensitivity) const’ is deprecated: Use split(QChar sep, Qt::SplitBehavior ...) variant instead [-Wdeprecated-declarations]
warning: ‘QStringList QString::split(const QRegExp&, SplitBehavior) const’ is deprecated: Use split(const QRegularExpression &, Qt::SplitBehavior) variant instead [-Wdeprecated-declarations]
warning: ‘QStringList QString::split(const QRegularExpression&, SplitBehavior) const’ is deprecated: Use split(const QRegularExpression &, Qt::SplitBehavior) variant instead [-Wdeprecated-declarations]
2022-11-26 20:41:19 +03:00
Xiao YiFang 254aa6c23c Merge branch 'gd-master' into staged 2022-11-26 11:36:19 +08:00
Xiao YiFang 6ae53a8867 Merge commit 'd1ff165' into staged 2022-11-26 11:35:58 +08:00
Xiao YiFang c6baa39c6b Merge commit 'f0b66f7' into staged 2022-11-26 11:35:42 +08:00
shenlebantongying b7e4afbd5b
Add alternative build method "CMakeLists.txt" (#218)
* Add "CMakeLists.txt"

* cmake: initial macOS support

* cmake: initial windows support

* cmake: improve styles

* cmake: add FFmpeg for Linux and macOS

* cmake: add FFmpeg to macOS

* cmake: Carbon typo

* cmake: add epwing to macOS

* cmake: correctly install all files on linux

* cmake: Abolish vcpkg and use winlibs/

* cmake: set version.txt timestamp

* cmake: revert config.cc change

* cmake: remove outdated comment
2022-11-26 11:23:08 +08:00
Igor Kushnir 5034348c1a Allow silencing failed-loading-resource warnings
When a referenced audio resource is not found in a DSL or XDXF
dictionary, GoldenDict searches for this resource by filename in all
other dictionaries within the current group. Naturally, the file is
absent from most dictionaries (see #970). Therefore a "Failed loading
resource" warning is printed for almost every dictionary in the current
group.

These warnings are by far the most frequent on my system. And in the
scenario described above there is nothing wrong at all. So the user may
want to silence these warnings to help notice less frequent and more
important messages. Implement categorized logging to enable this
customization. These warnings can now be disabled by adding the
following line in the [Rules] section of a logging configuration file
(e.g. ~/.config/QtProject/qtlogging.ini on GNU/Linux):
    goldendict.dictionary.resource.warning=false
See also https://doc.qt.io/qt-5/qloggingcategory.html#logging-rules
2022-11-25 22:48:38 +03:00
Igor Kushnir a61b203de7 Extract TO_LOG_MESSAGE() 2022-11-25 22:48:38 +03:00
Igor Kushnir be22bb9ffd Prevent using temporary codec-for-locale UTF8 replacement
Utf8CodecForLocaleReplacer's temporary codec-for-locale replacements
cause race conditions in unrelated code that calls
QTextCodec::codecForLocale(). Implement and use a wrapper function that
calls QTextCodec::codecForLocale() while holding
Utf8CodecForLocaleReplacer's mutex lock to fix it.

f0b66f7507 and this commit fix #1587.

Combine several chained QString::arg() calls into one in
EpwingBook::setErrorString(). A single call is more efficient and
prevents unintended replacement inside previous argument substitutions.
2022-11-25 22:48:38 +03:00
Igor Kushnir 0ae3fdf2bd Extract Utf8CodecForLocaleReplacer 2022-11-25 22:48:38 +03:00
Igor Kushnir a020ebc4b8 Make loggingMutex nonrecursive
A recursive mutex is less efficient and clearly not needed here.
2022-11-25 17:08:01 +03:00
Abs62 d1ff165a65 Slob: Fix handling of a links with anchor 2022-11-24 17:46:20 +03:00
Abs62 f0b66f7507 Use mutex in gdWarning/gdDebug when logging to file is enabled (issue #1587) 2022-11-24 17:44:57 +03:00
Xiao YiFang df2bb387e2 fix : add default groupid to the globalinstance 2022-11-24 20:34:21 +08:00
xiaoyifang 1284846d27 bump alpha version to 22.11.24 2022-11-24 17:04:03 +08:00
xiaoyifang a482a2116d [qt]remove qt6.4.1 in Windows due to bugs in qt 2022-11-24 16:39:01 +08:00
Xiao YiFang c2607dbb31 fix : zim resource link 2022-11-24 07:16:18 +08:00
Xiao YiFang f3975837c4 fix: fix zim resource namespace
remove possible namespace from the article,the namespace should follow the following pattern '/J/resoucename.js' etc
2022-11-23 20:40:19 +08:00
xiaoyifang aa9ed9bc38 fix:zim regression
image can not displayed
2022-11-22 22:12:55 +08:00
Xiao YiFang 4a129005df [github] add both qt6.3.2&qt6.4.1 2022-11-21 20:14:02 +08:00
Xiao YiFang 520345dadc fix a regression caused by commit f730a4aabc
fixed: #210
2022-11-21 20:03:04 +08:00
xiaoyifang 9f7f6169cf
Merge pull request #215 from shenlebantongying/fix-popup
Marketing Overhaul README.md
2022-11-21 17:14:34 +08:00
shenleban tongying 4b4175574b Overhaul README.md 2022-11-21 02:51:39 -05:00
xiaoyifang 9f65f3c1f8
Merge pull request #214 from shenlebantongying/fix-popup
Fix translations accidentally installed at /local
2022-11-21 14:17:31 +08:00
shenlebantongying f5e1ae54c8 Add translations /local/ to mac build 2022-11-21 00:50:15 -05:00
shenleban tongying f22769c73b Fix translations accidentally install at /local 2022-11-21 00:14:53 -05:00
xiaoyifang 75a83b0f81
Merge pull request #207 from shenlebantongying/fix-popup
Overhaul ScanPopup
2022-11-20 19:42:23 +08:00
shenleban tongying 664a1e87e4 Remove ScanPopup Alt mode ("Keys may also be pressed afterwards").
The functionality of "select then press a key to get popup " has equivalent of using Ctrl+C+C on Hotkeys.
2022-11-20 04:12:58 -05:00
shenlebantongying 451fdb5c21 Fix win build with HAVE_X11 2022-11-20 01:51:23 -05:00
shenleban tongying 6e0a6cfa42 refactor & simplify ScanFlag:
All slots of ScanFlag are used just as functions calls.
2022-11-20 01:19:27 -05:00
shenleban tongying 79f8b05d40 Add showScanFlag condition to mainWindow's clipboardChange 2022-11-20 00:39:41 -05:00
shenleban tongying c2cc848cc7 remove forcePopup from showScanFlag signal
That flag isn't use in any of the slots
2022-11-20 00:14:36 -05:00
shenleban tongying 4dc040f11c Remove clipboardChanged connect in scanpopup.cc blindly 2022-11-20 00:02:12 -05:00