mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Compare commits
24 commits
2b3a7a26fa
...
4631a59d6f
Author | SHA1 | Date | |
---|---|---|---|
4631a59d6f | |||
dcc4579544 | |||
d3ad40f988 | |||
081cba6b23 | |||
59f9b3d04f | |||
f6434f4219 | |||
f694c3210e | |||
02143921f4 | |||
c864a9a897 | |||
618310f772 | |||
f8f62efa6e | |||
a61bcb1629 | |||
70d21d7eca | |||
8ad7291147 | |||
8d0859b932 | |||
349fcb6628 | |||
7a1df4b6c6 | |||
285a0d8882 | |||
8be7b65f29 | |||
fb45d2e036 | |||
d15081e723 | |||
673911b1c5 | |||
b6fa66df92 | |||
2f48993594 |
|
@ -12,3 +12,6 @@ b5349478cfb0dc2dd0de8c8e8aeebdd24cf7ac6b
|
||||||
|
|
||||||
# mass apply clang-tidy's readability-braces-around-statements
|
# mass apply clang-tidy's readability-braces-around-statements
|
||||||
a11c9e3aeca4329e1982d8fe26bacbb21ab50ddf
|
a11c9e3aeca4329e1982d8fe26bacbb21ab50ddf
|
||||||
|
|
||||||
|
# mass apply clang-tidy's modernize-use-using
|
||||||
|
d15081e723756eef053550dc9e06e31d7828dec3
|
||||||
|
|
2
.github/workflows/Release-all.yml
vendored
2
.github/workflows/Release-all.yml
vendored
|
@ -147,7 +147,7 @@ jobs:
|
||||||
if [[ '${{env.prerelease}}' == 'true' ]]
|
if [[ '${{env.prerelease}}' == 'true' ]]
|
||||||
then
|
then
|
||||||
echo "This is a pre-release"
|
echo "This is a pre-release"
|
||||||
previousTag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
|
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "Release" | head -n 1)
|
||||||
else
|
else
|
||||||
echo "This is not a pre-release"
|
echo "This is not a pre-release"
|
||||||
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | head -n 1)
|
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | head -n 1)
|
||||||
|
|
|
@ -192,6 +192,12 @@ endif ()
|
||||||
|
|
||||||
#### Compile definitions
|
#### Compile definitions
|
||||||
|
|
||||||
|
# Disable deprecated staffs for Qt<=6.7 (Bump this if ever consider bump Qt version)
|
||||||
|
target_compile_definitions(${GOLDENDICT} PRIVATE
|
||||||
|
QT_DISABLE_DEPRECATED_UP_TO=0x060700
|
||||||
|
QT_NO_DEPRECATED_WARNINGS
|
||||||
|
)
|
||||||
|
|
||||||
target_compile_definitions(${GOLDENDICT} PUBLIC
|
target_compile_definitions(${GOLDENDICT} PUBLIC
|
||||||
CMAKE_USED_HACK # temporal hack to avoid breaking qmake build
|
CMAKE_USED_HACK # temporal hack to avoid breaking qmake build
|
||||||
MAKE_QTMULTIMEDIA_PLAYER
|
MAKE_QTMULTIMEDIA_PLAYER
|
||||||
|
@ -266,15 +272,25 @@ if (APPLE)
|
||||||
set(Assembling_Dir "${CMAKE_BINARY_DIR}/redist")
|
set(Assembling_Dir "${CMAKE_BINARY_DIR}/redist")
|
||||||
set(App_Name "${GOLDENDICT}.app")
|
set(App_Name "${GOLDENDICT}.app")
|
||||||
set(Redistributable_APP "${Assembling_Dir}/${App_Name}")
|
set(Redistributable_APP "${Assembling_Dir}/${App_Name}")
|
||||||
|
|
||||||
|
# if anything wrong, delete this and affect lines, and see what's Qt will generate by default.
|
||||||
|
set(QtConfPath "${Redistributable_APP}/Contents/Resources/qt.conf")
|
||||||
|
|
||||||
qt_generate_deploy_script(
|
qt_generate_deploy_script(
|
||||||
TARGET ${GOLDENDICT}
|
TARGET ${GOLDENDICT}
|
||||||
OUTPUT_SCRIPT deploy_script
|
OUTPUT_SCRIPT deploy_script
|
||||||
CONTENT "qt_deploy_runtime_dependencies(
|
CONTENT "
|
||||||
|
set(QT_DEPLOY_PREFIX \"${Redistributable_APP}\")
|
||||||
|
set(QT_DEPLOY_TRANSLATIONS_DIR \"Contents/Resources/translations\")
|
||||||
|
qt_deploy_runtime_dependencies(
|
||||||
EXECUTABLE \"${Redistributable_APP}\"
|
EXECUTABLE \"${Redistributable_APP}\"
|
||||||
GENERATE_QT_CONF
|
GENERATE_QT_CONF
|
||||||
NO_APP_STORE_COMPLIANCE
|
NO_APP_STORE_COMPLIANCE)
|
||||||
)"
|
qt_deploy_translations()
|
||||||
|
qt_deploy_qt_conf(\"${QtConfPath}\"
|
||||||
|
PLUGINS_DIR PlugIns
|
||||||
|
TRANSLATIONS_DIR Resources/translations)
|
||||||
|
"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${GOLDENDICT} BUNDLE DESTINATION "${Assembling_Dir}")
|
install(TARGETS ${GOLDENDICT} BUNDLE DESTINATION "${Assembling_Dir}")
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
qtwebengine_zh_CN.ts is used to fixed some right context menu on webengine.
|
|
||||||
|
|
||||||
The previous qt_* rename to qt_extra_* to distinguish between the locale language.These qt_extra*.ts are also used to fix GUI translation issues as qt has not provided an update version about these language.
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,467 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="zh_CN">
|
|
||||||
<context>
|
|
||||||
<name>DownloadInterruptReason</name>
|
|
||||||
<message>
|
|
||||||
<source>Unknown reason or not interrupted</source>
|
|
||||||
<translation>未知原因或非中断</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>General file operation failure</source>
|
|
||||||
<translation>文件操作失败</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The file cannot be written locally, due to access restrictions</source>
|
|
||||||
<translation>由于访问限制,该文件无法在本地写入</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Insufficient space on the target drive</source>
|
|
||||||
<translation>目标驱动器上的空间不足</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The directory or file name is too long</source>
|
|
||||||
<translation>目录或文件名太长</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The file size exceeds the file system limitation</source>
|
|
||||||
<translation>文件大小超过文件系统限制</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The file is infected with a virus</source>
|
|
||||||
<translation>该文件感染了病毒</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Temporary problem (for example file in use, or too many open files)</source>
|
|
||||||
<translation>临时问题(例如文件正在使用或打开的文件太多)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The file was blocked due to local policy</source>
|
|
||||||
<translation>由于本地政策,该文件被阻止</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Checking the safety of the download failed due to unexpected reasons</source>
|
|
||||||
<translation>由于意外原因,检查下载的安全性失败</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>File seek past the end of a file (resuming previously interrupted download)</source>
|
|
||||||
<translation>文件搜索超过文件末尾(恢复先前中断的下载)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The partial file did not match the expected hash</source>
|
|
||||||
<translation>部分文件与预期的哈希不匹配</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>General network failure</source>
|
|
||||||
<translation>一般网络故障</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The network operation has timed out</source>
|
|
||||||
<translation>网络操作超时</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The network connection has been terminated</source>
|
|
||||||
<translation>网络连接已终止</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The server has gone down</source>
|
|
||||||
<translation>服务器宕机了</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The network request was invalid (for example, the URL or scheme is invalid)</source>
|
|
||||||
<translation>网络请求无效(例如,URL或scheme无效)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>General server failure</source>
|
|
||||||
<translation>一般服务器故障</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The server does not have the requested data</source>
|
|
||||||
<translation>服务器没有请求的数据</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>The server did not authorize access to the resource</source>
|
|
||||||
<translation>服务器未授权访问资源</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>A problem with the server certificate occurred</source>
|
|
||||||
<translation>服务器证书出现问题</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Access forbidden by the server</source>
|
|
||||||
<translation>服务器禁止访问</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Unexpected server response</source>
|
|
||||||
<translation>意外的服务器响应</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Download canceled by the user</source>
|
|
||||||
<translation>下载被用户取消</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QQuickPdfDocument</name>
|
|
||||||
<message>
|
|
||||||
<source>no error</source>
|
|
||||||
<translation>无错误</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>data not yet available</source>
|
|
||||||
<translation>数据不可用</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>file not found</source>
|
|
||||||
<translation>文件未找到</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>invalid file format</source>
|
|
||||||
<translation>无效文件格式</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>incorrect password</source>
|
|
||||||
<translation>密码错误</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>unsupported security scheme</source>
|
|
||||||
<translation>不支持的安全方案</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>unknown error</source>
|
|
||||||
<translation>未知错误</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QQuickWebEngineView</name>
|
|
||||||
<message>
|
|
||||||
<source>Stop</source>
|
|
||||||
<translation>停止</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Reload and Bypass Cache</source>
|
|
||||||
<translation>重新加载和绕过缓存</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Open link in this window</source>
|
|
||||||
<translation>在当前窗口中打开链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Toggle Play/Pause</source>
|
|
||||||
<translation>播放/暂停</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Toggle Mute</source>
|
|
||||||
<translation>静音</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Close Page</source>
|
|
||||||
<translation>关闭页面</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Unselect</source>
|
|
||||||
<translation>取消选择</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Bold</source>
|
|
||||||
<translation>加粗(&B)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Italic</source>
|
|
||||||
<translation>斜体(&I)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Underline</source>
|
|
||||||
<translation>下划线(&U)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Strikethrough</source>
|
|
||||||
<translation>删除线(&S)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Left</source>
|
|
||||||
<translation>左对齐(&L)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Center</source>
|
|
||||||
<translation>居中(&C)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Right</source>
|
|
||||||
<translation>右对齐(&R)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Justified</source>
|
|
||||||
<translation>对齐(&J)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Indent</source>
|
|
||||||
<translation>缩进(&I)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Outdent</source>
|
|
||||||
<translation>突出(&O)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Insert &Ordered List</source>
|
|
||||||
<translation>插入有序列表(&O)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Insert &Unordered List</source>
|
|
||||||
<translation>插入无序列表(&U)</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QWebEnginePage</name>
|
|
||||||
<message>
|
|
||||||
<source>Stop</source>
|
|
||||||
<translation>停止</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Reload and Bypass Cache</source>
|
|
||||||
<translation>重新加载和绕过缓存</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Toggle Play/Pause</source>
|
|
||||||
<translation>播放/暂停</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Toggle Mute</source>
|
|
||||||
<translation>静音</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Close Page</source>
|
|
||||||
<translation>关闭页面</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Unselect</source>
|
|
||||||
<translation>取消选择</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Are you sure you want to leave this page? Changes that you made may not be saved.</source>
|
|
||||||
<translation>您确定要离开此页面吗? 您所做的更改不会被保存。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Open link in this window</source>
|
|
||||||
<translation>在当前窗口中打开链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Open link in new background tab</source>
|
|
||||||
<translation>在新的后台选项卡中打开链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Bold</source>
|
|
||||||
<translation>加粗(&B)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Italic</source>
|
|
||||||
<translation>斜体(&I)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Underline</source>
|
|
||||||
<translation>下划线(&U)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Strikethrough</source>
|
|
||||||
<translation>删除线(&S)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Left</source>
|
|
||||||
<translation>左对齐(&L)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Center</source>
|
|
||||||
<translation>居中(&C)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Right</source>
|
|
||||||
<translation>右对齐(&R)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Align &Justified</source>
|
|
||||||
<translation>对齐(&J)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Indent</source>
|
|
||||||
<translation>缩进(&I)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Outdent</source>
|
|
||||||
<translation>突出(&O)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Insert &Ordered List</source>
|
|
||||||
<translation>插入有序列表(&O)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Insert &Unordered List</source>
|
|
||||||
<translation>插入无序列表(&U)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Select folder to upload</source>
|
|
||||||
<translation>选择要上传的文件夹</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QtWebEnginePlugin</name>
|
|
||||||
<message>
|
|
||||||
<source>Cannot create separate instance of WebEngineNewViewRequest</source>
|
|
||||||
<translation>无法创建 WebEngineNewViewRequest 的单独实例</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cannot create separate instance of %1</source>
|
|
||||||
<translation>无法创建 %1 的单独实例</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QtWebEngineTestSupportPlugin</name>
|
|
||||||
<message>
|
|
||||||
<source>Cannot create a separate instance of WebEngineErrorPage</source>
|
|
||||||
<translation>无法创建 WebEngineErrorPage 的单独实例</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cannot create a separate instance of WebEngineTestEvent</source>
|
|
||||||
<translation>无法创建单独的 WebEngineTestEvent 实例</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>RenderViewContextMenuQt</name>
|
|
||||||
<message>
|
|
||||||
<source>Back</source>
|
|
||||||
<translation>后退</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Forward</source>
|
|
||||||
<translation>前进</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Reload</source>
|
|
||||||
<translation>重载</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cut</source>
|
|
||||||
<translation>剪切</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Copy</source>
|
|
||||||
<translation>复制</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Paste</source>
|
|
||||||
<translation>粘贴</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Undo</source>
|
|
||||||
<translation>撤销</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Redo</source>
|
|
||||||
<translation>恢复</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Select all</source>
|
|
||||||
<translation>全选</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Paste and match style</source>
|
|
||||||
<translation>粘贴并匹配样式</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Open link in new window</source>
|
|
||||||
<translation>在新窗口中打开链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Open link in new tab</source>
|
|
||||||
<translation>在新页签中打开链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Copy link address</source>
|
|
||||||
<translation>复制链接地址</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Save link</source>
|
|
||||||
<translation>保存链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Copy image</source>
|
|
||||||
<translation>复制图片</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Copy image address</source>
|
|
||||||
<translation>复制图片地址</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Save image</source>
|
|
||||||
<translation>保存图片</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Copy media address</source>
|
|
||||||
<translation>复制媒体链接</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Show controls</source>
|
|
||||||
<translation>显示控制</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Loop</source>
|
|
||||||
<translation>循环</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Save media</source>
|
|
||||||
<translation>保存媒体</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Inspect</source>
|
|
||||||
<translation>审核</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Exit full screen</source>
|
|
||||||
<translation>退出全屏</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Save page</source>
|
|
||||||
<translation>保存页面</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>View page source</source>
|
|
||||||
<translation>查看页面源代码</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>UIDelegatesManager</name>
|
|
||||||
<message>
|
|
||||||
<source>Javascript Alert - %1</source>
|
|
||||||
<translation>Javascript-警告 - %1</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Javascript Confirm - %1</source>
|
|
||||||
<translation>Javascript-确认 - %1</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Javascript Prompt - %1</source>
|
|
||||||
<translation>Javascript-提醒 - %1</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Are you sure you want to leave this page?</source>
|
|
||||||
<translation>您确定要离开当前页面吗?</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Changes that you made may not be saved.</source>
|
|
||||||
<translation>您所做的更改不会被保存。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Connect to proxy "%1" using:</source>
|
|
||||||
<translation>使用以下命令连接到代理“%1”:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Enter username and password for "%1" at %2://%3</source>
|
|
||||||
<translation>在 %2://%3 输入“%1”的用户名和密码</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>WebContentsAdapter</name>
|
|
||||||
<message>
|
|
||||||
<source>HTTP-POST data can only be sent over HTTP(S) protocol</source>
|
|
||||||
<translation>HTTP-POST 数据只能通过 HTTP(S) 协议发送</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef ANKICONNECTOR_H
|
#pragma once
|
||||||
#define ANKICONNECTOR_H
|
|
||||||
|
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
|
||||||
|
@ -29,5 +28,3 @@ signals:
|
||||||
private slots:
|
private slots:
|
||||||
void finishedSlot( QNetworkReply * reply );
|
void finishedSlot( QNetworkReply * reply );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ANKICONNECTOR_H
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTextDocumentFragment>
|
#include <QTextDocumentFragment>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QStyleHints>
|
||||||
|
|
||||||
#include "fmt/core.h"
|
#include "fmt/core.h"
|
||||||
#include "fmt/compile.h"
|
#include "fmt/compile.h"
|
||||||
|
@ -151,7 +152,22 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, QString const &
|
||||||
result += R"(<script src="qrc:///scripts/gd-builtin.js"></script>)";
|
result += R"(<script src="qrc:///scripts/gd-builtin.js"></script>)";
|
||||||
result += R"(<script src="qrc:///scripts/mark.min.js"></script>)";
|
result += R"(<script src="qrc:///scripts/mark.min.js"></script>)";
|
||||||
|
|
||||||
if ( GlobalBroadcaster::instance()->getPreference()->darkReaderMode ) {
|
/// Handling Dark reader mode.
|
||||||
|
|
||||||
|
bool darkReaderModeEnabled = false;
|
||||||
|
|
||||||
|
if ( GlobalBroadcaster::instance()->getPreference()->darkReaderMode == Config::Dark::On ) {
|
||||||
|
darkReaderModeEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 0 )
|
||||||
|
if ( GlobalBroadcaster::instance()->getPreference()->darkReaderMode == Config::Dark::Auto
|
||||||
|
&& QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark ) {
|
||||||
|
darkReaderModeEnabled = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if ( darkReaderModeEnabled ) {
|
||||||
//only enable this darkmode on modern style.
|
//only enable this darkmode on modern style.
|
||||||
if ( cfg.displayStyle == "modern" ) {
|
if ( cfg.displayStyle == "modern" ) {
|
||||||
result += R"(<link href="qrc:///article-style-darkmode.css" media="all" rel="stylesheet" type="text/css">)";
|
result += R"(<link href="qrc:///article-style-darkmode.css" media="all" rel="stylesheet" type="text/css">)";
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __ARTICLE_MAKER_HH_INCLUDED__
|
#pragma once
|
||||||
#define __ARTICLE_MAKER_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
@ -101,8 +100,8 @@ class ArticleRequest: public Dictionary::DataRequest
|
||||||
|
|
||||||
/// A sequence of words and spacings between them, including the initial
|
/// A sequence of words and spacings between them, including the initial
|
||||||
/// spacing before the first word and the final spacing after the last word.
|
/// spacing before the first word and the final spacing after the last word.
|
||||||
typedef QList< QString > Words;
|
using Words = QList< QString >;
|
||||||
typedef QList< QString > Spacings;
|
using Spacings = QList< QString >;
|
||||||
|
|
||||||
/// Splits the given string into words and spacings between them.
|
/// Splits the given string into words and spacings between them.
|
||||||
std::pair< Words, Spacings > splitIntoWords( QString const & );
|
std::pair< Words, Spacings > splitIntoWords( QString const & );
|
||||||
|
@ -158,6 +157,3 @@ private:
|
||||||
int findEndOfCloseDiv( QString const &, int pos );
|
int findEndOfCloseDiv( QString const &, int pos );
|
||||||
bool isCollapsable( Dictionary::DataRequest & req, QString const & dictId );
|
bool isCollapsable( Dictionary::DataRequest & req, QString const & dictId );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __ARTICLE_NETMGR_HH_INCLUDED__
|
#pragma once
|
||||||
#define __ARTICLE_NETMGR_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QtNetwork>
|
#include <QtNetwork>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
@ -242,4 +241,3 @@ private:
|
||||||
ArticleNetworkAccessManager & mManager;
|
ArticleNetworkAccessManager & mManager;
|
||||||
QNetworkAccessManager mgr;
|
QNetworkAccessManager mgr;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __AUDIOLINK_HH_INCLUDED__
|
#pragma once
|
||||||
#define __AUDIOLINK_HH_INCLUDED__
|
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -15,5 +14,3 @@
|
||||||
/// The dictionary id is used to make active dictionary feature work.
|
/// The dictionary id is used to make active dictionary feature work.
|
||||||
std::string addAudioLink( std::string const & url, std::string const & dictionaryId );
|
std::string addAudioLink( std::string const & url, std::string const & dictionaryId );
|
||||||
std::string addAudioLink( QString const & url, std::string const & dictionaryId );
|
std::string addAudioLink( QString const & url, std::string const & dictionaryId );
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef AUDIOOUTPUT_H
|
#pragma once
|
||||||
#define AUDIOOUTPUT_H
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
|
@ -22,6 +21,3 @@ private:
|
||||||
Q_DISABLE_COPY( AudioOutput )
|
Q_DISABLE_COPY( AudioOutput )
|
||||||
Q_DECLARE_PRIVATE( AudioOutput )
|
Q_DECLARE_PRIVATE( AudioOutput )
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // AUDIOOUTPUT_H
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef AUDIOPLAYERFACTORY_HH_INCLUDED
|
#pragma once
|
||||||
#define AUDIOPLAYERFACTORY_HH_INCLUDED
|
|
||||||
|
|
||||||
#include "audioplayerinterface.hh"
|
#include "audioplayerinterface.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -33,5 +32,3 @@ private:
|
||||||
QString audioPlaybackProgram;
|
QString audioPlaybackProgram;
|
||||||
AudioPlayerPtr playerPtr;
|
AudioPlayerPtr playerPtr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUDIOPLAYERFACTORY_HH_INCLUDED
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef AUDIOPLAYERINTERFACE_HH_INCLUDED
|
#pragma once
|
||||||
#define AUDIOPLAYERINTERFACE_HH_INCLUDED
|
|
||||||
|
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -26,6 +25,4 @@ signals:
|
||||||
void error( QString message );
|
void error( QString message );
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QScopedPointer< AudioPlayerInterface > AudioPlayerPtr;
|
using AudioPlayerPtr = QScopedPointer< AudioPlayerInterface >;
|
||||||
|
|
||||||
#endif // AUDIOPLAYERINTERFACE_HH_INCLUDED
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#ifndef BASE_TYPE_H
|
#pragma once
|
||||||
#define BASE_TYPE_H
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
typedef QMap< QString, QString > Contexts;
|
using Contexts = QMap< QString, QString >;
|
||||||
#endif // BASE_TYPE_H
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __EX_HH_INCLUDED__
|
#pragma once
|
||||||
#define __EX_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -47,5 +46,3 @@
|
||||||
} \
|
} \
|
||||||
virtual ~exName() noexcept {} \
|
virtual ~exName() noexcept {} \
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __FILETYPE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __FILETYPE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -31,5 +30,3 @@ bool isNameOfCSS( string const & );
|
||||||
bool isNameOfSvg( string const & name );
|
bool isNameOfSvg( string const & name );
|
||||||
|
|
||||||
} // namespace Filetype
|
} // namespace Filetype
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __FOLDING_HH_INCLUDED__
|
#pragma once
|
||||||
#define __FOLDING_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "wstring.hh"
|
#include "wstring.hh"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -90,5 +89,3 @@ QString escapeWildcardSymbols( QString const & );
|
||||||
bool isCombiningMark( wchar ch );
|
bool isCombiningMark( wchar ch );
|
||||||
|
|
||||||
} // namespace Folding
|
} // namespace Folding
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __GDDEBUG_HH_INCLUDED__
|
#pragma once
|
||||||
#define __GDDEBUG_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
|
@ -28,5 +27,3 @@ void gdDebug( const char *, ... )
|
||||||
;
|
;
|
||||||
|
|
||||||
extern QFile * logFilePtr;
|
extern QFile * logFilePtr;
|
||||||
|
|
||||||
#endif // __GDDEBUG_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef GLOBAL_GLOBALBROADCASTER_H
|
#pragma once
|
||||||
#define GLOBAL_GLOBALBROADCASTER_H
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -47,5 +46,3 @@ signals:
|
||||||
|
|
||||||
void indexingDictionary( QString );
|
void indexingDictionary( QString );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GLOBAL_GLOBALBROADCASTER_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef GLOBALREGEX_HH
|
#pragma once
|
||||||
#define GLOBALREGEX_HH
|
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
@ -78,5 +77,3 @@ const static QRegularExpression markSpace( R"([\p{M}\p{Z}\p{C}])", QRegularExpre
|
||||||
const static QRegularExpression whiteSpace( "\\s+" );
|
const static QRegularExpression whiteSpace( "\\s+" );
|
||||||
|
|
||||||
} // namespace RX
|
} // namespace RX
|
||||||
|
|
||||||
#endif // GLOBALREGEX_HH
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __HTMLESCAPE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __HTMLESCAPE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -33,5 +32,3 @@ QString fromHtmlEscaped( QString const & str );
|
||||||
string unescapeUtf8( string const & str, HtmlOption option = HtmlOption::Strip );
|
string unescapeUtf8( string const & str, HtmlOption option = HtmlOption::Strip );
|
||||||
|
|
||||||
} // namespace Html
|
} // namespace Html
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __ICONV_HH_INCLUDED__
|
#pragma once
|
||||||
#define __ICONV_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -47,5 +46,3 @@ public:
|
||||||
// Copying/assigning isn't supported
|
// Copying/assigning isn't supported
|
||||||
Q_DISABLE_COPY_MOVE( Iconv );
|
Q_DISABLE_COPY_MOVE( Iconv );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __SPTR_HH_INCLUDED__
|
#pragma once
|
||||||
#define __SPTR_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
// A shorthand for std::shared_ptr
|
// A shorthand for std::shared_ptr
|
||||||
template< class T >
|
template< class T >
|
||||||
using sptr = std::shared_ptr< T >;
|
using sptr = std::shared_ptr< T >;
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
#ifndef __UTF8_HH_INCLUDED__
|
#pragma once
|
||||||
#define __UTF8_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
@ -67,5 +66,3 @@ struct LineFeed
|
||||||
|
|
||||||
LineFeed initLineFeed( Encoding e );
|
LineFeed initLineFeed( Encoding e );
|
||||||
} // namespace Utf8
|
} // namespace Utf8
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* Thin wrappers for retaining compatibility for both Qt6.x and Qt5.x */
|
/* Thin wrappers for retaining compatibility for both Qt6.x and Qt5.x */
|
||||||
|
|
||||||
#ifndef UTILS_HH
|
#pragma once
|
||||||
#define UTILS_HH
|
|
||||||
|
|
||||||
#include <QAtomicInt>
|
#include <QAtomicInt>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
|
@ -350,5 +349,3 @@ QString escapeAmps( QString const & str );
|
||||||
QString unescapeAmps( QString const & str );
|
QString unescapeAmps( QString const & str );
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|
||||||
#endif // UTILS_HH
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#ifndef __WILCARD_HH_INCLUDED__
|
#pragma once
|
||||||
#define __WILCARD_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
QString wildcardsToRegexp( const QString & wc_str );
|
QString wildcardsToRegexp( const QString & wc_str );
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
namespace gd {
|
namespace gd {
|
||||||
typedef char32_t wchar;
|
using wchar = char32_t;
|
||||||
typedef std::u32string wstring;
|
using wstring = std::u32string;
|
||||||
} // namespace gd
|
} // namespace gd
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __WSTRING_QT_HH_INCLUDED__
|
#pragma once
|
||||||
#define __WSTRING_QT_HH_INCLUDED__
|
|
||||||
|
|
||||||
/// This file adds conversions between gd::wstring and QString. See wstring.hh
|
/// This file adds conversions between gd::wstring and QString. See wstring.hh
|
||||||
/// for more details on gd::wstring.
|
/// for more details on gd::wstring.
|
||||||
|
@ -16,5 +15,3 @@ wstring removeTrailingZero( wstring const & v );
|
||||||
wstring removeTrailingZero( QString const & in );
|
wstring removeTrailingZero( QString const & in );
|
||||||
wstring normalize( wstring const & );
|
wstring normalize( wstring const & );
|
||||||
} // namespace gd
|
} // namespace gd
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -102,32 +102,24 @@ AnkiConnectServer::AnkiConnectServer():
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
HotKey::HotKey():
|
|
||||||
modifiers( 0 ),
|
|
||||||
key1( 0 ),
|
|
||||||
key2( 0 )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Does anyone know how to separate modifiers from the keycode? We'll
|
|
||||||
// use our own mask.
|
|
||||||
|
|
||||||
uint32_t const keyMask = 0x01FFFFFF;
|
|
||||||
|
|
||||||
HotKey::HotKey( QKeySequence const & seq ):
|
HotKey::HotKey( QKeySequence const & seq ):
|
||||||
modifiers( seq[ 0 ] & ~keyMask ),
|
modifiers( seq[ 0 ].keyboardModifiers() ),
|
||||||
key1( seq[ 0 ] & keyMask ),
|
key1( seq[ 0 ].key() ),
|
||||||
key2( seq[ 1 ] & keyMask )
|
key2( seq[ 1 ].key() )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QKeySequence HotKey::toKeySequence() const
|
QKeySequence HotKey::toKeySequence() const
|
||||||
{
|
{
|
||||||
int v2 = key2 ? ( key2 | modifiers ) : 0;
|
if ( key2 != 0 && key2 != Qt::Key::Key_unknown ) {
|
||||||
|
return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ),
|
||||||
return QKeySequence( key1 | modifiers, v2 );
|
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
|
||||||
|
}
|
||||||
|
return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ) };
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool InternalPlayerBackend::anyAvailable()
|
bool InternalPlayerBackend::anyAvailable()
|
||||||
{
|
{
|
||||||
#if defined( MAKE_FFMPEG_PLAYER ) || defined( MAKE_QTMULTIMEDIA_PLAYER )
|
#if defined( MAKE_FFMPEG_PLAYER ) || defined( MAKE_QTMULTIMEDIA_PLAYER )
|
||||||
|
@ -214,8 +206,6 @@ Preferences::Preferences():
|
||||||
autoScrollToTargetArticle( true ),
|
autoScrollToTargetArticle( true ),
|
||||||
targetArticleAtFirst( false ),
|
targetArticleAtFirst( false ),
|
||||||
escKeyHidesMainWindow( false ),
|
escKeyHidesMainWindow( false ),
|
||||||
darkMode( false ),
|
|
||||||
darkReaderMode( false ),
|
|
||||||
alwaysOnTop( false ),
|
alwaysOnTop( false ),
|
||||||
searchInDock( false ),
|
searchInDock( false ),
|
||||||
// on macOS, register hotkeys will override system shortcuts, disabled for now to avoid troubles.
|
// on macOS, register hotkeys will override system shortcuts, disabled for now to avoid troubles.
|
||||||
|
@ -226,8 +216,8 @@ Preferences::Preferences():
|
||||||
enableMainWindowHotkey( true ),
|
enableMainWindowHotkey( true ),
|
||||||
enableClipboardHotkey( true ),
|
enableClipboardHotkey( true ),
|
||||||
#endif
|
#endif
|
||||||
mainWindowHotkey( QKeySequence( "Ctrl+F11,F11" ) ),
|
mainWindowHotkey( QKeySequence( "Ctrl+F11, Ctrl+F11" ) ),
|
||||||
clipboardHotkey( QKeySequence( "Ctrl+C,C" ) ),
|
clipboardHotkey( QKeySequence( "Ctrl+C, Ctrl+C" ) ),
|
||||||
startWithScanPopupOn( false ),
|
startWithScanPopupOn( false ),
|
||||||
enableScanPopupModifiers( false ),
|
enableScanPopupModifiers( false ),
|
||||||
scanPopupModifiers( 0 ),
|
scanPopupModifiers( 0 ),
|
||||||
|
@ -953,11 +943,12 @@ Class load()
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !preferences.namedItem( "darkMode" ).isNull() ) {
|
if ( !preferences.namedItem( "darkMode" ).isNull() ) {
|
||||||
c.preferences.darkMode = ( preferences.namedItem( "darkMode" ).toElement().text() == "1" );
|
c.preferences.darkMode = static_cast< Dark >( preferences.namedItem( "darkMode" ).toElement().text().toInt() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !preferences.namedItem( "darkReaderMode" ).isNull() ) {
|
if ( !preferences.namedItem( "darkReaderMode" ).isNull() ) {
|
||||||
c.preferences.darkReaderMode = ( preferences.namedItem( "darkReaderMode" ).toElement().text() == "1" );
|
c.preferences.darkReaderMode =
|
||||||
|
static_cast< Dark >( preferences.namedItem( "darkReaderMode" ).toElement().text().toInt() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !preferences.namedItem( "zoomFactor" ).isNull() ) {
|
if ( !preferences.namedItem( "zoomFactor" ).isNull() ) {
|
||||||
|
@ -1892,11 +1883,11 @@ void save( Class const & c )
|
||||||
preferences.appendChild( opt );
|
preferences.appendChild( opt );
|
||||||
|
|
||||||
opt = dd.createElement( "darkMode" );
|
opt = dd.createElement( "darkMode" );
|
||||||
opt.appendChild( dd.createTextNode( c.preferences.darkMode ? "1" : "0" ) );
|
opt.appendChild( dd.createTextNode( QString::number( static_cast< int >( c.preferences.darkMode ) ) ) );
|
||||||
preferences.appendChild( opt );
|
preferences.appendChild( opt );
|
||||||
|
|
||||||
opt = dd.createElement( "darkReaderMode" );
|
opt = dd.createElement( "darkReaderMode" );
|
||||||
opt.appendChild( dd.createTextNode( c.preferences.darkReaderMode ? "1" : "0" ) );
|
opt.appendChild( dd.createTextNode( QString::number( static_cast< int >( c.preferences.darkReaderMode ) ) ) );
|
||||||
preferences.appendChild( opt );
|
preferences.appendChild( opt );
|
||||||
|
|
||||||
opt = dd.createElement( "zoomFactor" );
|
opt = dd.createElement( "zoomFactor" );
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __CONFIG_HH_INCLUDED__
|
#pragma once
|
||||||
#define __CONFIG_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
@ -28,8 +27,15 @@ enum GroupId : unsigned {
|
||||||
/// GoldenDict's configuration
|
/// GoldenDict's configuration
|
||||||
namespace Config {
|
namespace Config {
|
||||||
|
|
||||||
|
// Tri states enum for Dark and Dark reader mode
|
||||||
|
enum class Dark : std::uint8_t {
|
||||||
|
Off = 0,
|
||||||
|
On = 1,
|
||||||
|
Auto = 2,
|
||||||
|
};
|
||||||
|
|
||||||
/// Dictionaries which are temporarily disabled via the dictionary bar.
|
/// Dictionaries which are temporarily disabled via the dictionary bar.
|
||||||
typedef QSet< QString > MutedDictionaries;
|
using MutedDictionaries = QSet< QString >;
|
||||||
|
|
||||||
/// A path where to search for the dictionaries
|
/// A path where to search for the dictionaries
|
||||||
struct Path
|
struct Path
|
||||||
|
@ -54,7 +60,7 @@ struct Path
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A list of paths where to search for the dictionaries
|
/// A list of paths where to search for the dictionaries
|
||||||
typedef QList< Path > Paths;
|
using Paths = QList< Path >;
|
||||||
|
|
||||||
/// A directory holding bunches of audiofiles, which is indexed into a separate
|
/// A directory holding bunches of audiofiles, which is indexed into a separate
|
||||||
/// dictionary.
|
/// dictionary.
|
||||||
|
@ -79,7 +85,7 @@ struct SoundDir
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A list of SoundDirs
|
/// A list of SoundDirs
|
||||||
typedef QList< SoundDir > SoundDirs;
|
using SoundDirs = QList< SoundDir >;
|
||||||
|
|
||||||
struct DictionaryRef
|
struct DictionaryRef
|
||||||
{
|
{
|
||||||
|
@ -185,14 +191,11 @@ struct HotKey
|
||||||
Qt::KeyboardModifiers modifiers;
|
Qt::KeyboardModifiers modifiers;
|
||||||
int key1, key2;
|
int key1, key2;
|
||||||
|
|
||||||
HotKey();
|
|
||||||
|
|
||||||
/// Hotkey's constructor, take a QKeySequence's first two keys
|
/// Hotkey's constructor, take a QKeySequence's first two keys
|
||||||
/// 1st key's modifier will be the `modifiers` above
|
/// 1st key's modifier will be the `modifiers` above
|
||||||
/// 1st key without modifier will becomes `key1`
|
/// 1st key without modifier will becomes `key1`
|
||||||
/// 2nd key without modifier will becomes `key2`
|
/// 2nd key without modifier will becomes `key2`
|
||||||
/// The relation between the int and qt's KeyCode should consult qt's doc
|
/// The relation between the int and qt's KeyCode should consult qt's doc
|
||||||
|
|
||||||
HotKey( QKeySequence const & );
|
HotKey( QKeySequence const & );
|
||||||
|
|
||||||
QKeySequence toKeySequence() const;
|
QKeySequence toKeySequence() const;
|
||||||
|
@ -421,8 +424,14 @@ struct Preferences
|
||||||
|
|
||||||
// Appearances
|
// Appearances
|
||||||
|
|
||||||
bool darkMode;
|
Dark darkMode = Dark::Off;
|
||||||
bool darkReaderMode;
|
Dark darkReaderMode =
|
||||||
|
#if defined( Q_OS_MACOS )
|
||||||
|
Dark::Auto;
|
||||||
|
#else
|
||||||
|
Dark::Off;
|
||||||
|
#endif
|
||||||
|
|
||||||
QString addonStyle;
|
QString addonStyle;
|
||||||
QString displayStyle; // Article Display style (Which also affect interface style on windows)
|
QString displayStyle; // Article Display style (Which also affect interface style on windows)
|
||||||
|
|
||||||
|
@ -506,7 +515,7 @@ struct WebSite
|
||||||
};
|
};
|
||||||
|
|
||||||
/// All the WebSites
|
/// All the WebSites
|
||||||
typedef QList< WebSite > WebSites;
|
using WebSites = QList< WebSite >;
|
||||||
|
|
||||||
/// Any DICT server
|
/// Any DICT server
|
||||||
struct DictServer
|
struct DictServer
|
||||||
|
@ -547,14 +556,14 @@ struct DictServer
|
||||||
};
|
};
|
||||||
|
|
||||||
/// All the DictServers
|
/// All the DictServers
|
||||||
typedef QList< DictServer > DictServers;
|
using DictServers = QList< DictServer >;
|
||||||
|
|
||||||
/// Hunspell configuration
|
/// Hunspell configuration
|
||||||
struct Hunspell
|
struct Hunspell
|
||||||
{
|
{
|
||||||
QString dictionariesPath;
|
QString dictionariesPath;
|
||||||
|
|
||||||
typedef QList< QString > Dictionaries;
|
using Dictionaries = QList< QString >;
|
||||||
|
|
||||||
Dictionaries enabledDictionaries;
|
Dictionaries enabledDictionaries;
|
||||||
|
|
||||||
|
@ -570,7 +579,7 @@ struct Hunspell
|
||||||
};
|
};
|
||||||
|
|
||||||
/// All the MediaWikis
|
/// All the MediaWikis
|
||||||
typedef QList< MediaWiki > MediaWikis;
|
using MediaWikis = QList< MediaWiki >;
|
||||||
|
|
||||||
|
|
||||||
/// Chinese transliteration configuration
|
/// Chinese transliteration configuration
|
||||||
|
@ -763,7 +772,7 @@ struct Program
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QList< Program > Programs;
|
using Programs = QList< Program >;
|
||||||
|
|
||||||
#ifndef NO_TTS_SUPPORT
|
#ifndef NO_TTS_SUPPORT
|
||||||
struct VoiceEngine
|
struct VoiceEngine
|
||||||
|
@ -809,7 +818,7 @@ struct VoiceEngine
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QList< VoiceEngine > VoiceEngines;
|
using VoiceEngines = QList< VoiceEngine >;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct HeadwordsDialog
|
struct HeadwordsDialog
|
||||||
|
@ -1019,5 +1028,3 @@ QString getStylesDir();
|
||||||
QString getCacheDir() noexcept;
|
QString getCacheDir() noexcept;
|
||||||
|
|
||||||
} // namespace Config
|
} // namespace Config
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __DELEGATE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __DELEGATE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QAbstractItemDelegate>
|
#include <QAbstractItemDelegate>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
|
@ -13,5 +12,3 @@ public:
|
||||||
private:
|
private:
|
||||||
QStyledItemDelegate * mainDelegate;
|
QStyledItemDelegate * mainDelegate;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __AARD_HH_INCLUDED__
|
#pragma once
|
||||||
#define __AARD_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
|
||||||
unsigned maxHeadwordsToExpand );
|
unsigned maxHeadwordsToExpand );
|
||||||
|
|
||||||
} // namespace Aard
|
} // namespace Aard
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2013 Maksim Tamkovicz <quendimax@gmail.com>
|
/* This file is (c) 2013 Maksim Tamkovicz <quendimax@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __BELARUSIANTRANSLIT_HH_INCLUDED__
|
#pragma once
|
||||||
#define __BELARUSIANTRANSLIT_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
@ -12,5 +11,3 @@ namespace BelarusianTranslit {
|
||||||
|
|
||||||
std::vector< sptr< Dictionary::Class > > makeDictionaries();
|
std::vector< sptr< Dictionary::Class > > makeDictionaries();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -721,8 +721,8 @@ void BglArticleRequest::run()
|
||||||
string const & targetHeadword = displayedHeadword.size() ? displayedHeadword : headword;
|
string const & targetHeadword = displayedHeadword.size() ? displayedHeadword : headword;
|
||||||
|
|
||||||
QCryptographicHash hash( QCryptographicHash::Md5 );
|
QCryptographicHash hash( QCryptographicHash::Md5 );
|
||||||
hash.addData( targetHeadword.data(), targetHeadword.size() + 1 ); // with 0
|
hash.addData( { targetHeadword.data(), static_cast< qsizetype >( targetHeadword.size() + 1 ) } ); // with 0
|
||||||
hash.addData( articleText.data(), articleText.size() );
|
hash.addData( { articleText.data(), static_cast< qsizetype >( articleText.size() ) } );
|
||||||
|
|
||||||
if ( !articleBodiesIncluded.insert( hash.result() ).second ) {
|
if ( !articleBodiesIncluded.insert( hash.result() ).second ) {
|
||||||
continue; // Already had this body
|
continue; // Already had this body
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __BGL_HH_INCLUDED__
|
#pragma once
|
||||||
#define __BGL_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -23,5 +22,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace Bgl
|
} // namespace Bgl
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef BABYLON_H
|
#pragma once
|
||||||
#define BABYLON_H
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
@ -115,20 +114,20 @@ const std::vector< std::string > bgl_charset = { "WINDOWS-1252", /*Default*/
|
||||||
const std::array< std::string, 11 > partOfSpeech = {
|
const std::array< std::string, 11 > partOfSpeech = {
|
||||||
"n.", "adj.", "v.", "adv.", "interj.", "pron.", "prep.", "conj.", "suff.", "pref.", "art." };
|
"n.", "adj.", "v.", "adv.", "interj.", "pron.", "prep.", "conj.", "suff.", "pref.", "art." };
|
||||||
|
|
||||||
typedef struct
|
struct bgl_block
|
||||||
{
|
{
|
||||||
unsigned type;
|
unsigned type;
|
||||||
unsigned length;
|
unsigned length;
|
||||||
char * data;
|
char * data;
|
||||||
} bgl_block;
|
};
|
||||||
|
|
||||||
typedef struct
|
struct bgl_entry
|
||||||
{
|
{
|
||||||
std::string headword;
|
std::string headword;
|
||||||
std::string definition;
|
std::string definition;
|
||||||
std::string displayedHeadword;
|
std::string displayedHeadword;
|
||||||
std::vector< std::string > alternates;
|
std::vector< std::string > alternates;
|
||||||
} bgl_entry;
|
};
|
||||||
|
|
||||||
class Babylon
|
class Babylon
|
||||||
{
|
{
|
||||||
|
@ -229,5 +228,3 @@ private:
|
||||||
BGL_TARGET_CHARSET
|
BGL_TARGET_CHARSET
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BABYLON_H
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __BTREEIDX_HH_INCLUDED__
|
#pragma once
|
||||||
#define __BTREEIDX_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
#include "dictfile.hh"
|
#include "dictfile.hh"
|
||||||
|
@ -270,5 +269,3 @@ struct IndexedWords: public map< string, vector< WordArticleLink > >
|
||||||
IndexInfo buildIndex( IndexedWords const &, File::Index & file );
|
IndexInfo buildIndex( IndexedWords const &, File::Index & file );
|
||||||
|
|
||||||
} // namespace BtreeIndexing
|
} // namespace BtreeIndexing
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2015 Zhe Wang <0x1997@gmail.com>
|
/* This file is (c) 2015 Zhe Wang <0x1997@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __CHINESE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __CHINESE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -13,5 +12,3 @@ namespace Chinese {
|
||||||
|
|
||||||
std::vector< sptr< Dictionary::Class > > makeDictionaries( Config::Chinese const & );
|
std::vector< sptr< Dictionary::Class > > makeDictionaries( Config::Chinese const & );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __CHUNKEDSTORAGE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __CHUNKEDSTORAGE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "ex.hh"
|
#include "ex.hh"
|
||||||
#include "dictfile.hh"
|
#include "dictfile.hh"
|
||||||
|
@ -86,5 +85,3 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ChunkedStorage
|
} // namespace ChunkedStorage
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef CUSTOMTRANSLITERATION_HH
|
#pragma once
|
||||||
#define CUSTOMTRANSLITERATION_HH
|
|
||||||
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -23,4 +22,3 @@ private:
|
||||||
std::vector< sptr< Dictionary::Class > > makeDictionaries( Config::CustomTrans const & );
|
std::vector< sptr< Dictionary::Class > > makeDictionaries( Config::CustomTrans const & );
|
||||||
|
|
||||||
} // namespace CustomTranslit
|
} // namespace CustomTranslit
|
||||||
#endif // CUSTOMTRANSLITERATION_HH
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __DICTDFILES_HH_INCLUDED__
|
#pragma once
|
||||||
#define __DICTDFILES_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
|
|
||||||
|
@ -16,5 +15,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace DictdFiles
|
} // namespace DictdFiles
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __DICTIONARY_HH_INCLUDED__
|
#pragma once
|
||||||
#define __DICTIONARY_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -584,5 +583,3 @@ QString generateRandomDictionaryId();
|
||||||
QMap< std::string, sptr< Dictionary::Class > > dictToMap( std::vector< sptr< Dictionary::Class > > const & dicts );
|
QMap< std::string, sptr< Dictionary::Class > > dictToMap( std::vector< sptr< Dictionary::Class > > const & dicts );
|
||||||
|
|
||||||
} // namespace Dictionary
|
} // namespace Dictionary
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __DICTSERVER_HH__INCLUDED__
|
#pragma once
|
||||||
#define __DICTSERVER_HH__INCLUDED__
|
|
||||||
|
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -13,5 +12,3 @@ using std::string;
|
||||||
vector< sptr< Dictionary::Class > > makeDictionaries( Config::DictServers const & servers );
|
vector< sptr< Dictionary::Class > > makeDictionaries( Config::DictServers const & servers );
|
||||||
|
|
||||||
} // namespace DictServer
|
} // namespace DictServer
|
||||||
|
|
||||||
#endif // __DICTSERVER_HH__INCLUDED__
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __DSL_HH_INCLUDED__
|
#pragma once
|
||||||
#define __DSL_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
|
||||||
unsigned int maxHeadwordSize );
|
unsigned int maxHeadwordSize );
|
||||||
|
|
||||||
} // namespace Dsl
|
} // namespace Dsl
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __DSL_DETAILS_HH_INCLUDED__
|
#pragma once
|
||||||
#define __DSL_DETAILS_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -223,5 +222,3 @@ quint32 dslLanguageToId( wstring const & name );
|
||||||
|
|
||||||
} // namespace Details
|
} // namespace Details
|
||||||
} // namespace Dsl
|
} // namespace Dsl
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __EPWING_HH__INCLUDED__
|
#pragma once
|
||||||
#define __EPWING_HH__INCLUDED__
|
|
||||||
|
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
#include "epwing_book.hh"
|
#include "epwing_book.hh"
|
||||||
|
@ -20,5 +19,3 @@ void addWordToChunks( Epwing::Book::EpwingHeadword & head,
|
||||||
vector< sptr< Dictionary::Class > >
|
vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
} // namespace Epwing
|
} // namespace Epwing
|
||||||
|
|
||||||
#endif // __EPWING_HH__INCLUDED__
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __EPWING_BOOK_HH_INCLUDED__
|
#pragma once
|
||||||
#define __EPWING_BOOK_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
#include "ex.hh"
|
#include "ex.hh"
|
||||||
|
@ -58,7 +57,7 @@ struct EpwingHeadword
|
||||||
|
|
||||||
class EpwingBook
|
class EpwingBook
|
||||||
{
|
{
|
||||||
typedef std::pair< int, int > EWPos;
|
using EWPos = std::pair< int, int >;
|
||||||
|
|
||||||
void setErrorString( QString const & func, EB_Error_Code code );
|
void setErrorString( QString const & func, EB_Error_Code code );
|
||||||
|
|
||||||
|
@ -270,6 +269,3 @@ struct EContainer
|
||||||
} // namespace Book
|
} // namespace Book
|
||||||
|
|
||||||
} // namespace Epwing
|
} // namespace Epwing
|
||||||
|
|
||||||
|
|
||||||
#endif // __EPWING_BOOK_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __EPWING_CHARMAP_HH_INCLUDED_
|
#pragma once
|
||||||
#define __EPWING_CHARMAP_HH_INCLUDED_
|
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
@ -22,5 +21,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Epwing
|
} // namespace Epwing
|
||||||
|
|
||||||
#endif // __EPWING_CHARMAP_HH_INCLUDED_
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ class ForvoArticleRequest: public Dictionary::DataRequest
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list< NetReply > NetReplies;
|
using NetReplies = std::list< NetReply >;
|
||||||
NetReplies netReplies;
|
NetReplies netReplies;
|
||||||
QString apiKey, languageCode;
|
QString apiKey, languageCode;
|
||||||
string dictionaryId;
|
string dictionaryId;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __FORVO_HH_INCLUDED__
|
#pragma once
|
||||||
#define __FORVO_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -15,5 +14,3 @@ std::vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( Dictionary::Initializing &, Config::Forvo const &, QNetworkAccessManager & );
|
makeDictionaries( Dictionary::Initializing &, Config::Forvo const &, QNetworkAccessManager & );
|
||||||
|
|
||||||
} // namespace Forvo
|
} // namespace Forvo
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef GERMAN_HH
|
#pragma once
|
||||||
#define GERMAN_HH
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -11,5 +10,3 @@ namespace GermanTranslit {
|
||||||
|
|
||||||
sptr< Dictionary::Class > makeDictionary();
|
sptr< Dictionary::Class > makeDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GERMAN_HH
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __GLS_HH_INCLUDED__
|
#pragma once
|
||||||
#define __GLS_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -13,5 +12,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace Gls
|
} // namespace Gls
|
||||||
|
|
||||||
#endif // __GLS_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2010 Jennie Petoumenou <epetoumenou@gmail.com>
|
/* This file is (c) 2010 Jennie Petoumenou <epetoumenou@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef GREEKTRANSLIT_HH
|
#pragma once
|
||||||
#define GREEKTRANSLIT_HH
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -11,5 +10,3 @@ namespace GreekTranslit {
|
||||||
|
|
||||||
sptr< Dictionary::Class > makeDictionary();
|
sptr< Dictionary::Class > makeDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GREEKTRANSLIT_HH
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __HUNSPELL_HH_INCLUDED__
|
#pragma once
|
||||||
#define __HUNSPELL_HH_INCLUDED__
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define HUNSPELL_STATIC
|
#define HUNSPELL_STATIC
|
||||||
|
@ -41,5 +40,3 @@ vector< DataFiles > findDataFiles( QString const & path );
|
||||||
vector< sptr< Dictionary::Class > > makeDictionaries( Config::Hunspell const & );
|
vector< sptr< Dictionary::Class > > makeDictionaries( Config::Hunspell const & );
|
||||||
|
|
||||||
} // namespace HunspellMorpho
|
} // namespace HunspellMorpho
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class LinguaArticleRequest: public Dictionary::DataRequest
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list< NetReply > NetReplies;
|
using NetReplies = std::list< NetReply >;
|
||||||
NetReplies netReplies;
|
NetReplies netReplies;
|
||||||
QString languageCode, langWikipediaID;
|
QString languageCode, langWikipediaID;
|
||||||
string dictionaryId;
|
string dictionaryId;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef GOLDENDICT_LINGUALIBRE_H
|
#pragma once
|
||||||
#define GOLDENDICT_LINGUALIBRE_H
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -11,5 +10,3 @@ std::vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( Dictionary::Initializing &, Config::Lingua const &, QNetworkAccessManager & );
|
makeDictionaries( Dictionary::Initializing &, Config::Lingua const &, QNetworkAccessManager & );
|
||||||
|
|
||||||
} // namespace Lingua
|
} // namespace Lingua
|
||||||
|
|
||||||
#endif //GOLDENDICT_LINGUALIBRE_H
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __LOADDICTIONARIES_HH_INCLUDED__
|
#pragma once
|
||||||
#define __LOADDICTIONARIES_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "initializing.hh"
|
#include "initializing.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -75,4 +74,3 @@ void loadDictionaries( QWidget * parent,
|
||||||
/// Runs deferredInit() on all the given dictionaries. Useful when
|
/// Runs deferredInit() on all the given dictionaries. Useful when
|
||||||
/// loadDictionaries() was previously called with doDeferredInit = false.
|
/// loadDictionaries() was previously called with doDeferredInit = false.
|
||||||
void doDeferredInit( std::vector< sptr< Dictionary::Class > > & );
|
void doDeferredInit( std::vector< sptr< Dictionary::Class > > & );
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __L9SA_HH_INCLUDED__
|
#pragma once
|
||||||
#define __L9SA_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -16,5 +15,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace Lsa
|
} // namespace Lsa
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
#ifndef __MDICTPARSER_HH_INCLUDED__
|
#pragma once
|
||||||
#define __MDICTPARSER_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -112,9 +111,9 @@ public:
|
||||||
virtual void handleRecord( QString const & name, RecordInfo const & recordInfo ) = 0;
|
virtual void handleRecord( QString const & name, RecordInfo const & recordInfo ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef vector< pair< qint64, qint64 > > BlockInfoVector;
|
using BlockInfoVector = vector< pair< qint64, qint64 > >;
|
||||||
typedef vector< pair< qint64, QString > > HeadWordIndex;
|
using HeadWordIndex = vector< pair< qint64, QString > >;
|
||||||
typedef map< qint32, pair< QString, QString > > StyleSheets;
|
using StyleSheets = map< qint32, pair< QString, QString > >;
|
||||||
|
|
||||||
inline QString const & title() const
|
inline QString const & title() const
|
||||||
{
|
{
|
||||||
|
@ -215,5 +214,3 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Mdict
|
} // namespace Mdict
|
||||||
|
|
||||||
#endif // __MDICTPARSER_HH_INCLUDED__
|
|
||||||
|
|
|
@ -621,7 +621,7 @@ void MdxArticleRequest::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
QCryptographicHash hash( QCryptographicHash::Md5 );
|
QCryptographicHash hash( QCryptographicHash::Md5 );
|
||||||
hash.addData( articleBody.data(), articleBody.size() );
|
hash.addData( { articleBody.data(), static_cast< qsizetype >( articleBody.length() ) } );
|
||||||
if ( !articleBodiesIncluded.insert( hash.result() ).second ) {
|
if ( !articleBodiesIncluded.insert( hash.result() ).second ) {
|
||||||
continue; // Already had this body
|
continue; // Already had this body
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2013 Timon Wong <timon86.wang AT gmail DOT com>
|
/* This file is (c) 2013 Timon Wong <timon86.wang AT gmail DOT com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __MDX_HH_INCLUDED__
|
#pragma once
|
||||||
#define __MDX_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -15,5 +14,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace Mdx
|
} // namespace Mdx
|
||||||
|
|
||||||
#endif // __MDX_HH_INCLUDED__
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ void MediaWikiSectionsParser::closeListTags( int currentLevel )
|
||||||
|
|
||||||
class MediaWikiArticleRequest: public MediaWikiDataRequestSlots
|
class MediaWikiArticleRequest: public MediaWikiDataRequestSlots
|
||||||
{
|
{
|
||||||
typedef std::list< std::pair< QNetworkReply *, bool > > NetReplies;
|
using NetReplies = std::list< std::pair< QNetworkReply *, bool > >;
|
||||||
NetReplies netReplies;
|
NetReplies netReplies;
|
||||||
QString url;
|
QString url;
|
||||||
QString lang;
|
QString lang;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __MEDIAWIKI_HH_INCLUDED__
|
#pragma once
|
||||||
#define __MEDIAWIKI_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -18,5 +17,3 @@ makeDictionaries( Dictionary::Initializing &, Config::MediaWikis const & wikis,
|
||||||
|
|
||||||
|
|
||||||
} // namespace MediaWiki
|
} // namespace MediaWiki
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __PROGRAMS_HH_INCLUDED__
|
#pragma once
|
||||||
#define __PROGRAMS_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
@ -79,5 +78,3 @@ private slots:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Programs
|
} // namespace Programs
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __ROMAJI_HH_INCLUDED__
|
#pragma once
|
||||||
#define __ROMAJI_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "transliteration.hh"
|
#include "transliteration.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -14,5 +13,3 @@ using std::vector;
|
||||||
|
|
||||||
vector< sptr< Dictionary::Class > > makeDictionaries( Config::Romaji const & );
|
vector< sptr< Dictionary::Class > > makeDictionaries( Config::Romaji const & );
|
||||||
} // namespace Romaji
|
} // namespace Romaji
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __RUSSIANTRANSLIT_HH_INCLUDED__
|
#pragma once
|
||||||
#define __RUSSIANTRANSLIT_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -11,5 +10,3 @@ namespace RussianTranslit {
|
||||||
|
|
||||||
sptr< Dictionary::Class > makeDictionary();
|
sptr< Dictionary::Class > makeDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __SDICT_HH_INCLUDED__
|
#pragma once
|
||||||
#define __SDICT_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -16,5 +15,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace Sdict
|
} // namespace Sdict
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -109,8 +109,8 @@ bool indexIsOldOrBad( string const & indexFile )
|
||||||
class SlobFile
|
class SlobFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::pair< quint64, quint32 > RefEntryOffsetItem;
|
using RefEntryOffsetItem = std::pair< quint64, quint32 >;
|
||||||
typedef QList< RefEntryOffsetItem > RefOffsetsVector;
|
using RefOffsetsVector = QList< RefEntryOffsetItem >;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum Compressions {
|
enum Compressions {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __SLOB_HH_INCLUDED__
|
#pragma once
|
||||||
#define __SLOB_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -15,5 +14,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
|
||||||
unsigned maxHeadwordsToExpand );
|
unsigned maxHeadwordsToExpand );
|
||||||
|
|
||||||
} // namespace Slob
|
} // namespace Slob
|
||||||
|
|
||||||
#endif // __SLOB_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __SOUNDDIR_HH_INCLUDED__
|
#pragma once
|
||||||
#define __SOUNDDIR_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -17,5 +16,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( Config::SoundDirs const &, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( Config::SoundDirs const &, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace SoundDir
|
} // namespace SoundDir
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __SOURCES_HH_INCLUDED__
|
#pragma once
|
||||||
#define __SOURCES_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "ui_sources.h"
|
#include "ui_sources.h"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -360,5 +359,3 @@ private slots:
|
||||||
|
|
||||||
void on_rescan_clicked();
|
void on_rescan_clicked();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __STARTDICT_HH_INCLUDED__
|
#pragma once
|
||||||
#define __STARTDICT_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
|
||||||
unsigned maxHeadwordsToExpand );
|
unsigned maxHeadwordsToExpand );
|
||||||
|
|
||||||
} // namespace Stardict
|
} // namespace Stardict
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __TRANSLITERATION_HH_INCLUDED__
|
#pragma once
|
||||||
#define __TRANSLITERATION_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -84,5 +83,3 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Transliteration
|
} // namespace Transliteration
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __DECOMPRESS_HH_INCLUDED__
|
#pragma once
|
||||||
#define __DECOMPRESS_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -13,5 +12,3 @@ string decompressZlib( const char * bufptr, unsigned length );
|
||||||
string decompressBzip2( const char * bufptr, unsigned length );
|
string decompressBzip2( const char * bufptr, unsigned length );
|
||||||
|
|
||||||
string decompressLzma2( const char * bufptr, unsigned length, bool raw_decoder = false );
|
string decompressLzma2( const char * bufptr, unsigned length, bool raw_decoder = false );
|
||||||
|
|
||||||
#endif // DECOMPRESS_HH
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef GOLDENDICT_FILE_HH
|
#pragma once
|
||||||
#define GOLDENDICT_FILE_HH
|
|
||||||
|
|
||||||
#include "ex.hh"
|
#include "ex.hh"
|
||||||
|
|
||||||
|
@ -125,5 +124,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace File
|
} // namespace File
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -21,8 +21,7 @@
|
||||||
* 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
* 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DICTZIP_H_
|
#pragma once
|
||||||
#define _DICTZIP_H_
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
@ -112,5 +111,3 @@ extern int mmap_mode;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* end extern "C" */
|
} /* end extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _DICTZIP_H_ */
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __INDEXEDZIP_HH_INCLUDED__
|
#pragma once
|
||||||
#define __INDEXEDZIP_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "btreeidx.hh"
|
#include "btreeidx.hh"
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
@ -48,5 +47,3 @@ public:
|
||||||
/// Index compressed files in zip file
|
/// Index compressed files in zip file
|
||||||
bool indexFile( BtreeIndexing::IndexedWords & zipFileNames, quint32 * filesCount = 0 );
|
bool indexFile( BtreeIndexing::IndexedWords & zipFileNames, quint32 * filesCount = 0 );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
#ifndef __RIPEMD_HH_INCLUDED__
|
#pragma once
|
||||||
#define __RIPEMD_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
@ -42,5 +41,3 @@ private:
|
||||||
|
|
||||||
void transform( const uchar buffer[ 64 ] );
|
void transform( const uchar buffer[ 64 ] );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __RIPEMD_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __SPLITFILE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __SPLITFILE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
@ -51,5 +50,3 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace SplitFile
|
} // namespace SplitFile
|
||||||
|
|
||||||
#endif // __SPLITFILE_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef UFILE_HH_INCLUDED
|
#pragma once
|
||||||
#define UFILE_HH_INCLUDED
|
|
||||||
|
|
||||||
// Don't use this thing.
|
// Don't use this thing.
|
||||||
// Use QFile instead.
|
// Use QFile instead.
|
||||||
|
@ -29,5 +28,3 @@ gzFile gd_gzopen( const char * filename );
|
||||||
#define gd_fopen fopen
|
#define gd_fopen fopen
|
||||||
#define gd_gzopen( filename ) gzopen( filename, "rb" )
|
#define gd_gzopen( filename ) gzopen( filename, "rb" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // UFILE_HH
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __ZIPFILE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __ZIPFILE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
@ -72,5 +71,3 @@ bool readNextEntry( SplitZipFile &, CentralDirEntry & );
|
||||||
bool readLocalHeader( SplitZipFile &, LocalFileHeader & );
|
bool readLocalHeader( SplitZipFile &, LocalFileHeader & );
|
||||||
|
|
||||||
} // namespace ZipFile
|
} // namespace ZipFile
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __WEBSITE_HH_INCLUDED__
|
#pragma once
|
||||||
#define __WEBSITE_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
@ -17,5 +16,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( Config::WebSites const &,
|
||||||
|
|
||||||
|
|
||||||
} // namespace WebSite
|
} // namespace WebSite
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2009 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2009 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __XDXF_HH_INCLUDED__
|
#pragma once
|
||||||
#define __XDXF_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace Xdxf
|
} // namespace Xdxf
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __XDXF2HTML_HH_INCLUDED__
|
#pragma once
|
||||||
#define __XDXF2HTML_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -32,5 +31,3 @@ string convert( string const &,
|
||||||
QString * headword = 0 );
|
QString * headword = 0 );
|
||||||
|
|
||||||
} // namespace Xdxf2Html
|
} // namespace Xdxf2Html
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __ZIM_HH_INCLUDED__
|
#pragma once
|
||||||
#define __ZIM_HH_INCLUDED__
|
|
||||||
|
|
||||||
#ifdef MAKE_ZIM_SUPPORT
|
#ifdef MAKE_ZIM_SUPPORT
|
||||||
|
|
||||||
|
@ -19,5 +18,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
|
||||||
} // namespace Zim
|
} // namespace Zim
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* This file is part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
/* This file is part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef ZIPSOUNDS_HH
|
#pragma once
|
||||||
#define ZIPSOUNDS_HH
|
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
|
|
||||||
|
@ -15,5 +14,3 @@ vector< sptr< Dictionary::Class > >
|
||||||
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & );
|
||||||
|
|
||||||
} // namespace ZipSounds
|
} // namespace ZipSounds
|
||||||
|
|
||||||
#endif // ZIPSOUNDS_HH
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* Licensed under GPLv3 or later, see the LICENSE file */
|
/* Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef DICTIONARYGROUP_HH_INCLUDED
|
#pragma once
|
||||||
#define DICTIONARYGROUP_HH_INCLUDED
|
|
||||||
|
|
||||||
#include "sptr.hh"
|
#include "sptr.hh"
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
|
@ -30,5 +29,3 @@ private:
|
||||||
std::vector< sptr< Dictionary::Class > > const & allDictionaries;
|
std::vector< sptr< Dictionary::Class > > const & allDictionaries;
|
||||||
Instances::Groups const & groups;
|
Instances::Groups const & groups;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DICTIONARYGROUP_HH_INCLUDED
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef EXTERNALAUDIOPLAYER_HH_INCLUDED
|
#pragma once
|
||||||
#define EXTERNALAUDIOPLAYER_HH_INCLUDED
|
|
||||||
|
|
||||||
#include "audioplayerinterface.hh"
|
#include "audioplayerinterface.hh"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -44,5 +43,3 @@ private:
|
||||||
// deleteLater() is safer because viewer actively participates in the QEventLoop.
|
// deleteLater() is safer because viewer actively participates in the QEventLoop.
|
||||||
std::unique_ptr< ExternalViewer, QObjectDeleteLater > viewer;
|
std::unique_ptr< ExternalViewer, QObjectDeleteLater > viewer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EXTERNALAUDIOPLAYER_HH_INCLUDED
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __EXTERNALVIEWER_HH_INCLUDED__
|
#pragma once
|
||||||
#define __EXTERNALVIEWER_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
|
@ -44,5 +43,3 @@ public:
|
||||||
/// Call this function instead of simply deleting viewer to prevent the
|
/// Call this function instead of simply deleting viewer to prevent the
|
||||||
/// "QProcess: Destroyed while process X is still running." warning in log.
|
/// "QProcess: Destroyed while process X is still running." warning in log.
|
||||||
void stopAndDestroySynchronously( ExternalViewer * viewer );
|
void stopAndDestroySynchronously( ExternalViewer * viewer );
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __FFMPEGAUDIO_HH_INCLUDED__
|
#pragma once
|
||||||
#define __FFMPEGAUDIO_HH_INCLUDED__
|
|
||||||
|
|
||||||
#ifdef MAKE_FFMPEG_PLAYER
|
#ifdef MAKE_FFMPEG_PLAYER
|
||||||
#include "audiooutput.hh"
|
#include "audiooutput.hh"
|
||||||
|
@ -106,5 +105,3 @@ signals:
|
||||||
} // namespace Ffmpeg
|
} // namespace Ffmpeg
|
||||||
|
|
||||||
#endif // MAKE_FFMPEG_PLAYER
|
#endif // MAKE_FFMPEG_PLAYER
|
||||||
|
|
||||||
#endif // __FFMPEGAUDIO_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef FFMPEGAUDIOPLAYER_HH_INCLUDED
|
#pragma once
|
||||||
#define FFMPEGAUDIOPLAYER_HH_INCLUDED
|
|
||||||
|
|
||||||
#include "audioplayerinterface.hh"
|
#include "audioplayerinterface.hh"
|
||||||
#include "ffmpegaudio.hh"
|
#include "ffmpegaudio.hh"
|
||||||
|
@ -41,5 +40,3 @@ public:
|
||||||
} // namespace Ffmpeg
|
} // namespace Ffmpeg
|
||||||
|
|
||||||
#endif // MAKE_FFMPEG_PLAYER
|
#endif // MAKE_FFMPEG_PLAYER
|
||||||
|
|
||||||
#endif // FFMPEGAUDIOPLAYER_HH_INCLUDED
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __FTSHELPERS_HH_INCLUDED__
|
#pragma once
|
||||||
#define __FTSHELPERS_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
@ -71,5 +70,3 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace FtsHelpers
|
} // namespace FtsHelpers
|
||||||
|
|
||||||
#endif // __FTSHELPERS_HH_INCLUDED__
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __FULLTEXTSEARCH_HH_INCLUDED__
|
#pragma once
|
||||||
#define __FULLTEXTSEARCH_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
@ -261,5 +260,3 @@ signals:
|
||||||
|
|
||||||
|
|
||||||
} // namespace FTS
|
} // namespace FTS
|
||||||
|
|
||||||
#endif // __FULLTEXTSEARCH_HH_INCLUDED__
|
|
||||||
|
|
|
@ -81,16 +81,16 @@ QGestureRecognizer::Result GDPinchGestureRecognizer::recognize( QGesture * state
|
||||||
case QEvent::TouchUpdate: {
|
case QEvent::TouchUpdate: {
|
||||||
gest->scaleChanged = false;
|
gest->scaleChanged = false;
|
||||||
const QTouchEvent * const ev = static_cast< const QTouchEvent * >( event );
|
const QTouchEvent * const ev = static_cast< const QTouchEvent * >( event );
|
||||||
fewTouchPointsPresented = ( ev->touchPoints().size() > 1 );
|
fewTouchPointsPresented = ( ev->points().size() > 1 );
|
||||||
if ( ev->touchPoints().size() == 2 ) {
|
if ( ev->points().size() == 2 ) {
|
||||||
QTouchEvent::TouchPoint p1 = ev->touchPoints().at( 0 );
|
QTouchEvent::TouchPoint p1 = ev->points().at( 0 );
|
||||||
QTouchEvent::TouchPoint p2 = ev->touchPoints().at( 1 );
|
QTouchEvent::TouchPoint p2 = ev->points().at( 1 );
|
||||||
|
|
||||||
QPointF centerPoint = ( p1.screenPos() + p2.screenPos() ) / 2.0;
|
QPointF centerPoint = ( p1.globalPosition() + p2.globalPosition() ) / 2.0;
|
||||||
gest->setHotSpot( centerPoint );
|
gest->setHotSpot( centerPoint );
|
||||||
if ( gest->isNewSequence ) {
|
if ( gest->isNewSequence ) {
|
||||||
gest->startPosition[ 0 ] = p1.screenPos();
|
gest->startPosition[ 0 ] = p1.globalPosition();
|
||||||
gest->startPosition[ 1 ] = p2.screenPos();
|
gest->startPosition[ 1 ] = p2.globalPosition();
|
||||||
gest->lastCenterPoint = centerPoint;
|
gest->lastCenterPoint = centerPoint;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -105,8 +105,8 @@ QGestureRecognizer::Result GDPinchGestureRecognizer::recognize( QGesture * state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gest->lastScaleFactor = gest->scaleFactor;
|
gest->lastScaleFactor = gest->scaleFactor;
|
||||||
QLineF line( p1.screenPos(), p2.screenPos() );
|
QLineF line( p1.globalPosition(), p2.globalPosition() );
|
||||||
QLineF lastLine( p1.lastScreenPos(), p2.lastScreenPos() );
|
QLineF lastLine( p1.globalLastPosition(), p2.globalLastPosition() );
|
||||||
gest->scaleFactor = line.length() / lastLine.length();
|
gest->scaleFactor = line.length() / lastLine.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,28 +210,28 @@ QGestureRecognizer::Result GDSwipeGestureRecognizer::recognize( QGesture * state
|
||||||
}
|
}
|
||||||
case QEvent::TouchUpdate: {
|
case QEvent::TouchUpdate: {
|
||||||
const QTouchEvent * const ev = static_cast< const QTouchEvent * >( event );
|
const QTouchEvent * const ev = static_cast< const QTouchEvent * >( event );
|
||||||
fewTouchPointsPresented = ( ev->touchPoints().size() > 1 );
|
fewTouchPointsPresented = ( ev->points().size() > 1 );
|
||||||
if ( !swipe->started )
|
if ( !swipe->started )
|
||||||
result = QGestureRecognizer::CancelGesture;
|
result = QGestureRecognizer::CancelGesture;
|
||||||
else if ( ev->touchPoints().size() == 2 ) {
|
else if ( ev->points().size() == 2 ) {
|
||||||
//2-point gesture
|
//2-point gesture
|
||||||
|
|
||||||
QTouchEvent::TouchPoint p1 = ev->touchPoints().at( 0 );
|
QTouchEvent::TouchPoint p1 = ev->points().at( 0 );
|
||||||
QTouchEvent::TouchPoint p2 = ev->touchPoints().at( 1 );
|
QTouchEvent::TouchPoint p2 = ev->points().at( 1 );
|
||||||
|
|
||||||
if ( swipe->lastPositions[ 0 ].isNull() ) {
|
if ( swipe->lastPositions[ 0 ].isNull() ) {
|
||||||
swipe->lastPositions[ 0 ] = p1.startScreenPos().toPoint();
|
swipe->lastPositions[ 0 ] = p1.globalPressPosition().toPoint();
|
||||||
swipe->lastPositions[ 1 ] = p2.startScreenPos().toPoint();
|
swipe->lastPositions[ 1 ] = p2.globalPressPosition().toPoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !swipe->hasHotSpot() ) {
|
if ( !swipe->hasHotSpot() ) {
|
||||||
swipe->setHotSpot( ( p1.startScreenPos() + p2.startScreenPos() ) / 2 );
|
swipe->setHotSpot( ( p1.globalPressPosition() + p2.globalPressPosition() ) / 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
int dx1 = p1.screenPos().toPoint().x() - swipe->lastPositions[ 0 ].x();
|
int dx1 = p1.globalPosition().toPoint().x() - swipe->lastPositions[ 0 ].x();
|
||||||
int dx2 = p2.screenPos().toPoint().x() - swipe->lastPositions[ 1 ].x();
|
int dx2 = p2.globalPosition().toPoint().x() - swipe->lastPositions[ 1 ].x();
|
||||||
int dy1 = p1.screenPos().toPoint().y() - swipe->lastPositions[ 0 ].y();
|
int dy1 = p1.globalPosition().toPoint().y() - swipe->lastPositions[ 0 ].y();
|
||||||
int dy2 = p2.screenPos().toPoint().y() - swipe->lastPositions[ 1 ].y();
|
int dy2 = p2.globalPosition().toPoint().y() - swipe->lastPositions[ 1 ].y();
|
||||||
|
|
||||||
if ( qAbs( ( dx1 + dx2 ) / 2.0 ) >= MOVE_X_TRESHOLD || qAbs( ( dy1 + dy2 ) / 2.0 ) >= MOVE_Y_TRESHOLD ) {
|
if ( qAbs( ( dx1 + dx2 ) / 2.0 ) >= MOVE_X_TRESHOLD || qAbs( ( dy1 + dy2 ) / 2.0 ) >= MOVE_Y_TRESHOLD ) {
|
||||||
qreal angle1 = computeAngle( dx1, dy1 );
|
qreal angle1 = computeAngle( dx1, dy1 );
|
||||||
|
@ -255,8 +255,8 @@ QGestureRecognizer::Result GDSwipeGestureRecognizer::recognize( QGesture * state
|
||||||
swipe->vertDirection = vertDir;
|
swipe->vertDirection = vertDir;
|
||||||
swipe->horizDirection = horizDir;
|
swipe->horizDirection = horizDir;
|
||||||
|
|
||||||
swipe->lastPositions[ 0 ] = p1.screenPos().toPoint();
|
swipe->lastPositions[ 0 ] = p1.globalPosition().toPoint();
|
||||||
swipe->lastPositions[ 1 ] = p2.screenPos().toPoint();
|
swipe->lastPositions[ 1 ] = p2.globalPosition().toPoint();
|
||||||
|
|
||||||
result = QGestureRecognizer::TriggerGesture;
|
result = QGestureRecognizer::TriggerGesture;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef HEADWORDSMODEL_H
|
#pragma once
|
||||||
#define HEADWORDSMODEL_H
|
|
||||||
|
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
|
|
||||||
|
@ -53,5 +52,3 @@ private:
|
||||||
QMutex lock;
|
QMutex lock;
|
||||||
std::list< sptr< Dictionary::WordSearchRequest > > queuedRequests;
|
std::list< sptr< Dictionary::WordSearchRequest > > queuedRequests;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HEADWORDSMODEL_H
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifndef __HISTORY_HH_INCLUDED__
|
#pragma once
|
||||||
#define __HISTORY_HH_INCLUDED__
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
@ -114,5 +113,3 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual void timerEvent( QTimerEvent * );
|
virtual void timerEvent( QTimerEvent * );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -698,7 +698,7 @@ bool HotkeyWrapper::isKeyGrabbed( quint32 keyCode, quint32 modifiers ) const
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
typedef int ( *X11ErrorHandler )( Display * display, XErrorEvent * event );
|
using X11ErrorHandler = int ( * )( Display * display, XErrorEvent * event );
|
||||||
|
|
||||||
class X11GrabUngrabErrorHandler
|
class X11GrabUngrabErrorHandler
|
||||||
{
|
{
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue