Commit graph

97 commits

Author SHA1 Message Date
xiaoyifang d3e6018401
fix: wikipedia open blank page in edge browser (#1003)
* fix: wikipedia open blank page in edge browser

* [autofix.ci] apply automated fixes

---------

Co-authored-by: YiFang Xiao <yifang.xiao@noreply.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-07-25 23:55:41 +08:00
shenleban tongying a4542d8b6c
fix: a few build problems about zim/slob ,epwing (#992)
* fix: a few build problems

* slob should not depends on MAKE_ZIM_SUPPORT
* cmake failed to build when WITH_EPWING disabled.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-07-22 13:50:57 +08:00
YiFang Xiao d25e054a93 opt: replace program dictionary icon 2023-07-21 15:53:53 +08:00
YiFang Xiao 0b087e40f1 opt: replace lsa dictionary icon and zipsound icon 2023-07-21 14:34:09 +08:00
YiFang Xiao 46d62ebf8c opt: replace sounddir dictionary icon 2023-07-21 14:10:40 +08:00
autofix-ci[bot] 0450422959
[autofix.ci] apply automated fixes 2023-07-20 08:05:17 +00:00
shenleban tongying b5349478cf
clean: reformat everything
The next commit will add `.git-blame-ignore-revs`

https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
2023-07-20 04:02:22 -04:00
shenleban tongying 1180f8bc32
fix: website/program should not appears in "AutoGroupByFolder" 2023-07-17 23:27:46 -04:00
xiaoyifang 55fef3e231
opt: use qcache to hold mdx css file (#970)
* opt: use qcache to hold mdx css file

* 🎨 apply clang-format changes

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-07-17 21:51:56 +08:00
YiFang Xiao 119a5ccb6c fix: treat unknown dsl tags as text 2023-07-15 13:27:12 +08:00
YiFang Xiao 7037694ebc fix: code smell 2023-07-14 22:31:29 +08:00
YiFang Xiao 0dc0c015c7 opt: use seperate slob dictionary object to create the fulltext
🎨 apply clang-format changes
2023-07-12 21:14:57 +08:00
YiFang Xiao 40c890b5ca opt: boost slob fulltext speed
and reduce the impact to normal query when create slob fulltext index

🎨 apply clang-format changes
2023-07-12 20:57:02 +08:00
YiFang Xiao 568efee4c7 fix: unicode regex option support 2023-07-09 18:10:30 +08:00
xiaoyifang aeb98e2e57
Merge pull request #935 from xiaoyifang/fix/stardict-syn
opt: limit the number of stardict's extra synonym (from `.syn`) searching
2023-07-08 10:44:18 +08:00
YiFang Xiao 9ca02a1e23 opt: stardict's findHeadwordsForSynonym method does not seem necessary
🎨 apply clang-format changes

🎨 apply clang-format changes
2023-07-08 00:25:30 +08:00
YiFang Xiao 764ebdde35 fix: sounddir dictionary sound file name
🎨 apply clang-format changes
2023-07-07 21:40:38 +08:00
YiFang Xiao 9bbb23e5d4 fix: when search hypen alone will result too much unnecessary result.
fix #928
2023-07-06 15:24:01 +08:00
YiFang Xiao e971d2be67 opt: dsl target url 2023-07-01 14:08:48 +08:00
shenleban tongying fa27f32146
clean: unify how data added to dataRequestInstant 2023-06-24 17:36:10 -04:00
xiaoyifang 5d3f1a3e3d
Merge pull request #899 from shenlebantongying/datareq_append_str
clean: unify DataRequest string data appends
2023-06-24 14:28:01 +08:00
shenleban tongying e06606ba3c
clean: unify DataRequest string data appends 2023-06-23 12:23:32 -04:00
YiFang Xiao f909413caa fix: code smells 2023-06-23 09:28:35 +08:00
YiFang Xiao 3b935e7660 fix: possible null object
refactor: group widget currentindex logic
2023-06-22 21:30:30 +08:00
xiaoyifang 04a58d6418
opt: dsl remove useless method and refactor langcodes logic (#889)
* opt: dsl remove useless method and refactor langcodes logic

* 🎨 apply clang-format changes

* opt: remove useless code

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-06-21 20:47:49 +08:00
shenleban tongying 4432de9d50
clean: remove duplicated exCantReadFile definitions
Obviously, it is a result of copy-paste programming
2023-06-19 18:54:17 -04:00
shenleban tongying a76ef3dfdd
guard against null img for ZIM 2023-06-19 05:01:27 -04:00
shenleban tongying 1589e14b70
clean: remove redundant dictionaryNativeIcon
`dictionaryNativeIcon` was intended to access the original icon before none-square icons were transformed into squares.

`dictionaryNativeIcon` is only used in dictionaryBar, but according to the intention, it shouldn't.

In reality, `dictionaryNativeIcon` is almost always equal to `dictionaryIcon`.
2023-06-18 22:37:07 -04:00
shenleban tongying feda879a30
feat: load and display ZIM dictionary icon
* Original GD never tries to load zim format's icon
* This leverage the capability provided by libzim
2023-06-18 05:25:38 -04:00
xiaoyifang 16f853b68b
fix: qtimer release memory (#863)
* fix: memory leakage
2023-06-16 08:37:33 +08:00
YiFang Xiao 318e186215 fix: slob fullindex will freeze the preference dialog 2023-06-11 21:33:25 +08:00
YiFang Xiao 04ed15434e fix: remove duplicate logic 2023-06-09 21:36:12 +08:00
YiFang Xiao 6a7dd65728 fix: remove too old code logic
reasons:
1. if the replacement is important ,then the code should not care about the length (size() < 70)
2.  ' ' has been replaced with uC2A0 which is incorrect.  u00A0 is expected.
2023-06-09 19:53:34 +08:00
xiaoyifang 67ed24c61c
fix: support dsl dictionary utf encoding detection (#830)
* fix: support dsl dictionary utf encoding detection

* fix: code smells

* fix: code smells

* 🎨 apply clang-format changes

* fix: adjust linefeed

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-06-09 08:01:45 +08:00
YiFang Xiao eccc3eaf0f Revert "opt: mdx video url"
This reverts commit 2bd5194c91.

accidently merged.
2023-06-06 23:45:04 +08:00
YiFang Xiao c2ff1e804f QDomDocument changed the implementation of setContent 2023-06-06 15:37:47 +08:00
xiaoyifang 671427803a
fix: replace suggestion list with QCompleter (#808)
* fix: replace suggestionList with QCompleter


* 🎨 apply clang-format changes


* fix: code smells

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-06-05 21:22:20 +08:00
YiFang Xiao dcfee63b22 fix: wikipedia query parameter is incorrect 2023-06-05 20:58:04 +08:00
shenleban tongying b06c01beeb
fix: xdxf2html converter failed to parser xml due to &nbsp;
* xml don't have &nbsp;
* in Qt5, this is not a problem because QDomDocument::setContent will
 somehow accept it.
* in Qt6, this will be rejected
2023-06-04 07:38:14 -04:00
YiFang Xiao 29403f4263 fix: code smells
🎨 apply clang-format changes

fix: code smells

🎨 apply clang-format changes

🎨 apply clang-format changes
2023-06-03 14:07:41 +08:00
YiFang Xiao 1391a8fa7e fix: invalid data access of data field
bgl_babylon.cc

fix #770
2023-06-03 14:07:41 +08:00
YiFang Xiao 0c7d7ada21 fix: invalid data access of data field
bgl_babylon.cc

fix #768
2023-06-03 14:07:41 +08:00
YiFang Xiao 49c6ae7032 opt: iconv remove unused parameter
In GoldenDict, the application uses utf-8 as the default encoding. There should be no other use.
2023-06-03 14:07:18 +08:00
xiaoyifang 5899aa7c94
fix: highlight fts search result (#792)
* fix: highlight fts search result

* 🎨 apply clang-format changes

* remove accent/diacritic handler used in fts search

* header file adjustment

* fix: qt5.15 compile

* fix: code smell

use const reference variable

* fix: code smell

* fix: code smell

* fix: code smell

* fix: code smell

* 🎨 apply clang-format changes

* fix: code smells

🎨 apply clang-format changes

* opt: fix code smells

remove unused parameters from function `ftsIndexIsOldOrBad`

🎨 apply clang-format changes

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-06-03 08:29:19 +08:00
YiFang Xiao 2bd5194c91 opt: mdx video url 2023-06-02 21:47:48 +08:00
xiaoyifang 4147770f85
Opt: ftshelper refactor (#760)
* opt: remove useless ftshelper methods

🎨 apply clang-format changes

opt: slob use xapian as fulltext engine

🎨 apply clang-format changes

opt: refactor ftshelper

🎨 apply clang-format changes

* opt: refactor ftshelper

remove unused variabes and functions.

* 🎨 apply clang-format changes

* opt: refactor ftshelper

remove unused variabes and functions.

* opt: refactor ftshelper

remove unused variabes and functions.

🎨 apply clang-format changes

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-05-31 07:42:31 +08:00
shenleban tongying 0079cd2933 clean: remove unnecessary header includes
* remove all <QtGUI> which includes *everything* of Qt
* remove unused headers
2023-05-30 20:59:51 +08:00
YiFang Xiao 15e0fa087f opt: replace Mutex::Lock with QMutexLocker 2023-05-30 00:08:01 +08:00
xiaoyifang 4eb8374a35
opt: mdx fulltext lock seperated with normal search (#759)
* opt: refactor mdx fullindex creation

* opt: incremental fulltext creation logic change

* opt: incremental fulltext creation logic change

* opt: progress of fulltext creation logic

* opt: code smell

* fix: code smell

* fix: code smell

* fix: code smell

* fix: code smell

* fix: code smell

* 🎨 apply clang-format changes

* fix: code smell

* fix: code smell

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
2023-05-29 00:01:21 +08:00
xiaoyifang 3858932ec4
feat!: add libzim dependency (#725)
* feat!: add libzim dependency

* 🎨 apply clang-format changes

* action: add libzim dependency to action

* feat!: change dependency folder

* action: add zim support

* feat!: add libzim support

* action: fix sonarcloud check

* doc: add libzim readme

* action: cmake build

* action: cmake check

* fix: code smell

* action: cmake check

* action: cmake on Macos

* action: cmake on Macos

* feat: use libzim to read title and description

* 🎨 apply clang-format changes

* feat: split zim file support

* feat: loadArticle refactor

* 🎨 apply clang-format changes

* 🎨 apply clang-format changes

* feat: update library and goldendict.pro

* 🎨 apply clang-format changes

* fix:word count

* 🎨 apply clang-format changes

* fix: video src url subsititue

* 🎨 apply clang-format changes

* zim: headword is not usually a valid

it is from title and url.

* fix: remove nested try catch

* zim: fix resource loading issue.

* 🎨 apply clang-format changes

* action: remove libao

* zim: process url

some old zim dictionary url does not contain namespace such as
/C/url

make the old and new zim dictionary's url consistent without the leading
../C/  etc.

* 🎨 apply clang-format changes

* zim: process url

remove leading dot and slash
such as ../-/assets  ,remove ../

* 🎨 apply clang-format changes

* zim: remove resourceIndex creation

use libzim to read the resource directly.

* zim: only iterate all the articles

* 🎨 apply clang-format changes

* fix: code smell

* 🎨 apply clang-format changes

* zim: refactor method to convert url to wstring

* 🎨 apply clang-format changes

* fix:code smell

* 🎨 apply clang-format changes

* zim: update windows dependencies

* zim: add mutex lock

* 🎨 apply clang-format changes

* fix: code smell

* 🎨 apply clang-format changes

---------

Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-27 12:12:16 +08:00