Compare commits

...

9 Commits

Author SHA1 Message Date
zty199
48d551424a chore: 更新 debian/changelog
更新 debian/changelog;修正部分格式问题,更新日期

Log: 更新 debian/changelog;修正部分格式问题,更新日期
2023-02-05 22:53:27 +08:00
zty199
ab6c3d37d2 fix: 修复 Deepin 系统上显示“开发者模式未开启”的问题
没有区分 Deepin 和 UOS,在 Deepin 上对开发者模式状态文件进行判断,可能造成错误

Log: 添加判断区分 Deepin 和 UOS,仅在 UOS 判断开发者模式状态文件;优化 main 函数长度,将环境变量设置和 config.ini 读写放入 Utils 独立静态函数中调用;修复从托盘打开主界面时透明度动画不流畅的问题;优化关闭窗口动画代码,与打开窗口动画代码合并;修复主窗口关闭时,从托盘打开关于对话框后,调起主窗口会遮挡关于对话框的问题
2023-02-05 22:44:19 +08:00
de2db98324 cmake-patch: 更新补丁用于处理 v4.2.3~test1 时期版本号截取字符数过短问题 2023-02-05 16:12:21 +08:00
zty199
66d1aacbbe chore: 托盘图标添加鼠标悬浮提示
鼠标悬浮在托盘图标上时,显示气泡“星火应用商店”

Log: trayIcon 设置 toolTip;遗留问题:仅在后台运行时,系统监视器无法正确展示名称(仅显示 spark-store)
2023-02-04 21:41:43 +08:00
57f1b69663 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-02-03 03:03:34 +00:00
zty199
cb093dcc2b fix: 尝试修复 ISSUE #I68I8W 安装结束时随机崩溃问题
暂时未知,目前怀疑安装结束后,DownloadItem 触发 finished() 信号,在详情页槽函数中执行 disconnect 操作时导致崩溃

Log: 去除 disconnect 操作;修改可能造成问题的控件指针获取方式;修复多线程执行下载安装操作时跨线程相关警告

* 该提交可能存在严重问题,建议多进行测试;如果存在问题,及时 revert 该提交
2023-02-03 02:04:18 +08:00
eaf268a10d 423-changelog 2023-02-01 12:45:55 +08:00
zty199
1074e941a6 fix: ISSUE #I6B4CS 重复安装应用的bug
应用安装过程中,重新进入应用详情页,仅通过 `dpkg-query -s $pkgName` 判断本地是否已安装,未判断当前安装任务执行状态

Log: 判断本地安装状态后,执行 isDownloading 函数判断安装任务状态,更新按钮显示状态;整理应用详情页代码
2023-02-01 11:59:16 +08:00
zty199
05cb318737 fix: 修复客户端已经在后台运行时,双击 desktop 图标无法调出主窗口的问题
处理 DTK 单例启动信号时,仅处理了启动参数 >1 的情况;仅执行 spark-store 未处理

Log: 第二个启动参数为空时,仍然调用 onGetUrl 函数,函数中屏蔽了非 spk:// 链接格式的字符串,但仍然执行调出主窗口操作
2023-01-31 16:57:43 +08:00
22 changed files with 819 additions and 560 deletions

29
debian/changelog vendored
View File

@@ -1,3 +1,14 @@
spark-store (4.2.3~test1) stable; urgency=medium
* 修复因判断安装状态错误创建多个相同任务的bug
* 测试中:尝试修复安装结束的闪退问题 https://gitee.com/deepin-community-store/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb
* 修复Deepin 显示开发者模式未开启
* 修复:从托盘打开主窗口时透明度动画不流畅
* 修复:主窗口关闭后,从托盘打开关于窗口会被主窗口遮挡
-- shenmo <shenmo@spark-app.store> Sun, 05 Feb 2023 23:00:00 +0800
spark-store (4.2.2) stable; urgency=medium spark-store (4.2.2) stable; urgency=medium
* 调整脚本应用的transhell支持转为source导入 * 调整脚本应用的transhell支持转为source导入
@@ -5,7 +16,7 @@ spark-store (4.2.2) stable; urgency=medium
* 新增:应用托盘,下载时候可以放心关闭窗口了 * 新增:应用托盘,下载时候可以放心关闭窗口了
* 新增支持spk://search/内容 格式链接 * 新增支持spk://search/内容 格式链接
--shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.1) stable; urgency=medium spark-store (4.2.1) stable; urgency=medium
@@ -14,7 +25,8 @@ spark-store (4.2.1) stable; urgency=medium
* 修复因依赖不完全导致在LinuxMint下无法下载统计 * 修复因依赖不完全导致在LinuxMint下无法下载统计
* 新增:脚本系列应用支持英文 * 新增:脚本系列应用支持英文
--shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2) stable; urgency=medium spark-store (4.2) stable; urgency=medium
@@ -23,7 +35,8 @@ spark-store (4.2) stable; urgency=medium
* 调整dwine5标签的文案改为Wine应用 * 调整dwine5标签的文案改为Wine应用
* 新增:更新软件时弹窗会显示正在更新的软件包名 * 新增:更新软件时弹窗会显示正在更新的软件包名
--shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2~test3) stable; urgency=medium spark-store (4.2~test3) stable; urgency=medium
@@ -31,6 +44,7 @@ spark-store (4.2~test3) stable; urgency=medium
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2~test2) stable; urgency=medium spark-store (4.2~test2) stable; urgency=medium
* 修复: 420t1版本中ssinstall有时会重新下载软件包的问题 * 修复: 420t1版本中ssinstall有时会重新下载软件包的问题
@@ -38,8 +52,10 @@ spark-store (4.2~test2) stable; urgency=medium
* 调整: aptss在进行任何操作前均检测是否存在Packages文件若存在则不进行ssupdate * 调整: aptss在进行任何操作前均检测是否存在Packages文件若存在则不进行ssupdate
* 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟
* 新增: aptss检测Package文件支持分目录目前指定为store * 新增: aptss检测Package文件支持分目录目前指定为store
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2~test1) stable; urgency=medium spark-store (4.2~test1) stable; urgency=medium
* 新增: aptss支持显示报错 * 新增: aptss支持显示报错
@@ -48,6 +64,7 @@ spark-store (4.2~test1) stable; urgency=medium
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.2) stable; urgency=medium spark-store (4.1.2) stable; urgency=medium
* feat: 初步的wayland支持 * feat: 初步的wayland支持
@@ -80,10 +97,9 @@ spark-store (4.1.2) stable; urgency=medium
* chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数 * chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
* chore: 更新翻译文件,去除已经不存在的翻译 * chore: 更新翻译文件,去除已经不存在的翻译
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.2~test2) stable; urgency=medium spark-store (4.1.2~test2) stable; urgency=medium
* feat: ssinstall支持从单独文件夹中校验软件包 * feat: ssinstall支持从单独文件夹中校验软件包
@@ -92,6 +108,7 @@ spark-store (4.1.2~test2) stable; urgency=medium
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.2~test1) stable; urgency=medium spark-store (4.1.2~test1) stable; urgency=medium
* feat: 初步的wayland支持 * feat: 初步的wayland支持
@@ -121,7 +138,6 @@ spark-store (4.1.2~test1) stable; urgency=medium
* chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数 * chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
* chore: 更新翻译文件,去除已经不存在的翻译 * chore: 更新翻译文件,去除已经不存在的翻译
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
@@ -206,6 +222,7 @@ spark-store (3.3.3~test3) stable; urgency=medium
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800 -- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3~test2) stable; urgency=medium spark-store (3.3.3~test2) stable; urgency=medium
* bug fix: 更新和检查更新出错时不报错.此更新需要一个推送 * bug fix: 更新和检查更新出错时不报错.此更新需要一个推送

View File

