Commit graph

92 commits

Author SHA1 Message Date
Xiao YiFang df2bb387e2 fix : add default groupid to the globalinstance 2022-11-24 20:34:21 +08:00
Xiao YiFang f730a4aabc fix: zim dictionary auto refresh logic
fix <meta http-equiv="Refresh"
2022-11-19 15:23:22 +08:00
Xiao YiFang 408f994779 revert gico format from webp to png 2022-10-26 21:00:04 +08:00
Xiao YiFang fcaa00c5c2 opt: debug log 2022-10-22 13:42:17 +08:00
Xiao YiFang 4eedefc585 opt: function refract 2022-10-15 13:58:24 +08:00
Xiao YiFang 2c9fdd5227 gico icon size change from 16x16 to 64x64 2022-10-06 11:27:47 +08:00
Xiao YiFang 547f2a4cd2 remember last link's groupId and muted dictionary 2022-06-08 20:52:44 +08:00
Xiao YiFang 88b265765f add entry:// link support 2022-06-07 21:22:37 +08:00
Xiao YiFang 5f856bf2ae refactor getqueryword 2022-06-07 08:14:53 +08:00
Xiao YiFang 66499007f6 clean code: remove \n in parameter of GD_DPRINTF 2022-06-02 20:11:05 +08:00
Xiao YiFang 9c1a22d142 rename utils getHostBase(QUrl) to getHostBaseFromUrl 2022-05-29 16:00:30 +08:00
Xiao YiFang 7910209ae1 clean code: remove dsl runnable ,remove comment endline carriage 2022-05-29 16:00:28 +08:00
Xiao YiFang c45b4cc255 fix: invalid gdlookup url should be forbidden. 2022-05-28 10:41:28 +08:00
Xiao YiFang bb9811bdf4 clean code: remove unused line 2022-05-23 23:42:52 +08:00
Xiao YiFang d73956b90d opt: change ArticleNetworkAccessManager's method createRequest to getArticleReply
createRequest was the parent's protected method ,give the impression that the derived class has override it.

rename it to clacify the misunderstand.
2022-05-19 07:14:36 +08:00
Xiao YiFang e6ab87ca73 fix:add ifr local scheme
due to iframe security policy and x-frame-option .
the website online dictionary can not work in qt 5.15.2+ version.
this is a workaround to pass through the restriction.
2022-05-15 22:54:26 +08:00
xiaoyifang ac7a70cea1 optimize log message with block request. 2022-04-20 00:40:41 +08:00
xiaoyifang 753f07d3fd optimize:move getHostBase method to utils 2022-04-14 00:24:13 +08:00
xiaoyifang 7385d48b5b optimize:reply deleteLater 2022-03-22 20:29:37 +08:00
xiaoyifang 0d38bcf60f clean: remove stdint_msvc.h
too old
2022-02-26 14:01:34 +08:00
xiaoyifang 0c94406e2a fix merge conflict with feature/deprecated 2022-02-03 17:50:47 +08:00
yifang 262e650779 fix: DPRINTF=>GD_DPRINTF ,DDPRINT does not exist now.
do not affect functionality.only existed in comments.
2022-01-15 15:29:20 +08:00
yifang 713339d66b improve: handle invalid resource url such as bres://upload.wikimedia.... 2022-01-11 22:20:38 +08:00
xiaoyifang 40b2c9e891 refactor code,use default parameter 2022-01-10 20:17:22 +08:00
xiaoyifang be1866db10 fix:resource scheme handler received finished signal twice,more likely to crash the webengine. 2022-01-09 14:30:06 +08:00
xiaoyifang bd6cc8b9c9 fix: resource scheme handler received finished signal twice,more likely to crash the webengine. 2022-01-09 09:52:40 +08:00
yifang 46b4151cc4 improve: replace all the deprecated method before 5.15 2022-01-08 22:08:23 +08:00
yifang c74b0bc6cf fix:return 404 if resource not found 2022-01-08 12:29:33 +08:00
yifang 4157fb387e zim dictionary ,pictures does not show up 2021-12-27 21:15:13 +08:00
xiaoyifang 5eac08c97a rename qt4x5.hh to utils.hh
the filename qt4x5 is not proper now,for the qt4 version can never meet.and the qt5 is actually mean qt>5 .
2021-12-13 22:45:35 +08:00
xiaoyifang 728a5b9651 destroy object ,when request the same url multi times ,the previous request was canceled. 2021-10-19 22:16:44 +08:00
xiaoyifang 09441a8b72 found in dictionaries list widgets 2021-10-04 15:27:49 +08:00
xiaoyifang bdb9561ec9 rename scheme handler 2021-10-02 20:48:49 +08:00
yifang 3bdb1aabb5 minor changes 2021-10-02 11:15:39 +08:00
xiaoyifang fa39e972ce remove useless code 2021-09-25 10:23:03 +08:00
yifang 3b120ee765 1 remove useless code
2 define js variable to avoid js error
2021-09-24 21:42:55 +08:00
yifang d840326717 change link gdlookup://localhost/[word] to gdlookup://localhost?word=[word] 2021-09-24 21:08:54 +08:00
yifang a23409c875 fix:loaded url twice 2021-09-24 20:29:13 +08:00
xiaoyifang bec982c51e remove dead code 2021-09-22 12:01:17 +08:00
yifang e5c72f8ecc change to setcontent 2021-08-21 09:41:40 +08:00
xiaoyifang eddfa075bd connect reply content to article view 2021-08-14 15:25:10 +08:00
xiaoyifang 5967f70c4b remove useless code 2021-08-06 23:10:15 +08:00
xiaoyifang 939a96b7a6 register local scheme gdlookup:// 2021-08-05 14:57:22 +08:00
yifang 54bdf12d8d network manager change 2021-07-24 15:18:46 +08:00
xiaoyifang 3aadf52344 webkit to webengine 2021-07-15 22:58:32 +08:00
Abs62 e1c9a0d6de Fix compilation without C++11 support 2021-06-18 21:33:24 +03:00
Igor Kushnir 60bc05218f Add input phrase's punctuation suffix to alts
Preferences::sanitizeInputPhrase() transforms an input phrase by
removing its whitespace/punctuation prefix and suffix. Translating a
phrase from X11 primary selection or from clipboard, via mouse-over or
from the command line results in such sanitization. This is useful when
a punctuation mark or a space is selected accidentally alongside a word.
This sanitization can be undesirable, however, when an abbreviated word
is selected. For example: "etc.", "e.g.", "i.e.".

This commit implements searching for the input word with the punctuation
suffix preserved as an alternative form of the sanitized word to show
articles for both. For example, when the word "etc." is translated from
the clipboard, both "ETC" and "etc." articles are displayed.

The punctuation suffix is preserved when the word is passed from the
scan popup to the main window and when the translate line text is
refreshed (e.g. when the current group is changed). The suffix is not
stored in history and favorites (doing so would require file format
changes and possibly substantial code changes, this can be implemented
later if need be).

Trim the input phrase once in ArticleNetworkAccessManager::getResource()
instead of verbose trimming in multiple places in
ArticleMaker::makeDefinitionFor().

Closes #1350.
2021-06-17 12:06:36 +03:00
Abs62 a722b3f43d Fix "file://" urls correction for case of launch portable GD via network 2019-08-05 17:51:57 +03:00
Abs62 d7bc012411 Add option to ignore diacritics while articles search 2018-06-13 19:00:42 +03:00
Abs62 eb6dc37470 Qt5: Some more fixes for compilation under early Qt5 versions (issue #990) 2018-04-08 20:25:55 +03:00