Commit graph

3077 commits

Author SHA1 Message Date
yifang.xiao 5f86c33f8d F12 inspect element 2021-12-13 22:45:49 +08:00
yifang.xiao c56407863c use Eventloop to convert async function to sync function.based on current situation ,I think it would be better to keep the sync mode. webengine use aysnc callback,while webkit use sync function 2021-12-13 22:45:39 +08:00
xiaoyifang 303179b410 clean code:
remove qt version check
save geometry
2021-12-13 22:45:35 +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 db2b8e618d update visual studio project file.
actually these files should be removed.
all these files can be autogenerated by VisualStudio extension <Qt Tools>.
2021-12-13 22:45:35 +08:00
yifang.xiao 0365015ac6 clean code:
remove "#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )" check ,the check should always be true based on current situation.
2021-12-13 22:45:33 +08:00
yifang.xiao f39429f35a remove IS_QT_5 2021-12-13 22:45:28 +08:00
yifang.xiao 69db1d4c71 fix conflict 2021-12-13 22:45:20 +08:00
xiaoyifang e7779e5302 fix todo 2021-12-13 22:43:46 +08:00
xiaoyifang 68dcf436fe Update how to debug.md 2021-12-13 22:43:46 +08:00
xiaoyifang e7b52f9b8f Update how to debug.md 2021-12-13 22:43:46 +08:00
xiaoyifang 3058cb241b Update how to debug.md 2021-12-13 22:43:46 +08:00
xiaoyifang 4279e100c2 Create how to debug.md 2021-12-13 22:43:46 +08:00
xiaoyifang 174ba53be2 found dictionaries panel update 2021-12-13 22:43:46 +08:00
xiaoyifang 402add183e clean qt_version < 5 code. 2021-12-13 22:43:46 +08:00
yifang.xiao ab358fb3a5 remove old qt(<5) code. 2021-12-13 22:43:43 +08:00
yifang.xiao 20d51afb8d remove old qt(<5) code. 2021-12-13 22:43:28 +08:00
yifang.xiao 8fa356bf30 vs changes 2021-12-13 22:43:07 +08:00
Igor Kushnir 8260ac87ba Linux-specific: Don't ignore main window close event
If GoldenDict's option "Close to system tray" is checked and
GoldenDict's main window is visible when the user logs out, the logout
is canceled in latest stable versions of KDE Plasma and Xfce desktop
environments (probably in other GNU/Linux desktop environments too, but
they weren't tested). The cause of this unintended and pointless logout
cancellation is ignoring the close event.

Close events are accepted by default. main() calls
`app.setQuitOnLastWindowClosed( false );`. Thus, if the close event is
not touched, the main window is hidden as before this change.
GoldenDict's configuration, history and favorites are still committed
and saved in both KDE Plasma and Xfce when logging out first
closes/hides the main window, then quits GoldenDict.

The change is limited to GNU/Linux because @Abs62 pointed out that
closing the main window breaks global hotkeys on Windows. I have
verified that closing the main window does not break global hotkeys on
GNU/Linux with Qt5 or Qt4. No one has volunteered to test whether the
change is needed on macOS, so it is safer not to apply it there.

Closes #1421.
2021-11-29 11:25:39 +02:00
xiaoyifang 42aece4a26
Merge branch 'goldendict:master' into branch-qt-5.15 2021-11-18 09:45:54 +08:00
xiaoyifang e07e0ec314 remove if 0 dead code 2021-11-17 22:19:32 +08:00
xiaoyifang 857850bbf8 Merge branch 'branch-qt-5.15' of github.com:xiaoyifang/goldendict into branch-qt-5.15 2021-11-17 21:55:16 +08:00
xiaoyifang 46ecc8dcbb bgl dictionary parse error 2021-11-17 21:54:49 +08:00
Abs62 b10cdf685c MDict: A little support for video 2021-11-12 21:26:46 +03:00
xiaoyifang f397a8f68d
Merge branch 'goldendict:master' into branch-qt-5.15 2021-11-11 18:18:36 +08:00
fenuks b9b7067b5b Linux-specific: Optionally store history in XDG_DATA_HOME in Qt5 build
Separate data directory is only used if history file isn't already
present in the configuration directory.

This commit together with two previous ones allows to switch to
layout described in XDG Base Directory specification. Data is not
migrated automatically and old ~/.goldendict home dir has precedence.
If you wish to use standards-compliant locations, move files and
directories manually:

```
CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/goldendict"
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/goldendict"
DATA="${XDG_DATA_HOME:-$HOME/.local/share}/goldendict"
mkdir -p "${CACHE}"
mkdir -p "${DATA}"
mv ~/.goldendict/index "${CACHE}"
mv ~/.goldendict/history "${DATA}"
mv ~/.goldendict/ "${CONFIG}"
```
2021-11-10 18:52:15 +03:00
fenuks ae4eea3513 Linux-specific: Optionally store index in XDG_CACHE_HOME in Qt5 build 2021-11-10 18:52:15 +03:00
fenuks f6742d8fb4 Linux-specific: Optionally use XDG_CONFIG_HOME for config in Qt5 build 2021-11-10 18:52:15 +03:00
fenuks 5de5f18f48 Linux-specific: Use lowercase cache directory name in Qt5 build
Please note that this effectively discards network cache stored in
"${XDG_CACHE_HOME:-$HOME/.cache}/GoldenDict/network". You can safely
delete the obsolete cache directory. If you wish to preserve and
keep using the existing network cache, move it into the new location
manually:

```
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}"
mkdir -p "${CACHE}/goldendict"
mv "${CACHE}/GoldenDict/network" "${CACHE}/goldendict"
rmdir "${CACHE}/GoldenDict"
```

If GoldenDict with this change has been already used, new cache dir
will already have "${CACHE}/goldendict/network", and mv will refuse to
merge directories. In such case, you will need to manually remove it
before moving directory with old cache.
2021-11-10 18:52:15 +03:00
xiaoyifang 8405035d2f refract encoding method 2021-11-06 16:55:51 +08:00
xiaoyifang f0a3df3d6f refract encoding method 2021-11-06 16:26:30 +08:00
xiaoyifang 02a88c98ad load dsl dictionary performance improved 2021-11-06 15:45:36 +08:00
xiaoyifang 2633b32458 load dsl dictionary performance improved 2021-11-06 12:41:26 +08:00
xiaoyifang fb2b667cc5 refract code 2021-10-23 17:37:29 +08:00
yifang cc9fa33733 fix linux compile error 2021-10-23 12:05:16 +08:00
xiaoyifang c9652bbb74 qstream peformance 2021-10-21 22:20:07 +08:00
xiaoyifang 66ed1c0507 optimize javascript scrollIntoView 2021-10-20 23:44:24 +08:00
子湑 e92797a98a fix cmd+C+C not working under Japanese Input 2021-10-20 18:33:58 +03:00
xiaoyifang 9857ed0559 use char32_t as the inner string unit. 2021-10-20 23:02:37 +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 ded545ecf3 fix dictionary parse error:
1,mdx dictionary load error in windows.
2,dsl dictionary load error in windows.
2021-10-19 00:19:25 +08:00
Abs62 519670ad18 Full text search: Fix search in "Wildcards" and "RegExp" modes 2021-10-13 21:15:01 +03:00
yifang c1eef3a228 remove inspector -- useless code 2021-10-05 09:51:51 +08:00
yifang f13c713265 right panel founded dictionaries 2021-10-05 09:23:30 +08:00
xiaoyifang c10d8654bc Merge branch 'fix/foundictionaries' of github.com:xiaoyifang/goldendict into fix/foundictionaries
# Conflicts:
#	articleview.cc
2021-10-04 15:30:37 +08:00
xiaoyifang 09441a8b72 found in dictionaries list widgets 2021-10-04 15:27:49 +08:00
xiaoyifang bbd7fa8716 found in dictionaries list widgets 2021-10-03 19:28:26 +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