@@ -1,7 +1,7 @@
From abbfbf12c1ea9853039e6864d0ede91973189ce6 Mon Sep 17 00:00:00 2001 From 2d49950909e0327b0ad72e008cb82ac97b7bae0e Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Sun, 11 Dec 2022 22:27:23 +0800 Date: Sun, 11 Dec 2022 22:27:23 +0800
Subject: [PATCH 01/10] =?UTF-8?q?repo:=20=E4=B8=80=E6=AC=A1=E6=80=A7?= Subject: [PATCH 01/11] =?UTF-8?q?repo:=20=E4=B8=80=E6=AC=A1=E6=80=A7?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5=20spark=20=E9=AA=A8=E6=9E=B6=E4=BB=A5?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=20spark=20=E9=AA=A8=E6=9E=B6=E4=BB=A5?=
=?UTF-8?q?=E5=8F=98=E4=B8=BA=20cmake=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E5=8F=98=E4=B8=BA=20cmake=20=E6=9E=84=E5=BB=BA?=
MIME-Version: 1.0 MIME-Version: 1.0
@@ -1789,10 +1789,10 @@ index 0000000..0fa070b
2.20.1 2.20.1
From d1974334ce60291894b53f6839b78f3147aaa233 Mon Sep 17 00:00:00 2001 From d2524f967848e6ba0d2c8a097183264d0d197d68 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Sun, 11 Dec 2022 22:37:26 +0800 Date: Sun, 11 Dec 2022 22:37:26 +0800
Subject: [PATCH 02/10] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20deb=20?= Subject: [PATCH 02/11] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20deb=20?=
=?UTF-8?q?=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=EF=BC=8C=E5=AE=8C=E6=88=90=20cmake=20=E5=8C=96=E6=9E=84?= =?UTF-8?q?=EF=BC=8C=E5=AE=8C=E6=88=90=20cmake=20=E5=8C=96=E6=9E=84?=
=?UTF-8?q?=E5=BB=BA?= =?UTF-8?q?=E5=BB=BA?=
@@ -1856,10 +1856,10 @@ index 2ab24e7..38ad2d7 100644
2.20.1 2.20.1
From 5a978c7db6c34d7dcd4aa56d94605e51245004a5 Mon Sep 17 00:00:00 2001 From 7cd97a939b63143921936b9db3978d14f18a4f33 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 12 Dec 2022 00:50:01 +0800 Date: Mon, 12 Dec 2022 00:50:01 +0800
Subject: [PATCH 03/10] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=20Spark=20?= Subject: [PATCH 03/11] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=20Spark=20?=
=?UTF-8?q?=E6=9E=84=E5=BB=BA=20=E4=B8=8E=20CMake=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=20=E4=B8=8E=20CMake=20=E6=9E=84=E5=BB=BA?=
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=A2=84=E8=A7=88=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=A2=84=E8=A7=88=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0 MIME-Version: 1.0
@@ -2184,10 +2184,10 @@ index 0000000..a807009
2.20.1 2.20.1
From 4b5b4bc91a42cc860efbe1728f2dba9f255ea954 Mon Sep 17 00:00:00 2001 From bb128568ab7d1463c0002ffff470ad5c93364c99 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Thu, 15 Dec 2022 19:59:46 +0800 Date: Thu, 15 Dec 2022 19:59:46 +0800
Subject: [PATCH 04/10] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?= Subject: [PATCH 04/11] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?=
=?UTF-8?q?=E4=BA=8E=20Qt5=20Svg=20=E4=BE=9D=E8=B5=96=E7=9A=84=E6=9E=84?= =?UTF-8?q?=E4=BA=8E=20Qt5=20Svg=20=E4=BE=9D=E8=B5=96=E7=9A=84=E6=9E=84?=
=?UTF-8?q?=E5=BB=BA=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=BB=BA=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0 MIME-Version: 1.0
@@ -2236,10 +2236,10 @@ index b56399f..67e29b6 100644
2.20.1 2.20.1
From ede820a7267afa113a2d8b4f93f45fa6c1b4b23b Mon Sep 17 00:00:00 2001 From 877a52f4b753f55e087a6c58794d690fabb6ddbb Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 19 Dec 2022 02:58:17 +0800 Date: Mon, 19 Dec 2022 02:58:17 +0800
Subject: [PATCH 05/10] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?= Subject: [PATCH 05/11] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?=
=?UTF-8?q?=E4=BA=8E=E6=94=AF=E6=8C=81=20BaseWidgetOpacity=20=E5=9F=BA?= =?UTF-8?q?=E4=BA=8E=E6=94=AF=E6=8C=81=20BaseWidgetOpacity=20=E5=9F=BA?=
=?UTF-8?q?=E7=A1=80=E7=B1=BB=E7=9A=84=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E7=A1=80=E7=B1=BB=E7=9A=84=E6=9E=84=E5=BB=BA?=
MIME-Version: 1.0 MIME-Version: 1.0
@@ -2283,10 +2283,10 @@ index 14530e1..b5e32d8 100644
2.20.1 2.20.1
From b63790722efa275977b2033a1beeb21b730c1895 Mon Sep 17 00:00:00 2001 From f89bb6a145f2a77fa0e1b55b3ad17ade69c53a69 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 30 Jan 2023 20:48:25 +0800 Date: Mon, 30 Jan 2023 20:48:25 +0800
Subject: [PATCH 06/10] =?UTF-8?q?spark:=20=E5=88=9B=E5=BB=BA=E6=96=B0?= Subject: [PATCH 06/11] =?UTF-8?q?spark:=20=E5=88=9B=E5=BB=BA=E6=96=B0?=
=?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9D=97=E7=94=A8=E4=BA=8E=20debian/changelo?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9D=97=E7=94=A8=E4=BA=8E=20debian/changelo?=
=?UTF-8?q?g=20=E7=9A=84=E7=89=88=E6=9C=AC=E5=8F=B7=E9=87=8D=E5=86=99?= =?UTF-8?q?g=20=E7=9A=84=E7=89=88=E6=9C=AC=E5=8F=B7=E9=87=8D=E5=86=99?=
=?UTF-8?q?=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=A7=84=E5=88=99?=
@@ -2388,10 +2388,10 @@ index 0000000..9d8bca2
2.20.1 2.20.1
From cca243c18b125a0e24a08c06a358ee04f0861884 Mon Sep 17 00:00:00 2001 From b26bac7572ab7477ab4b94174fbdece759be8bc7 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 30 Jan 2023 21:23:15 +0800 Date: Mon, 30 Jan 2023 21:23:15 +0800
Subject: [PATCH 07/10] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkDebianChangelog?= Subject: [PATCH 07/11] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkDebianChangelog?=
=?UTF-8?q?Version.cmake=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=A9=E5=B1=95?= =?UTF-8?q?Version.cmake=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=A9=E5=B1=95?=
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@@ -2459,10 +2459,10 @@ index 9d8bca2..65e1c16 100644
2.20.1 2.20.1
From f3595a55f567fc01a5928fea8e4b89f99cf8793e Mon Sep 17 00:00:00 2001 From 26f00f79a2b8613477059beb6c2f492bc24a7bb5 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 30 Jan 2023 23:17:24 +0800 Date: Mon, 30 Jan 2023 23:17:24 +0800
Subject: [PATCH 08/10] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20v4.2.2=20?= Subject: [PATCH 08/11] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20v4.2.2=20?=
=?UTF-8?q?=E7=89=88=E6=9C=AC=E6=97=B6=E6=9C=9F=E6=96=B0=E5=A2=9E=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=97=B6=E6=9C=9F=E6=96=B0=E5=A2=9E=E7=9A=84?=
=?UTF-8?q?=E5=AE=89=E8=A3=85=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0 MIME-Version: 1.0
@@ -2509,10 +2509,10 @@ index bbb958a..c7ea53b 100644
2.20.1 2.20.1
From da9ef6f95ea7be97595b1e3285ac8e98a34c8c0a Mon Sep 17 00:00:00 2001 From e4401b16037cb3b1b10c59f4c7a0fa3c2cd563b3 Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 30 Jan 2023 23:18:44 +0800 Date: Mon, 30 Jan 2023 23:18:44 +0800
Subject: [PATCH 09/10] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkTranslatorConfi?= Subject: [PATCH 09/11] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkTranslatorConfi?=
=?UTF-8?q?g.cmake=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=A9=E5=B1=95?= =?UTF-8?q?g.cmake=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=A9=E5=B1=95?=
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@@ -2544,10 +2544,10 @@ index 272dd9d..689e70d 100644
2.20.1 2.20.1
From 22eea0e930a073cac8e6dd750b6389044668dcd6 Mon Sep 17 00:00:00 2001 From 2d8046099776e3909359ce49818ae28378af930c Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com> From: zinface <zinface@163.com>
Date: Mon, 30 Jan 2023 23:20:12 +0800 Date: Mon, 30 Jan 2023 23:20:12 +0800
Subject: [PATCH 10/10] =?UTF-8?q?make:=20=E5=A4=84=E7=90=86=E9=BB=98?= Subject: [PATCH 10/11] =?UTF-8?q?make:=20=E5=A4=84=E7=90=86=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=20make=20=E7=9B=AE=E6=A0=87=E4=B8=BA=20override-versi?= =?UTF-8?q?=E8=AE=A4=20make=20=E7=9B=AE=E6=A0=87=E4=B8=BA=20override-versi?=
=?UTF-8?q?on=20=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?on=20=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0 MIME-Version: 1.0
@@ -2594,3 +2594,36 @@ index 81ca078..076502c 100644
-- --
2.20.1 2.20.1
From 043e6fb78e2bcb1a6fecefe2ba9aceb9df84e96e Mon Sep 17 00:00:00 2001
From: zinface <zinface@163.com>
Date: Sun, 5 Feb 2023 16:09:40 +0800
Subject: [PATCH 11/11] =?UTF-8?q?spark:=20=E5=A4=84=E7=90=86=E7=89=88?=
=?UTF-8?q?=E6=9C=AC=E5=8F=B7=204.2.3~test1=20=E6=97=B6=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E7=9A=84=E6=88=AA=E5=8F=96=E5=AD=97=E7=AC=A6=E6=95=B0=E8=BF=87?=
=?UTF-8?q?=E7=9F=AD=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cmake/SparkDebianChangelogVersion.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmake/SparkDebianChangelogVersion.cmake b/cmake/SparkDebianChangelogVersion.cmake
index 65e1c16..3ed5fa2 100644
--- a/cmake/SparkDebianChangelogVersion.cmake
+++ b/cmake/SparkDebianChangelogVersion.cmake
@@ -40,7 +40,8 @@ macro(spark_debian_changelog_override_version _CHANGELOG_FILE_PATH)
message("> V = ${CHANGELOG_FILE_PATH}")
if(CHANGELOG_FILE_EXISTS)
- file(READ ${CHANGELOG_FILE_PATH} CHANGELOG_CONTENT LIMIT 20)
+ file(READ ${CHANGELOG_FILE_PATH} CHANGELOG_CONTENT LIMIT 30)
+ # fix: spark-store (4.2.3~test1) 已经超过 20 字符位,所以使用 30 进行保守计算
string(FIND ${CHANGELOG_CONTENT} "(" V_PRE) # +1 to V_BEGIN
string(FIND ${CHANGELOG_CONTENT} ")" V_END)
--
2.20.1

View File

@@ -1,4 +1,5 @@
#include "application.h" #include "application.h"
#include "mainwindow-dtk.h"
#include <DPlatformWindowHandle> #include <DPlatformWindowHandle>
#include <DLog> #include <DLog>
@@ -46,7 +47,7 @@ Application::Application(int &argc, char **argv)
void Application::handleAboutAction() void Application::handleAboutAction()
{ {
if (aboutDialog()) { if (aboutDialog() && aboutDialog()->parent() == m_mainWindow) {
DApplication::handleAboutAction(); DApplication::handleAboutAction();
return; return;
} }
@@ -81,10 +82,30 @@ void Application::setVersionAndBuildDateTime(const QString &version, const QStri
setApplicationVersion(DApplication::buildVersion(config.value("build/version").toString() + "-" + "Flamescion" + "-" + config.value("build/time").toString())); setApplicationVersion(DApplication::buildVersion(config.value("build/version").toString() + "-" + "Flamescion" + "-" + config.value("build/time").toString()));
} }
void Application::setMainWindow(MainWindow *window)
{
m_mainWindow = window;
if (aboutDialog() == nullptr || aboutDialog()->parent() != m_mainWindow)
{
initAboutDialog();
}
}
void Application::initAboutDialog() void Application::initAboutDialog()
{ {
if (m_mainWindow == nullptr)
{
return;
}
if (aboutDialog())
{
aboutDialog()->deleteLater();
setAboutDialog(nullptr);
}
// 自定义 DAboutDialog // 自定义 DAboutDialog
DAboutDialog *dialog = new DAboutDialog(activeWindow()); DAboutDialog *dialog = new DAboutDialog(m_mainWindow);
dialog->setProductName(productName()); dialog->setProductName(productName());
dialog->setProductIcon(productIcon()); dialog->setProductIcon(productIcon());
dialog->setVersion(translate("DAboutDialog", "Version: %1").arg(applicationVersion())); dialog->setVersion(translate("DAboutDialog", "Version: %1").arg(applicationVersion()));

View File

@@ -5,6 +5,7 @@
DWIDGET_USE_NAMESPACE DWIDGET_USE_NAMESPACE
class MainWindow;
class Application : public DApplication class Application : public DApplication
{ {
Q_OBJECT Q_OBJECT
@@ -16,6 +17,7 @@ public:
static void checkAppConfigLocation(); static void checkAppConfigLocation();
void setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime); void setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime);
void setMainWindow(MainWindow *window);
private: private:
void initAboutDialog(); void initAboutDialog();
@@ -23,6 +25,8 @@ private:
private: private:
QString m_version; QString m_version;
QString m_buildDateTime; QString m_buildDateTime;
MainWindow *m_mainWindow = nullptr;
}; };
#endif // APPLICATION_H #endif // APPLICATION_H

View File

@@ -145,17 +145,19 @@ void DownloadController::startDownload(const QString &url)
command.append(aria2NoSeeds.toUtf8()); command.append(aria2NoSeeds.toUtf8());
} }
qDebug() << command; qDebug() << command;
auto cmd = new QProcess(this);
cmd->setProcessChannelMode(QProcess::MergedChannels);
cmd->setProgram("aria2c");
cmd->setArguments(command);
cmd->start();
cmd->waitForStarted(); //等待启动完成
QObject::connect(cmd, &QProcess::readyReadStandardOutput, [&]() bool downloadSuccess = true;
QProcess cmd;
cmd.setProcessChannelMode(QProcess::MergedChannels);
cmd.setProgram("aria2c");
cmd.setArguments(command);
cmd.start();
cmd.waitForStarted(-1); //等待启动完成
connect(&cmd, &QProcess::readyReadStandardOutput, [&]()
{ {
//通过读取输出计算下载速度 //通过读取输出计算下载速度
QString message = cmd->readAllStandardOutput().data(); QString message = cmd.readAllStandardOutput().data();
// qDebug() << message; // qDebug() << message;
message = message.replace(" ", ""); message = message.replace(" ", "");
QStringList list; QStringList list;
@@ -195,17 +197,21 @@ void DownloadController::startDownload(const QString &url)
emit downloadProcess(speedInfo, downloadSizeRecord, fileSize); emit downloadProcess(speedInfo, downloadSizeRecord, fileSize);
} }
}); });
QObject::connect(cmd, &QProcess::readyReadStandardError, [&]() connect(&cmd, &QProcess::readyReadStandardError, [&]()
{ {
emit errorOccur(cmd->readAllStandardError().data()); emit errorOccur(cmd.readAllStandardError().data());
return; downloadSuccess = false;
cmd.close();
}); });
auto pidNumber = cmd->processId(); pidNumber = cmd.processId();
this->pidNumber = pidNumber;
while (cmd->waitForFinished(-1)) cmd.waitForFinished(-1);
cmd.close();
if(!downloadSuccess)
{ {
continue; return;
} }
// 统计下载量 // 统计下载量
@@ -218,7 +224,7 @@ void DownloadController::startDownload(const QString &url)
mailProcess.start(SenderdPath.toUtf8(), QStringList() << metaUrl << "HD70642"); mailProcess.start(SenderdPath.toUtf8(), QStringList() << metaUrl << "HD70642");
mailProcess.waitForStarted(); mailProcess.waitForStarted();
mailProcess.waitForFinished(3000); mailProcess.waitForFinished(3000);
mailProcess.deleteLater(); mailProcess.close();
emit downloadFinished(); }); emit downloadFinished(); });
} }

View File

@@ -21,7 +21,7 @@ public:
private: private:
int threadNum; int threadNum;
int pidNumber = -1; qint64 pidNumber = -1;
QString filename; QString filename;
qint64 fileSize; qint64 fileSize;
QVector<QPair<qint64, qint64>> ranges; QVector<QPair<qint64, qint64>> ranges;

View File

@@ -1,5 +1,6 @@
#include "application.h" #include "application.h"
#include "mainwindow-dtk.h" #include "mainwindow-dtk.h"
#include "utils/utils.h"
#include <DSysInfo> #include <DSysInfo>
#include <DApplicationSettings> #include <DApplicationSettings>
@@ -14,85 +15,24 @@
DCORE_USE_NAMESPACE DCORE_USE_NAMESPACE
DWIDGET_USE_NAMESPACE DWIDGET_USE_NAMESPACE
#define UOSCheckFile "/var/lib/deepin/developer-mode/enabled"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// Get build time // Get build time
static const QString version = "4.2.2"; static const QString version = "4.2.3";
static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss");
static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss");
// 设置桌面环境环境变量
bool isDeepinOS = true;
if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
{
qputenv("XDG_CURRENT_DESKTOP", "Deepin");
isDeepinOS = false;
}
bool isWayland = false;
auto e = QProcessEnvironment::systemEnvironment();
QString XDG_SESSION_TYPE = e.value(QStringLiteral("XDG_SESSION_TYPE"));
QString WAYLAND_DISPLAY = e.value(QStringLiteral("WAYLAND_DISPLAY"));
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
{
isWayland = true;
}
// NOTE: 提前设置组织名称和应用名称,避免配置文件位置错误 // NOTE: 提前设置组织名称和应用名称,避免配置文件位置错误
DApplication::setOrganizationName("spark-union"); DApplication::setOrganizationName("spark-union");
DApplication::setApplicationName("spark-store"); DApplication::setApplicationName("spark-store");
Application::checkAppConfigLocation(); // 检查 ~/.config/spark-union/spark-store 文件夹是否存在 Application::checkAppConfigLocation(); // 检查 ~/.config/spark-union/spark-store 文件夹是否存在
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); // 初始化 config.ini 配置文件
config.setValue("build/isWayland", isWayland); Utils::initConfig();
config.setValue("build/isDeepinOS", isDeepinOS);
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
if (!config.contains("build/useWayland"))
{
config.setValue("build/useWayland", true);
}
config.sync(); // 写入更改至 config.ini并同步最新内容
bool useWayland = config.value("build/useWayland").toBool();
qDebug() << "System Wayland enabled:" << isWayland << ". Spark Wayland enabled:" << useWayland;
// Set display backend // Set display backend
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDDE() || isDeepinOS)) Utils::setQPAPlatform();
{
qputenv("QT_QPA_PLATFORM", "wayland");
}
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDDE() && isDeepinOS))
{
qputenv("QT_QPA_PLATFORM", "dwayland");
}
else
{
qputenv("QT_QPA_PLATFORM", "dxcb");
}
// Check UOS developer mode.
QFile UOSDevelopFile(UOSCheckFile);
if (isDeepinOS && UOSDevelopFile.exists() && UOSDevelopFile.open(QFile::ReadOnly | QFile::Text))
{
config.setValue("UOS/isUOS", true);
QString lineData = UOSDevelopFile.readLine();
bool devmode = lineData.trimmed().toInt();
qDebug() << "UOS Developer Mode Status:" << devmode;
config.setValue("UOS/EnableDeveloperMode", devmode);
}
else
{
if (config.contains("UOS/isUOS"))
{
config.remove("UOS/isUOS");
config.remove("UOS/EnableDeveloperMode");
}
}
UOSDevelopFile.close();
config.sync(); // 写入更改至 config.ini并同步最新内容
// 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE // 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE
qputenv("DTK_FORCE_RASTER_WIDGETS", "FALSE"); qputenv("DTK_FORCE_RASTER_WIDGETS", "FALSE");
@@ -131,6 +71,7 @@ int main(int argc, char *argv[])
DApplicationSettings settings; // 定义 DApplicationSettings自动保存主题设置 DApplicationSettings settings; // 定义 DApplicationSettings自动保存主题设置
MainWindow w; MainWindow w;
a.setMainWindow(&w); // 设置应用程序主窗口,用于初始化关于对话框
// 让打开时界面显示在正中 // 让打开时界面显示在正中
Dtk::Widget::moveToCenter(&w); Dtk::Widget::moveToCenter(&w);

View File

@@ -11,6 +11,7 @@
#include <DGuiApplicationHelper> #include <DGuiApplicationHelper>
#include <QAbstractButton> #include <QAbstractButton>
#include <QtConcurrent>
#define AppPageApplist 0 #define AppPageApplist 0
#define AppPageSearchlist 1 #define AppPageSearchlist 1
@@ -74,10 +75,7 @@ void MainWindow::onNewProcessInstance(qint64 pid, const QStringList &arguments)
{ {
Q_UNUSED(pid) Q_UNUSED(pid)
if (arguments.size() > 1) onGetUrl(arguments.value(1, ""));
{
onGetUrl(arguments.value(1));
}
} }
void MainWindow::openUrl(const QString &url) void MainWindow::openUrl(const QString &url)
@@ -141,7 +139,7 @@ void MainWindow::initTitleBar()
ly_titlebar->addWidget(backButton); ly_titlebar->addWidget(backButton);
// Check wayland configs // Check wayland configs
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
if (!config.value("build/isDeepinOS").toBool() && config.value("build/useWayland").toBool()) if (!config.value("runtime/isDDE").toBool() && config.value("runtime/useWayland").toBool())
{ {
// Wayland 搜索栏居中 // Wayland 搜索栏居中
ly_titlebar->addStretch(WaylandSearchCenter); ly_titlebar->addStretch(WaylandSearchCenter);
@@ -218,8 +216,9 @@ void MainWindow::initLeftMenu()
void MainWindow::initTrayIcon() void MainWindow::initTrayIcon()
{ {
QMenu *menu = new QMenu(this); trayIcon->setToolTip(tr("Spark Store"));
QMenu *menu = new QMenu(this);
QAction *showAction = new QAction(QObject::tr("Show MainWindow"), menu); QAction *showAction = new QAction(QObject::tr("Show MainWindow"), menu);
QAction *aboutAction = new QAction(qApp->translate("TitleBarMenu", "About"), menu); QAction *aboutAction = new QAction(qApp->translate("TitleBarMenu", "About"), menu);
QAction *exitAction = new QAction(qApp->translate("TitleBarMenu", "Exit"), menu); QAction *exitAction = new QAction(qApp->translate("TitleBarMenu", "Exit"), menu);

View File

@@ -1,82 +1,40 @@
#include "appintopage.h" #include "appintopage.h"
#include "ui_appintopage.h" #include "ui_appintopage.h"
AppIntoPage::AppIntoPage(QWidget *parent) : QWidget(parent), #include "backend/sparkapi.h"
ui(new Ui::AppIntoPage) #include "widgets/downloadlistwidget.h"
#include "backend/image_show.h"
#include "application.h"
#include <QtConcurrent>
#include <QClipboard>
AppIntoPage::AppIntoPage(QWidget *parent)
: QWidget(parent)
, ui(new Ui::AppIntoPage)
, api(new SparkAPI(this))
{ {
ui->setupUi(this); initUI();
ui->listWidget->setViewMode(QListView::IconMode); initConnections();
ui->listWidget->setMovement(QListView::Static);
ui->listWidget->setMaximumHeight(200);
ui->listWidget->setFlow(QListView::TopToBottom);
api1 = new SparkAPI(this);
connect(api1, &SparkAPI::finishedRAW, [=](QString download_times)
{
download_times.remove(QRegExp("\\n"));
ui->download_times->setText(download_times);
qDebug()<<"Download Times:"+download_times; });
clear();
} }
void AppIntoPage::clear() AppIntoPage::~AppIntoPage()
{ {
ui->tag_a2d->hide(); delete ui;
ui->tag_uos->hide();
ui->tag_dtk5->hide();
ui->tag_deepin->hide();
ui->tag_dwine2->hide();
ui->tag_dwine5->hide();
ui->tag_ubuntu->hide();
ui->tag_community->hide();
ui->icon->clear();
ui->title->clear();
ui->author->clear();
ui->label_2->clear();
ui->downloadButton->hide();
ui->downloadButton->setEnabled(false);
ui->pushButton_3->hide();
int n = ui->listWidget->count();
for (int i = 0; i < n; i++)
{
QListWidgetItem *item = ui->listWidget->takeItem(0);
QWidget *card = ui->listWidget->itemWidget(item);
delete card;
card = NULL;
delete item;
item = NULL;
}
ui->listWidget->clear();
} }
void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
{ void AppIntoPage::openUrl(const QUrl &url)
dw = w;
connect(w, &DownloadListWidget::downloadFinished, [=]()
{ isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); });
}
void AppIntoPage::openUrl(QUrl url)
{ {
clear();
// qDebug() << url;
spk = url; spk = url;
SparkAPI *api = new SparkAPI(this);
clear();
connect(api, &SparkAPI::finishedObject, [=](QJsonObject appinfo)
{
SparkAPI *api1 = new SparkAPI(this);
connect(api1, &SparkAPI::finishedObject, [=](const QJsonObject &appinfo)
{
info = appinfo; info = appinfo;
// qDebug()<<url;
//获取图标 // 显示基本信息
QNetworkRequest request;
QNetworkAccessManager *naManager = new QNetworkAccessManager(this);
qDebug()<<api->getImgServerUrl()+"store"+url.path().replace("+","%2B") + "/icon.png";
request.setUrl(QUrl(api->getImgServerUrl()+"store"+url.path().replace("+","%2B") + "/icon.png"));
request.setRawHeader("User-Agent", "Mozilla/5.0");
request.setRawHeader("Content-Type", "charset='utf-8'");
naManager->get(request);
QObject::connect(naManager,&QNetworkAccessManager::finished,[=](QNetworkReply *reply){
QByteArray jpegData = reply->readAll();
iconpixmap.loadFromData(jpegData);
iconpixmap.scaled(210, 200, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
ui->icon->setPixmap(iconpixmap);
ui->icon->setScaledContents(true);
});
ui->title->setText(info["Name"].toString()); ui->title->setText(info["Name"].toString());
ui->version->setText(info["Version"].toString()); ui->version->setText(info["Version"].toString());
ui->author->setText(info["Author"].toString()); ui->author->setText(info["Author"].toString());
@@ -84,10 +42,66 @@ void AppIntoPage::openUrl(QUrl url)
ui->d_size->setText(info["Size"].toString()); ui->d_size->setText(info["Size"].toString());
ui->d_update->setText(info["Update"].toString()); ui->d_update->setText(info["Update"].toString());
ui->d_pkgname->setText(info["Pkgname"].toString()); ui->d_pkgname->setText(info["Pkgname"].toString());
ui->d_website->setText("<a href=\""+info["Website"].toString()+"\">"+tr("Click Open")); ui->d_website->setText("<a href=\"" + info["Website"].toString() + "\">" + tr("Click Open"));
ui->d_contributor->setText(info["Contributor"].toString()); ui->d_contributor->setText(info["Contributor"].toString());
ui->label_2->setText(info["More"].toString()); ui->label_2->setText(info["More"].toString());
// 显示 tags
QStringList taglist = info["Tags"].toString().split(";", QString::SkipEmptyParts);
setAppinfoTags(taglist);
// 获取图标
QNetworkRequest request;
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
qDebug() << api->getImgServerUrl() + "store" + url.path() + "/icon.png";
request.setUrl(QUrl(api->getImgServerUrl() + "store" + url.path() + "/icon.png"));
request.setRawHeader("User-Agent", "Mozilla/5.0");
request.setRawHeader("Content-Type", "charset='utf-8'");
manager->get(request);
QObject::connect(manager, &QNetworkAccessManager::finished, [=](QNetworkReply *reply)
{
QByteArray jpegData = reply->readAll();
iconpixmap.loadFromData(jpegData);
iconpixmap.scaled(210, 200, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
ui->icon->setPixmap(iconpixmap);
ui->icon->setScaledContents(true);
manager->deleteLater(); });
// 获取截图
QJsonParseError error;
QJsonArray array = QJsonDocument::fromJson(info.value("img_urls").toString().toUtf8(), &error).array();
QStringList imglist;
foreach (const QJsonValue &value, array) {
QString imgUrl = value.toString();
imglist.append(imgUrl);
}
qDebug() << imglist;
for (int i = 0; i < imglist.size(); i++)
{
QNetworkRequest request;
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
request.setUrl(QUrl(imglist.value(i)));
request.setRawHeader("User-Agent", "Mozilla/5.0");
request.setRawHeader("Content-Type", "charset='utf-8'");
manager->get(request);
QObject::connect(manager, &QNetworkAccessManager::finished, [=](QNetworkReply *reply)
{
QByteArray jpegData = reply->readAll();
QPixmap pixmap;
pixmap.loadFromData(jpegData);
pixmap.scaled(100, 100, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
image_show *img=new image_show(this);
img->setImage(pixmap);
//img->setScaledContents(true);
QListWidgetItem* pItem = new QListWidgetItem();
pItem->setSizeHint(QSize(280, 200));
ui->listWidget->addItem(pItem);
ui->listWidget->setItemWidget(pItem, img);
manager->deleteLater(); });
}
// Check UOS // Check UOS
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
@@ -135,9 +149,6 @@ void AppIntoPage::openUrl(QUrl url)
isUpdated = false; isUpdated = false;
} }
QObject::connect(naManager, &QNetworkAccessManager::finished, [=]()
{
if (isInstalled) if (isInstalled)
{ {
if (isUpdated) if (isUpdated)
@@ -159,84 +170,160 @@ void AppIntoPage::openUrl(QUrl url)
{ {
ui->downloadButton->setText(tr("Download")); ui->downloadButton->setText(tr("Download"));
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
ui->downloadButton->show(); ui->downloadButton->show();
} });
} }
QStringList taglist = info["Tags"].toString().split(";"); isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
QString tmp=info["img_urls"].toString();
qDebug() << tmp;
if (tmp.left(2) == "[\"")
{
tmp.remove(0, 2);
} }
if (tmp.right(2) == "\"]")
{ api1->disconnect();
tmp.remove(tmp.size() - 2, tmp.size()); api1->deleteLater(); });
}
QStringList imglist = tmp.split("\",\""); api1->getAppInfo(url);
qDebug() << imglist;
for (int i = 0; i < imglist.size(); i++) api->getAppDownloadTimes(url);
{
QNetworkRequest request;
QNetworkAccessManager *iconNaManager = new QNetworkAccessManager(this);
request.setUrl(QUrl(imglist[i].replace("+", "%2B")));
request.setRawHeader("User-Agent", "Mozilla/5.0");
request.setRawHeader("Content-Type", "charset='utf-8'");
iconNaManager->get(request);
QObject::connect(iconNaManager, &QNetworkAccessManager::finished, [=](QNetworkReply *reply)
{
QByteArray jpegData = reply->readAll();
QPixmap pixmap;
pixmap.loadFromData(jpegData);
pixmap.scaled(100, 100, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
image_show *img=new image_show(this);
img->setImage(pixmap);
//img->setScaledContents(true);
QListWidgetItem* pItem = new QListWidgetItem();
pItem->setSizeHint(QSize(280, 200));
ui->listWidget->addItem(pItem);
ui->listWidget->setItemWidget(pItem, img);
});
}
this->sltAppinfoTags(&taglist);
disconnect(api,&SparkAPI::finished,nullptr,nullptr);
api->deleteLater(); });
api->getAppInfo(url);
api1->getAppDownloadTimes(url);
} }
void AppIntoPage::isDownloading(QUrl url) void AppIntoPage::clear()
{ {
if (dw->getUrlList().lastIndexOf(url) == -1) ui->tag_a2d->hide();
ui->tag_uos->hide();
ui->tag_dtk5->hide();
ui->tag_deepin->hide();
ui->tag_dwine2->hide();
ui->tag_dwine5->hide();
ui->tag_ubuntu->hide();
ui->tag_community->hide();
ui->icon->clear();
ui->title->clear();
ui->author->clear();
ui->label_2->clear();
ui->downloadButton->hide();
ui->downloadButton->setEnabled(false);
ui->pushButton_3->hide();
// QListWidgetItem *item = nullptr;
// while ((item = ui->listWidget->takeItem(0)) != nullptr)
// {
// QWidget *card = ui->listWidget->itemWidget(item);
// if (card)
// {
// card->deleteLater();
// card = nullptr;
// }
// delete item;
// item = nullptr;
// }
ui->listWidget->clear(); // NOTE: QListWidget::clear() 会析构所有 items
}
void AppIntoPage::setTheme(bool dark)
{
if (dark)
{
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #252525; border-radius: 14px; border: 1px solid rgb(64, 64, 64);}\
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #FFFFFF}";
ui->frame->setStyleSheet(frameStyleSheet);
ui->frame_2->setStyleSheet(frameStyleSheet);
ui->frame_3->setStyleSheet(frameStyleSheet);
ui->frame_4->setStyleSheet(frameStyleSheet);
ui->icon_1->setPixmap(QPixmap(":/icon/dark/box.svg"));
ui->icon_2->setPixmap(QPixmap(":/icon/dark/box.svg"));
ui->icon_3->setPixmap(QPixmap(":/icon/dark/calendar.svg"));
ui->icon_4->setPixmap(QPixmap(":/icon/dark/text.svg"));
ui->icon_5->setPixmap(QPixmap(":/icon/dark/folder.svg"));
ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg"));
}
else
{
//亮色模式
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #fbfbfb; border-radius: 14px; border: 1px solid rgb(229,229,229);}\
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #000000}";
ui->frame->setStyleSheet(frameStyleSheet);
ui->frame_2->setStyleSheet(frameStyleSheet);
ui->frame_3->setStyleSheet(frameStyleSheet);
ui->frame_4->setStyleSheet(frameStyleSheet);
ui->icon_1->setPixmap(QPixmap(":/icon/light/box.svg"));
ui->icon_2->setPixmap(QPixmap(":/icon/light/box.svg"));
ui->icon_3->setPixmap(QPixmap(":/icon/light/calendar.svg"));
ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg"));
ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg"));
ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg"));
}
}
void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
{
if (dw)
{
dw->deleteLater();
dw = nullptr;
}
dw = w;
connect(w, &DownloadListWidget::downloadFinished, [=]()
{ isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); });
}
void AppIntoPage::initUI()
{
ui->setupUi(this);
ui->listWidget->setViewMode(QListView::IconMode);
ui->listWidget->setFlow(QListView::TopToBottom);
ui->listWidget->setMovement(QListView::Static);
ui->listWidget->setMaximumHeight(200);
clear();
}
void AppIntoPage::initConnections()
{
connect(api, &SparkAPI::finishedRAW, [=](QString download_times)
{
download_times = download_times.trimmed();
qDebug() << "Download Times:" + download_times;
ui->download_times->setText(download_times); });
}
void AppIntoPage::isDownloading(const QUrl &url)
{
int index = dw->getUrlList().lastIndexOf(url);
if (index == -1)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
return; return;
} }
else
DownloadItem *item = dw->getDIList().at(index);
if (item == nullptr)
{ {
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(true);
return;
} }
ui->downloadButton->setEnabled(false);
ui->pushButton_3->hide(); ui->pushButton_3->hide();
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2) if (item->download == 2)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->downloadButton->setText(tr("Download")); ui->downloadButton->setText(tr("Download"));
} }
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1) if (item->download == 1)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->downloadButton->setText(tr("Install")); ui->downloadButton->setText(tr("Install"));
} }
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall) if (item->isInstall)
{ {
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(false);
ui->downloadButton->setText(tr("Installing")); ui->downloadButton->setText(tr("Installing"));
return; return;
} }
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3) if (item->download == 3)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->downloadButton->setText(tr("Reinstall")); ui->downloadButton->setText(tr("Reinstall"));
@@ -245,9 +332,9 @@ void AppIntoPage::isDownloading(QUrl url)
} }
} }
void AppIntoPage::sltAppinfoTags(QStringList *tagList) void AppIntoPage::setAppinfoTags(const QStringList &tagList)
{ {
foreach (const QString &tag, *tagList) foreach (const QString &tag, tagList)
{ {
if (tag == "community") if (tag == "community")
{ {
@@ -283,69 +370,42 @@ void AppIntoPage::sltAppinfoTags(QStringList *tagList)
} }
} }
} }
void AppIntoPage::setTheme(bool dark)
{
if (dark)
{
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #252525; border-radius: 14px; border: 1px solid rgb(64, 64, 64);}\
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #FFFFFF}";
ui->frame->setStyleSheet(frameStyleSheet);
ui->frame_2->setStyleSheet(frameStyleSheet);
ui->frame_3->setStyleSheet(frameStyleSheet);
ui->frame_4->setStyleSheet(frameStyleSheet);
ui->icon_1->setPixmap(QPixmap(":/icon/dark/box.svg"));
ui->icon_2->setPixmap(QPixmap(":/icon/dark/box.svg"));
ui->icon_3->setPixmap(QPixmap(":/icon/dark/calendar.svg"));
ui->icon_4->setPixmap(QPixmap(":/icon/dark/text.svg"));
ui->icon_5->setPixmap(QPixmap(":/icon/dark/folder.svg"));
ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg"));
}else {
//亮色模式
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #fbfbfb; border-radius: 14px; border: 1px solid rgb(229,229,229);}\
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #000000}";
ui->frame->setStyleSheet(frameStyleSheet);
ui->frame_2->setStyleSheet(frameStyleSheet);
ui->frame_3->setStyleSheet(frameStyleSheet);
ui->frame_4->setStyleSheet(frameStyleSheet);
ui->icon_1->setPixmap(QPixmap(":/icon/light/box.svg"));
ui->icon_2->setPixmap(QPixmap(":/icon/light/box.svg"));
ui->icon_3->setPixmap(QPixmap(":/icon/light/calendar.svg"));
ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg"));
ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg"));
ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg"));
}
}
AppIntoPage::~AppIntoPage()
{
delete ui;
}
void AppIntoPage::on_downloadButton_clicked() void AppIntoPage::on_downloadButton_clicked()
{ {
QString downloadUrl = SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString();
if (ui->downloadButton->text() == tr("Install")) if (ui->downloadButton->text() == tr("Install"))
{ {
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())]->install(0); DownloadItem *item = dw->getDIList()[dw->getUrlList().lastIndexOf(downloadUrl)];
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); if (item == nullptr)
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]()
{ {
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); });
return; return;
} }
connect(item, &DownloadItem::finished, [=]() { isDownloading(downloadUrl); });
item->install(0);
isDownloading(downloadUrl);
return;
}
emit clickedDownloadBtn(); emit clickedDownloadBtn();
dw->addItem(info["Name"].toString(), info["Filename"].toString(), info["Pkgname"].toString(), iconpixmap, SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
DownloadItem *item = dw->addItem(info["Name"].toString(), info["Filename"].toString(), info["Pkgname"].toString(), iconpixmap, downloadUrl);
if (item == nullptr)
{
return;
}
if (ui->downloadButton->text() == tr("Reinstall")) if (ui->downloadButton->text() == tr("Reinstall"))
{ {
dw->getDIList()[dw->allDownload - 1]->reinstall = true; item->reinstall = true;
} }
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(false);
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]() connect(item, &DownloadItem::finished, [=]() { isDownloading(downloadUrl); });
{
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); isDownloading(downloadUrl);
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); });
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
} }
void AppIntoPage::on_pushButton_3_clicked() void AppIntoPage::on_pushButton_3_clicked()
@@ -380,9 +440,9 @@ void AppIntoPage::on_pushButton_3_clicked()
void AppIntoPage::on_shareButton_clicked() void AppIntoPage::on_shareButton_clicked()
{ {
qDebug() << "Share" << spk; qDebug() << "Share" << spk;
Application::clipboard()->setText(spk.toString());
Utils::sendNotification("spark-store", tr("Spark Store"), tr("The URL has been copied to the clipboard")); Utils::sendNotification("spark-store", tr("Spark Store"), tr("The URL has been copied to the clipboard"));
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(spk.toString());
} }
void AppIntoPage::on_updateButton_clicked() void AppIntoPage::on_updateButton_clicked()

View File

@@ -1,52 +1,55 @@
#ifndef APPINTOPAGE_H #ifndef APPINTOPAGE_H
#define APPINTOPAGE_H #define APPINTOPAGE_H
#include <QWidget>
#include <QUrl>
#include <QString>
#include <QtConcurrent>
#include <QClipboard>
#include "backend/sparkapi.h"
#include "backend/image_show.h"
#include "widgets/downloadlistwidget.h"
#include "utils/utils.h" #include "utils/utils.h"
#include <QWidget>
#include <QJsonObject>
#include <QUrl>
namespace Ui { namespace Ui {
class AppIntoPage; class AppIntoPage;
} }
class SparkAPI;
class DownloadListWidget;
class AppIntoPage : public QWidget class AppIntoPage : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
void clear();
void setDownloadWidget(DownloadListWidget *w);
void setTheme(bool dark);
void openUrl(QUrl url);
explicit AppIntoPage(QWidget *parent = nullptr); explicit AppIntoPage(QWidget *parent = nullptr);
~AppIntoPage(); ~AppIntoPage() override;
private slots: void openUrl(const QUrl &url);
void on_downloadButton_clicked(); void clear();
void setTheme(bool dark);
void on_pushButton_3_clicked(); void setDownloadWidget(DownloadListWidget *w);
void on_shareButton_clicked();
void on_updateButton_clicked();
private: private:
SparkAPI *api1; void initUI();
QJsonObject info; void initConnections();
QPixmap iconpixmap; void isDownloading(const QUrl &url);
QUrl spk; void setAppinfoTags(const QStringList &tagList);
void isDownloading(QUrl url);
void sltAppinfoTags(QStringList *tagList);
DownloadListWidget *dw;
Ui::AppIntoPage *ui;
signals: signals:
void clickedDownloadBtn(); void clickedDownloadBtn();
private slots:
void on_downloadButton_clicked();
void on_pushButton_3_clicked();
void on_shareButton_clicked();
void on_updateButton_clicked();
private:
Ui::AppIntoPage *ui;
SparkAPI *api;
DownloadListWidget *dw = nullptr;
QJsonObject info;
QPixmap iconpixmap;
QUrl spk;
}; };
#endif // APPINTOPAGE_H #endif // APPINTOPAGE_H

