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
shenlebantongying
e0c193bcb6
Let scanPopup always constructed
...
Before: Construst Scanpopup only when both enableClipboardHotkey and enableScanPopup are true
Now: Always construct ScanPopup so that users can freely enable Copy->ScanPopup through navbar or tray
2022-11-19 22:35:06 -05:00
shenlebantongying
8232bc208d
scan popup: Fix windows build
2022-11-19 21:54:22 -05:00
shenleban tongying
0d186dc33d
fix: modifier keys should only affect Selection
2022-11-19 21:15:23 -05:00
shenleban tongying
06a296c99f
Put conditions on the ClipboardChange for X11
2022-11-19 13:48:26 -05:00
shenleban tongying
e6b9810cc7
Group Selection related Settings together
2022-11-19 12:28:11 -05:00
shenleban tongying
a4359bef3c
Only process clipboard change when scanning enabled
2022-11-19 12:08:57 -05:00
shenleban tongying
20b435053f
X11: Add two Preferences to optional tracking clipboard or selection tracking
2022-11-19 11:35:25 -05:00
shenleban tongying
9d9ad3ecc9
rename enableScanPopupAction
to enableScanningAction
which now governs both popup and sendToMainWindow kinds of scanning
2022-11-19 10:40:57 -05:00
shenleban tongying
b3b740854a
Unify trackClipboardChanges and enableScanPopupAction
...
* There is no difference between those two on Windows and MacOS which only support clipboard (Ctrl+C) scanning
* Q_WS_X11 was defined on Qt4, and it causes the super weird trackClipboardChanges to occur on Windows
2022-11-19 10:30:31 -05:00
shenleban tongying
aa3778bb64
Remove enableScanPopup: Complete. Remove from config file and ui file
...
At here, all code working exactly same as before
The only change is that ScanPopup always enabled for all users
2022-11-19 09:50:20 -05:00
shenleban tongying
eb5806503a
Remove enableScanPopup: Respect navBar toggling more
...
* Always construct Scan Popup object regardless of the setting
2022-11-19 09:30:58 -05:00
shenleban tongying
edbc4d32cd
Remove enableScanPopup: Let Scan popup's 💡 on navBar always visible
2022-11-19 09:25:53 -05:00
shenleban tongying
92bdec7119
Rename QAction * enableScanPopup
...
There is a var named exactly the same used in the same file!
2022-11-19 09:04:04 -05:00
Xiao YiFang
dc29111e88
[win] remove multimedia plugin manual copy. qt6.4.1 has fixed this qt6.4.0 bug
2022-11-19 20:19:47 +08:00
Xiao YiFang
2b614d53ee
[mac] add ffmpeg build script
2022-11-19 20:14:45 +08:00
Xiao YiFang
aec6cf7c5a
add zh_CN translation of About dialog
2022-11-19 19:31:10 +08:00