View File

@@ -1,19 +1,32 @@
#include "utils.h" #include "utils.h"
#include "application.h"
Utils::Utils() #include <DSysInfo>
{
}
// Author: chatGPT #include <QDBusInterface>
void Utils::sendNotification(QString icon, QString title, QString body) #include <QProcessEnvironment>
#include <QSettings>
#include <QStandardPaths>
#include <QFile>
#define UOSDeveloperModeFile "/var/lib/deepin/developer-mode/enabled"
/**
* @author chatGPT
* @brief Utils::sendNotification 发送系统通知
* @param icon 图标名称
* @param title 通知标题
* @param body 通知内容
*/
void Utils::sendNotification(const QString &icon, const QString &title, const QString &body)
{ {
QDBusInterface iface("org.freedesktop.Notifications", QDBusInterface interface("org.freedesktop.Notifications",
"/org/freedesktop/Notifications", "/org/freedesktop/Notifications",
"org.freedesktop.Notifications"); "org.freedesktop.Notifications");
QVariantList args; QVariantList args;
args << QCoreApplication::applicationName() // the name of the application args << Application::applicationName() // the name of the application
<< (uint)0 // replaces the previous notification with the same ID << static_cast<quint32>(0) // replaces the previous notification with the same ID
<< icon // the application icon of the notification << icon // the application icon of the notification
<< title // the title of the notification << title // the title of the notification
<< body // the body of the notification << body // the body of the notification
@@ -21,5 +34,151 @@ void Utils::sendNotification(QString icon, QString title, QString body)
<< QVariantMap() // no hints << QVariantMap() // no hints
<< -1; // no timeout << -1; // no timeout
iface.callWithArgumentList(QDBus::AutoDetect, "Notify", args); interface.callWithArgumentList(QDBus::AutoDetect, "Notify", args);
}
/**
* @brief Utils::isDDE 判断是否使用 DDE 桌面环境
* @return
*/
bool Utils::isDDE()
{
bool isDDE = true;
if (!QString::fromUtf8(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
{
qputenv("XDG_CURRENT_DESKTOP", "Deepin");
isDDE = false;
}
return isDDE;
}
/**
* @brief Utils::isWayland 判断是否使用 wayland 显示协议
* @return bool true: 使用 wayland 显示协议 false: 使用 x11 显示协议
*/
bool Utils::isWayland()
{
bool isWayland = false;
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString XDG_SESSION_TYPE = env.value(QStringLiteral("XDG_SESSION_TYPE"));
QString WAYLAND_DISPLAY = env.value(QStringLiteral("WAYLAND_DISPLAY"));
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
{
isWayland = true;
}
return isWayland;
}
/**
* @brief Utils::initConfig 初始化 config.ini 配置文件,去除废弃字段
*/
void Utils::initConfig()
{
// WARNING: 请在 组织名称 和 应用程序名称 初始化完成后调用
bool useWayland = true;
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
if (config.contains("build/useWayland"))
{
useWayland = config.value("build/useWayland").toBool();
}
config.remove("build/isDeepinOS");
config.remove("build/isWayland");
config.remove("build/useWayland");
config.setValue("runtime/isDDE", isDDE());
config.setValue("runtime/isWayland", isWayland());
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
if (!config.contains("runtime/useWayland"))
{
config.setValue("runtime/useWayland", useWayland);
}
config.sync(); // 写入更改至 config.ini并同步最新内容
checkUOSDeveloperMode(); // Check UOS developer mode
}
/**
* @brief Utils::isUOS 判断是否为 UOS 操作系统
* @return bool true: UOS 操作系统 false: 非 UOS 操作系统
*/
bool Utils::isUOS()
{
// WARNING: 请在 组织名称 和 应用程序名称 初始化完成后调用
bool isUOS = false;
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
if (Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos)
{
isUOS = true;
config.setValue("UOS/isUOS", true);
}
else
{
isUOS = false;
config.remove("UOS");
}
config.sync(); // 写入更改至 config.ini并同步最新内容
return isUOS;
}
/**
* @brief Utils::setQPAPlatform Set display backend
*/
void Utils::setQPAPlatform()
{
// WARNING: 请在 initConfig() 执行后调用
bool isDDE = Utils::isDDE(); // WARNING: 只能执行一次,后续执行时环境变量已经被覆盖,导致判断错误
bool isWayland = Utils::isWayland();
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
bool useWayland = config.value("runtime/useWayland").toBool();
qDebug() << "System Wayland enabled:" << isWayland << "Spark Wayland enabled:" << useWayland;
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDeepin() || isDDE))
{
qputenv("QT_QPA_PLATFORM", "wayland");
}
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDeepin() && isDDE))
{
qputenv("QT_QPA_PLATFORM", "dwayland");
}
else
{
qputenv("QT_QPA_PLATFORM", "dxcb");
}
}
/**
* @brief Utils::checkUOSDeveloperMode Check UOS developer mode
*/
void Utils::checkUOSDeveloperMode()
{
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
QFile file(UOSDeveloperModeFile);
if (Utils::isUOS() && file.exists() && file.open(QFile::ReadOnly | QFile::Text))
{
QString lineData = QString::fromUtf8(file.readLine());
bool devmode = lineData.trimmed().toInt();
qDebug() << "UOS Developer Mode Status:" << devmode;
config.setValue("UOS/EnableDeveloperMode", devmode);
}
else
{
/**
* NOTE: Utils::isUOS() 中,判断为非 UOS 时已经从 config 中删除 UOS 组,
* 此处若包含该字段则一定是 UOS直接写入开发者模式开关状态即可
*/
if (config.contains("UOS/EnableDeveloperMode"))
{
config.setValue("UOS/EnableDeveloperMode", false);
}
}
file.close();
config.sync(); // 写入更改至 config.ini并同步最新内容
} }

View File

@@ -2,13 +2,17 @@
#define UTILS_H #define UTILS_H
#include <QObject> #include <QObject>
#include <QtDBus>
class Utils class Utils
{ {
public: public:
Utils(); static void sendNotification(const QString &icon, const QString &title, const QString &body);
static void sendNotification(QString icon,QString title,QString body); static bool isDDE();
static bool isWayland();
static void initConfig();
static bool isUOS();
static void setQPAPlatform();
static void checkUOSDeveloperMode();
}; };
#endif // UTILS_H #endif // UTILS_H

View File

@@ -1,8 +1,5 @@
#include "widgetanimation.h" #include "widgetanimation.h"
#include "widgets/base/basewidgetopacity.h"
WidgetAnimation::WidgetAnimation()
{
}
void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange) void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
{ {
@@ -28,27 +25,35 @@ void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
QPropertyAnimation *WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear) QPropertyAnimation *WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear)
{ {
QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget); QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget);
// 设置动画效果
animation->setEasingCurve(QEasingCurve::Linear);
// 设置动画时间(单位:毫秒) // 设置动画时间(单位:毫秒)
animation->setDuration(500); animation->setDuration(500);
// 设置动画步长值,以及在该位置时显示的透明度
if (isAppear) if (isAppear)
{ {
animation->setKeyValueAt(0, 0); // 设置动画效果
// m_animation->setKeyValueAt(0.5, 0); animation->setEasingCurve(QEasingCurve::Linear);
animation->setKeyValueAt(1, 1); // 设置动画步长值,以及在该位置时显示的透明度(即动画关键帧)
animation->setKeyValueAt(0.0, 0.0);
animation->setKeyValueAt(1.0, 1.0);
} }
else else
{ {
animation->setKeyValueAt(0, 1); animation->setEasingCurve(QEasingCurve::OutQuart);
animation->setKeyValueAt(1, 0); animation->setKeyValueAt(0.0, 1.0);
animation->setKeyValueAt(1.0, 0.0);
QObject::connect(animation, &QPropertyAnimation::finished, pWidget, [=]() { pWidget->close(); });
} }
QObject::connect(animation, &QPropertyAnimation::valueChanged, pWidget, [=]()
{
pWidget->update(); // NOTE: 保证窗口透明度动画平滑
});
return animation; return animation;
} }
void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear) void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear)
{ {
// 开始动画 // 启动/关闭动画
createWidgetOpacity(pWidget, isAppear)->start(); createWidgetOpacity(pWidget, isAppear)->start(QPropertyAnimation::DeleteWhenStopped);
} }

View File

@@ -1,14 +1,12 @@
#ifndef WIDGETANIMATION_H #ifndef WIDGETANIMATION_H
#define WIDGETANIMATION_H #define WIDGETANIMATION_H
#include <QObject>
#include <QWidget> #include <QWidget>
#include <QPropertyAnimation> #include <QPropertyAnimation>
class WidgetAnimation class WidgetAnimation
{ {
public: public:
WidgetAnimation();
static void widgetShake(QWidget *pWidget, int nRange); static void widgetShake(QWidget *pWidget, int nRange);
static QPropertyAnimation* createWidgetOpacity(QWidget *pWidget, bool isAppear); static QPropertyAnimation* createWidgetOpacity(QWidget *pWidget, bool isAppear);

View File

@@ -1,5 +1,6 @@
#include "basewidgetopacity.h" #include "basewidgetopacity.h"
#include "utils/widgetanimation.h" #include "utils/widgetanimation.h"
#include "utils/utils.h"
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
@@ -8,7 +9,6 @@
BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent) BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent)
{ {
// WidgetAnimation::widgetOpacity(this,true);
} }
/** /**
@@ -19,7 +19,7 @@ void BaseWidgetOpacity::showEvent(QShowEvent *event)
{ {
// FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?) // FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?)
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
bool isWayland = config.value("build/isWayland").toBool(); bool isWayland = Utils::isWayland();
if (!isWayland) if (!isWayland)
{ {
if (!showWindowAnimation) if (!showWindowAnimation)
@@ -32,13 +32,15 @@ void BaseWidgetOpacity::showEvent(QShowEvent *event)
DBlurEffectWidget::showEvent(event); DBlurEffectWidget::showEvent(event);
} }
/// @brief 窗口关闭事件 /**
/// @param event * @brief 窗口关闭事件
* @param event
*/
void BaseWidgetOpacity::closeEvent(QCloseEvent *event) void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
{ {
// FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?) // FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?)
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
bool isWayland = config.value("build/isWayland").toBool(); bool isWayland = Utils::isWayland();
if (isWayland) if (isWayland)
{ {
return DBlurEffectWidget::closeEvent(event); return DBlurEffectWidget::closeEvent(event);
@@ -47,23 +49,8 @@ void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
if (!closeWindowAnimation) if (!closeWindowAnimation)
{ {
closeWindowAnimation = true; closeWindowAnimation = true;
WidgetAnimation::widgetOpacity(this, false);
QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
animation->setEasingCurve(QEasingCurve::OutQuart);
animation->setDuration(500);
animation->setStartValue(1.0);
animation->setEndValue(0.0);
QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value)
{
this->update();
// setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100)));
});
QObject::connect(animation, &QPropertyAnimation::finished, this, [=]()
{ this->close(); });
animation->start();
event->ignore(); event->ignore();
} }
else else

View File

@@ -106,6 +106,44 @@ void DownloadItem::install(int t)
QtConcurrent::run([=]() QtConcurrent::run([=]()
{ {
slotAsyncInstall(t);
});
qDebug() << ui->label_filename->text().toUtf8();
}
}
void DownloadItem::on_pushButton_install_clicked()
{
DownloadItem::install(0);
}
void DownloadItem::on_pushButton_2_clicked()
{
ui->label_2->setText(tr("Download canceled"));
ui->label_2->setToolTip(tr("Download canceled"));
download = 2;
ui->pushButton_2->setEnabled(false);
ui->progressBar->hide();
close = true;
}
void DownloadItem::on_pushButton_3_clicked()
{
textbrowser->setLineWidth(0);
textbrowser->setText(out);
textbrowser->setMinimumHeight(500);
output_w->setMinimumHeight(600);
output_w->setAttribute(Qt::WA_TranslucentBackground);
output_w->setTitle(ui->label->text());
output_w->layout()->setMargin(20);
output_w->layout()->addWidget(textbrowser);
output_w->show();
}
void DownloadItem::slotAsyncInstall(int t)
{
QProcess installer; QProcess installer;
switch(t) switch(t)
{ {
@@ -173,37 +211,5 @@ void DownloadItem::install(int t)
ui->widget_spinner->hide(); ui->widget_spinner->hide();
DownloadItem::isInstall = false; DownloadItem::isInstall = false;
emit finished(); }); emit finished();
// emit finished();
qDebug() << ui->label_filename->text().toUtf8();
}
}
void DownloadItem::on_pushButton_install_clicked()
{
DownloadItem::install(0);
}
void DownloadItem::on_pushButton_2_clicked()
{
ui->label_2->setText(tr("Download canceled"));
ui->label_2->setToolTip(tr("Download canceled"));
download = 2;
ui->pushButton_2->setEnabled(false);
ui->progressBar->hide();
close = true;
}
void DownloadItem::on_pushButton_3_clicked()
{
textbrowser->setLineWidth(0);
textbrowser->setText(out);
textbrowser->setMinimumHeight(500);
output_w->setMinimumHeight(600);
output_w->setAttribute(Qt::WA_TranslucentBackground);
output_w->setTitle(ui->label->text());
output_w->layout()->setMargin(20);
output_w->layout()->addWidget(textbrowser);
output_w->show();
} }

View File

@@ -59,6 +59,8 @@ private slots:
void on_pushButton_2_clicked(); void on_pushButton_2_clicked();
void on_pushButton_3_clicked(); void on_pushButton_3_clicked();
void slotAsyncInstall(int t);
signals: signals:
void finished(); void finished();
}; };

View File

@@ -54,36 +54,42 @@ DownloadListWidget::~DownloadListWidget()
{ {
if (downloadController) if (downloadController)
{ {
downloadController->disconnect();
downloadController->stopDownload(); downloadController->stopDownload();
downloadController->deleteLater();
} }
clearItem();
delete ui; delete ui;
} }
void DownloadListWidget::clearItem() void DownloadListWidget::clearItem()
{ {
ui->listWidget->vScrollBar->scrollTop(); // QListWidgetItem *item = nullptr;
int n = ui->listWidget->count(); // while ((item = ui->listWidget->takeItem(0)) != nullptr)
for (int i = 0; i < n; i++) // {
{ // QWidget *card = ui->listWidget->itemWidget(item);
QListWidgetItem *item = ui->listWidget->takeItem(0); // if (card)
QWidget *card = ui->listWidget->itemWidget(item); // {
delete card; // card->deleteLater();
card = NULL; // card = nullptr;
delete item; // }
item = NULL; // delete item;
} // item = nullptr;
// }
// ui->listWidget->vScrollBar->scrollTop();
ui->listWidget->clear(); ui->listWidget->clear();
} }
void DownloadListWidget::addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl) DownloadItem* DownloadListWidget::addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl)
{ {
if (fileName.isEmpty()) if (fileName.isEmpty())
{ {
return; return nullptr;
} }
urList.append(downloadurl); urList.append(downloadurl);
allDownload += 1; allDownload += 1;
DownloadItem *di = new DownloadItem(this); DownloadItem *di = new DownloadItem;
dlist << downloadurl; dlist << downloadurl;
downloaditemlist << di; downloaditemlist << di;
di->setName(name); di->setName(name);
@@ -99,6 +105,8 @@ void DownloadListWidget::addItem(QString name, QString fileName, QString pkgName
nowDownload += 1; nowDownload += 1;
startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求 startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求
} }
return di;
} }
QList<DownloadItem *> DownloadListWidget::getDIList() QList<DownloadItem *> DownloadListWidget::getDIList()
@@ -119,7 +127,13 @@ void DownloadListWidget::startRequest(QUrl url, QString fileName)
isdownload = true; isdownload = true;
downloaditemlist[allDownload - 1]->free = false; downloaditemlist[allDownload - 1]->free = false;
downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化 if (downloadController)
{
downloadController->disconnect();
downloadController->stopDownload();
downloadController->deleteLater();
}
downloadController = new DownloadController; // 并发下载,在点击下载按钮的时候才会初始化
connect(downloadController, &DownloadController::downloadProcess, this, &DownloadListWidget::updateDataReadProgress); connect(downloadController, &DownloadController::downloadProcess, this, &DownloadListWidget::updateDataReadProgress);
connect(downloadController, &DownloadController::downloadFinished, this, &DownloadListWidget::httpFinished); connect(downloadController, &DownloadController::downloadFinished, this, &DownloadListWidget::httpFinished);
// connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);}); // connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);});

View File

@@ -20,7 +20,7 @@ class DownloadListWidget : public DBlurEffectWidget
Q_OBJECT Q_OBJECT
public: public:
void addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl); DownloadItem *addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl);
int nowDownload = 0; int nowDownload = 0;
int allDownload = 0; int allDownload = 0;
QList<DownloadItem *> getDIList(); QList<DownloadItem *> getDIList();
@@ -35,7 +35,7 @@ private:
QStringList dlist; QStringList dlist;
QList<QUrl> urList; QList<QUrl> urList;
QList<DownloadItem *> downloaditemlist; QList<DownloadItem *> downloaditemlist;
DownloadController *downloadController; DownloadController *downloadController = nullptr;
int nowdownload = 0; int nowdownload = 0;
QString theSpeed; QString theSpeed;
QTimer download_speed; QTimer download_speed;

View File

@@ -10,9 +10,9 @@
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="244"/> <location filename="../src/pages/appintopage.ui" line="244"/>
<location filename="../src/pages/appintopage.cpp" line="160"/> <location filename="../src/pages/appintopage.cpp" line="171"/>
<location filename="../src/pages/appintopage.cpp" line="226"/> <location filename="../src/pages/appintopage.cpp" line="308"/>
<location filename="../src/pages/appintopage.cpp" line="368"/> <location filename="../src/pages/appintopage.cpp" line="416"/>
<source>Download</source> <source>Download</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -175,51 +175,51 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="87"/> <location filename="../src/pages/appintopage.cpp" line="45"/>
<source>Click Open</source> <source>Click Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="96"/> <location filename="../src/pages/appintopage.cpp" line="110"/>
<source>Developer Mode Disabled</source> <source>Developer Mode Disabled</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="145"/> <location filename="../src/pages/appintopage.cpp" line="156"/>
<location filename="../src/pages/appintopage.cpp" line="242"/> <location filename="../src/pages/appintopage.cpp" line="324"/>
<location filename="../src/pages/appintopage.cpp" line="339"/> <location filename="../src/pages/appintopage.cpp" line="386"/>
<source>Reinstall</source> <source>Reinstall</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="152"/> <location filename="../src/pages/appintopage.cpp" line="163"/>
<source>Upgrade</source> <source>Upgrade</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="231"/> <location filename="../src/pages/appintopage.cpp" line="313"/>
<location filename="../src/pages/appintopage.cpp" line="327"/> <location filename="../src/pages/appintopage.cpp" line="371"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="236"/> <location filename="../src/pages/appintopage.cpp" line="318"/>
<source>Installing</source> <source>Installing</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="372"/> <location filename="../src/pages/appintopage.cpp" line="420"/>
<location filename="../src/pages/appintopage.cpp" line="383"/> <location filename="../src/pages/appintopage.cpp" line="433"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="372"/> <location filename="../src/pages/appintopage.cpp" line="420"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="383"/> <location filename="../src/pages/appintopage.cpp" line="433"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -452,32 +452,32 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="161"/> <location filename="../src/mainwindow-dtk.cpp" line="165"/>
<source>Submit App</source> <source>Submit App</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="162"/> <location filename="../src/mainwindow-dtk.cpp" line="166"/>
<source>Submit App with client(Recommanded)</source> <source>Submit App with client(Recommanded)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="163"/> <location filename="../src/mainwindow-dtk.cpp" line="167"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="164"/> <location filename="../src/mainwindow-dtk.cpp" line="168"/>
<source>APP Upgrade and Install Settings</source> <source>APP Upgrade and Install Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="123"/> <location filename="../src/mainwindow-dtk.cpp" line="127"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="128"/> <location filename="../src/mainwindow-dtk.cpp" line="132"/>
<source>Search or enter spk://</source> <source>Search or enter spk://</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -487,7 +487,7 @@
<message> <message>
<location filename="../src/application.cpp" line="28"/> <location filename="../src/application.cpp" line="28"/>
<location filename="../src/application.cpp" line="29"/> <location filename="../src/application.cpp" line="29"/>
<location filename="../src/mainwindow-dtk.cpp" line="103"/> <location filename="../src/mainwindow-dtk.cpp" line="107"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -507,7 +507,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="217"/> <location filename="../src/mainwindow-dtk.cpp" line="221"/>
<source>Show MainWindow</source> <source>Show MainWindow</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -618,12 +618,12 @@
<context> <context>
<name>TitleBarMenu</name> <name>TitleBarMenu</name>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="218"/> <location filename="../src/mainwindow-dtk.cpp" line="222"/>
<source>About</source> <source>About</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="219"/> <location filename="../src/mainwindow-dtk.cpp" line="223"/>
<source>Exit</source> <source>Exit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@@ -10,9 +10,9 @@
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="244"/> <location filename="../src/pages/appintopage.ui" line="244"/>
<location filename="../src/pages/appintopage.cpp" line="160"/> <location filename="../src/pages/appintopage.cpp" line="171"/>
<location filename="../src/pages/appintopage.cpp" line="226"/> <location filename="../src/pages/appintopage.cpp" line="308"/>
<location filename="../src/pages/appintopage.cpp" line="368"/> <location filename="../src/pages/appintopage.cpp" line="416"/>
<source>Download</source> <source>Download</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -175,51 +175,51 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="87"/> <location filename="../src/pages/appintopage.cpp" line="45"/>
<source>Click Open</source> <source>Click Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="96"/> <location filename="../src/pages/appintopage.cpp" line="110"/>
<source>Developer Mode Disabled</source> <source>Developer Mode Disabled</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="145"/> <location filename="../src/pages/appintopage.cpp" line="156"/>
<location filename="../src/pages/appintopage.cpp" line="242"/> <location filename="../src/pages/appintopage.cpp" line="324"/>
<location filename="../src/pages/appintopage.cpp" line="339"/> <location filename="../src/pages/appintopage.cpp" line="386"/>
<source>Reinstall</source> <source>Reinstall</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="152"/> <location filename="../src/pages/appintopage.cpp" line="163"/>
<source>Upgrade</source> <source>Upgrade</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="231"/> <location filename="../src/pages/appintopage.cpp" line="313"/>
<location filename="../src/pages/appintopage.cpp" line="327"/> <location filename="../src/pages/appintopage.cpp" line="371"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="236"/> <location filename="../src/pages/appintopage.cpp" line="318"/>
<source>Installing</source> <source>Installing</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="372"/> <location filename="../src/pages/appintopage.cpp" line="420"/>
<location filename="../src/pages/appintopage.cpp" line="383"/> <location filename="../src/pages/appintopage.cpp" line="433"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="372"/> <location filename="../src/pages/appintopage.cpp" line="420"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="383"/> <location filename="../src/pages/appintopage.cpp" line="433"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -452,32 +452,32 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="161"/> <location filename="../src/mainwindow-dtk.cpp" line="165"/>
<source>Submit App</source> <source>Submit App</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="162"/> <location filename="../src/mainwindow-dtk.cpp" line="166"/>
<source>Submit App with client(Recommanded)</source> <source>Submit App with client(Recommanded)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="163"/> <location filename="../src/mainwindow-dtk.cpp" line="167"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="164"/> <location filename="../src/mainwindow-dtk.cpp" line="168"/>
<source>APP Upgrade and Install Settings</source> <source>APP Upgrade and Install Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="123"/> <location filename="../src/mainwindow-dtk.cpp" line="127"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="128"/> <location filename="../src/mainwindow-dtk.cpp" line="132"/>
<source>Search or enter spk://</source> <source>Search or enter spk://</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -487,7 +487,7 @@
<message> <message>
<location filename="../src/application.cpp" line="28"/> <location filename="../src/application.cpp" line="28"/>
<location filename="../src/application.cpp" line="29"/> <location filename="../src/application.cpp" line="29"/>
<location filename="../src/mainwindow-dtk.cpp" line="103"/> <location filename="../src/mainwindow-dtk.cpp" line="107"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -507,7 +507,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="217"/> <location filename="../src/mainwindow-dtk.cpp" line="221"/>
<source>Show MainWindow</source> <source>Show MainWindow</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -618,12 +618,12 @@
<context> <context>
<name>TitleBarMenu</name> <name>TitleBarMenu</name>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="218"/> <location filename="../src/mainwindow-dtk.cpp" line="222"/>
<source>About</source> <source>About</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="219"/> <location filename="../src/mainwindow-dtk.cpp" line="223"/>
<source>Exit</source> <source>Exit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@@ -10,9 +10,9 @@
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="244"/> <location filename="../src/pages/appintopage.ui" line="244"/>
<location filename="../src/pages/appintopage.cpp" line="160"/> <location filename="../src/pages/appintopage.cpp" line="171"/>
<location filename="../src/pages/appintopage.cpp" line="226"/> <location filename="../src/pages/appintopage.cpp" line="308"/>
<location filename="../src/pages/appintopage.cpp" line="368"/> <location filename="../src/pages/appintopage.cpp" line="416"/>
<source>Download</source> <source>Download</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -175,51 +175,51 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="87"/> <location filename="../src/pages/appintopage.cpp" line="45"/>
<source>Click Open</source> <source>Click Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="96"/> <location filename="../src/pages/appintopage.cpp" line="110"/>
<source>Developer Mode Disabled</source> <source>Developer Mode Disabled</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="145"/> <location filename="../src/pages/appintopage.cpp" line="156"/>
<location filename="../src/pages/appintopage.cpp" line="242"/> <location filename="../src/pages/appintopage.cpp" line="324"/>
<location filename="../src/pages/appintopage.cpp" line="339"/> <location filename="../src/pages/appintopage.cpp" line="386"/>
<source>Reinstall</source> <source>Reinstall</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="152"/> <location filename="../src/pages/appintopage.cpp" line="163"/>
<source>Upgrade</source> <source>Upgrade</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="231"/> <location filename="../src/pages/appintopage.cpp" line="313"/>
<location filename="../src/pages/appintopage.cpp" line="327"/> <location filename="../src/pages/appintopage.cpp" line="371"/>
<source>Install</source> <source>Install</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="236"/> <location filename="../src/pages/appintopage.cpp" line="318"/>
<source>Installing</source> <source>Installing</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="372"/> <location filename="../src/pages/appintopage.cpp" line="420"/>
<location filename="../src/pages/appintopage.cpp" line="383"/> <location filename="../src/pages/appintopage.cpp" line="433"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="372"/> <location filename="../src/pages/appintopage.cpp" line="420"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="383"/> <location filename="../src/pages/appintopage.cpp" line="433"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -452,32 +452,32 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="161"/> <location filename="../src/mainwindow-dtk.cpp" line="165"/>
<source>Submit App</source> <source>Submit App</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="162"/> <location filename="../src/mainwindow-dtk.cpp" line="166"/>
<source>Submit App with client(Recommanded)</source> <source>Submit App with client(Recommanded)</source>
<translation>使稿</translation> <translation>使稿</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="163"/> <location filename="../src/mainwindow-dtk.cpp" line="167"/>
<source>Settings</source> <source>Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="164"/> <location filename="../src/mainwindow-dtk.cpp" line="168"/>
<source>APP Upgrade and Install Settings</source> <source>APP Upgrade and Install Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="123"/> <location filename="../src/mainwindow-dtk.cpp" line="127"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="128"/> <location filename="../src/mainwindow-dtk.cpp" line="132"/>
<source>Search or enter spk://</source> <source>Search or enter spk://</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -487,7 +487,7 @@
<message> <message>
<location filename="../src/application.cpp" line="28"/> <location filename="../src/application.cpp" line="28"/>
<location filename="../src/application.cpp" line="29"/> <location filename="../src/application.cpp" line="29"/>
<location filename="../src/mainwindow-dtk.cpp" line="103"/> <location filename="../src/mainwindow-dtk.cpp" line="107"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -507,7 +507,7 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="217"/> <location filename="../src/mainwindow-dtk.cpp" line="221"/>
<source>Show MainWindow</source> <source>Show MainWindow</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -618,12 +618,12 @@
<context> <context>
<name>TitleBarMenu</name> <name>TitleBarMenu</name>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="218"/> <location filename="../src/mainwindow-dtk.cpp" line="222"/>
<source>About</source> <source>About</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="219"/> <location filename="../src/mainwindow-dtk.cpp" line="223"/>
<source>Exit</source> <source>Exit</source>
<translation>退</translation> <translation>退</translation>
</message> </message>