Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
53165b3ac9
!19 update dtkcore to 5.6.8.2
From: @lliuzhi 
Reviewed-by: @ut-layne-yang 
Signed-off-by: @ut-layne-yang
2024-04-09 08:06:25 +00:00
liuzhilin
6b9e175a41 update dtkcore to 5.6.8.2 2024-04-09 13:41:44 +08:00
openeuler-ci-bot
cbf8cc32db
!12 [sync] PR-11: upgrade to version 5.5.35
From: @openeuler-sync-bot 
Reviewed-by: @leeffo 
Signed-off-by: @leeffo
2023-08-23 03:05:20 +00:00
leeffo
ef2b098d28 upgrade to version 5.5.35
(cherry picked from commit 084fff6f32c820cd915ee4151e2e68e2bcc3351c)
2023-08-15 11:19:05 +08:00
openeuler-ci-bot
0a66fc78a6
!9 update to 5.5.19
From: @leeffo 
Reviewed-by: @HelloWorld_lvcongqing 
Signed-off-by: @HelloWorld_lvcongqing
2023-04-07 05:44:36 +00:00
liweiganga
ea9ae6a75f update: update to 5.5.19 2023-04-06 17:02:59 +08:00
openeuler-ci-bot
6a3fe8d6c6
!7 feat: for sync 22.09 to master
From: @loong-C 
Reviewed-by: @yeqinglong01 
Signed-off-by: @yeqinglong01
2022-07-29 02:37:29 +00:00
loong_C
63be83ea65 feat: for sync 22.09 to master 2022-07-28 15:51:00 +08:00
openeuler-ci-bot
bbe7c96604 !4 format spec file
From: @weidongkl
Reviewed-by: @yeqinglong01
Signed-off-by: @yeqinglong01
2021-07-16 08:15:50 +00:00
wei dong
55af84f8b1 format dtkcore 2021-07-15 16:47:43 +08:00
openeuler-ci-bot
c6c49d89f0 !3 update dtkcore to 5.2.2.3
From: @weidongkl
Reviewed-by: @yeqinglong01
Signed-off-by: @yeqinglong01
2021-07-15 06:44:48 +00:00
7 changed files with 135 additions and 107 deletions

View File

@ -0,0 +1,78 @@
From c2a3fb6efb854a9e10804f67fef0764042c2d6c5 Mon Sep 17 00:00:00 2001
From: liuzhilin <liuzhilin@uniontech.com>
Date: Fri, 22 Dec 2023 16:54:15 +0800
Subject: [PATCH] LSHW returns a multi-element array when querying memory size
---
src/dsysinfo.cpp | 36 +++++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 7 deletions(-)
diff --git a/src/dsysinfo.cpp b/src/dsysinfo.cpp
index d3f137b..d8914cc 100644
--- a/src/dsysinfo.cpp
+++ b/src/dsysinfo.cpp
@@ -17,6 +17,7 @@
#include <QStandardPaths>
#include <QDateTime>
#include <QRegularExpression>
+#include <QLoggingCategory>
#include <qmath.h>
#ifdef Q_OS_LINUX
@@ -33,6 +34,12 @@
DCORE_BEGIN_NAMESPACE
+#ifdef QT_DEBUG
+Q_LOGGING_CATEGORY(logSysInfo, "dtk.dsysinfo")
+#else
+Q_LOGGING_CATEGORY(logSysInfo, "dtk.dsysinfo", QtInfoMsg)
+#endif
+
class Q_DECL_HIDDEN DSysInfoPrivate
{
public:
@@ -1087,18 +1094,33 @@ qint64 DSysInfo::memoryInstalledSize()
}
const QByteArray &lshwInfoJson = lshw.readAllStandardOutput();
- QJsonArray lshwResultArray = QJsonDocument::fromJson(lshwInfoJson).array();
- if (!lshwResultArray.isEmpty()) {
- QJsonValue memoryHwInfo = lshwResultArray.first();
- QString id = memoryHwInfo.toObject().value("id").toString();
- Q_ASSERT(id == "memory");
- siGlobal->memoryInstalledSize = memoryHwInfo.toObject().value("size").toDouble(); // TODO: check "units" is "bytes" ?
+ QJsonParseError error;
+ auto doc = QJsonDocument::fromJson(lshwInfoJson, &error);
+ if (error.error != QJsonParseError::NoError) {
+ qCWarning(logSysInfo(), "parse failed, expect json doc from lshw command");
+ return -1;
+ }
+
+ if (!doc.isArray()) {
+ qCWarning(logSysInfo(), "parse failed, expect array");
+ return -1;
+ }
+
+ QJsonArray lshwResultArray = doc.array();
+ for (const QJsonValue value : lshwResultArray) {
+ QJsonObject obj = value.toObject();
+ if (obj.contains("id") && obj.value("id").toString() == "memory") {
+ siGlobal->memoryInstalledSize = obj.value("size").toDouble(); // TODO: check "units" is "bytes" ?
+ break;
+ }
}
}
+ Q_ASSERT(siGlobal->memoryInstalledSize > 0);
return siGlobal->memoryInstalledSize;
-#endif
+#else
return -1;
+#endif
}
/*!
--
2.39.3

View File

@ -1,36 +0,0 @@
# dtkcore
#### Description
dtkcore
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,37 +0,0 @@
# dtkcore
#### 介绍
dtkcore
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

BIN
dtkcore-5.6.8.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,14 +1,29 @@
Name: dtkcore
Version: 5.2.2.3+rpm
Release: 1
Version: 5.6.8.2
Release: 2%{?dist}.01
Summary: Deepin tool kit core modules
License: GPLv3
License: LGPLv3+
URL: https://github.com/linuxdeepin/dtkcore
Source0: %{name}_%{version}.orig.tar.xz
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0001: 0001-LSHW-returns-a-multi-element-array-when-querying-mem.patch
BuildRequires: gcc-c++
BuildRequires: annobin
#BuildRequires: annobin
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(gsettings-qt)
BuildRequires: gtest-devel
BuildRequires: qt5-qttools-devel
BuildRequires: dtkcommon-devel
BuildRequires: qt5-qtbase-private-devel
BuildRequires: make cmake
BuildRequires: doxygen libicu-devel
BuildRequires: uchardet-devel
BuildRequires: cmake-rpm-macros
Requires: dtkcommon
# since f30
Obsoletes: deepin-tool-kit <= 0.3.3
Obsoletes: deepin-tool-kit-devel <= 0.3.3
Obsoletes: dtksettings <= 0.1.7
@ -20,54 +35,66 @@ Deepin tool kit core modules.
%package devel
Summary: Development package for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: qt5-qtbase-devel
Requires: dtkcommon-devel
Requires: qt5-qtbase-devel%{?_isa}
%description devel
Header files and libraries for %{name}.
%prep
%setup -q
%autosetup -n %{name}-%{version} -p1
sed -i 's|/lib|/libexec|' tools/settings/settings.pro
%build
# help find (and prefer) qt5 utilities, e.g. qmake, lrelease
export PATH=%{_qt5_bindir}:$PATH
%qmake_qt5 PREFIX=%{_prefix} \
DTK_VERSION=%{version} \
LIB_INSTALL_DIR=%{_libdir} \
BIN_INSTALL_DIR=%{_libexecdir}/dtk5 \
TOOL_INSTALL_DIR=%{_libexecdir}/dtk5
%cmake
%make_build
%install
%make_install INSTALL_ROOT=%{buildroot}
%ldconfig_scriptlets
%files
%doc README.md
%license LICENSE
%{_libdir}/libdtkcore.so.*
%{_libexecdir}/dtk5/dtk-settings
%{_libexecdir}/dtk5/dtk-license.py*
%{_libexecdir}/dtk5/dtk-translate.py*
%{_libexecdir}/dtk5/deepin-os-release
%{_libdir}/lib%{name}.so*
%{_bindir}/*
%files devel
%doc doc/Specification.md
%{_includedir}/libdtk-*/
%{_qt5_archdatadir}/mkspecs/features/*.prf
%doc docs/Specification.md
%{_qt5_archdatadir}/mkspecs/modules/*.pri
%{_libdir}/cmake/Dtk/
%{_libdir}/cmake/DtkCore/
%{_libdir}/cmake/DtkCMake/
%{_libdir}/cmake/DtkTools/
%{_libdir}/pkgconfig/dtkcore.pc
%{_libdir}/libdtkcore.so
/usr/share/glib-2.0/schemas/*
%{_libdir}/lib%{name}.so
%{_includedir}/dtk5/DCore/*
%{_usr}/lib/debug%{_libdir}/dtk5/DCore/bin/*.debug
%{_libdir}/cmake/DtkDConfig/DtkDConfigConfig.cmake
%{_libdir}/dtk5/DCore/bin/*
%{_libdir}/qt5/mkspecs/features/dtk_install_dconfig.prf
%{_datadir}/qt5/doc/dtkcore.qch
%changelog
* Mon Jul 12 2021 weidong <weidong@uniontech.com> - 5.2.2.3-1
- Update 5.2.2.3
* Fri Dec 22 2023 liuzhilin <liuzhilin@uniontech.com> - 5.6.8.2-2.01
- fix: LSHW-returns-a-multi-element-array-when-querying-mem(bugid:228681)
* Tue Oct 10 2023 liweigang <liweiganga@uniontech.com> - 5.6.8.2-2
- spec: change Dcore path
* Mon Oct 09 2023 liweigang <liweiganga@uniontech.com> - 5.6.8.2-1
- update: update to verison 5.6.8.2
* Sun Sep 03 2023 mahailiang <mahailiang@uniontech.com> - 5.6.8-2
- spec: change Dcore path
* Wed Aug 16 2023 liuzhilin <liuzhilin@uniontech.com> - 5.6.8-1
- update: update to 5.6.8
* Fri Dec 23 2022 liweiganga <liweiganga@uniontech.com> - 5.5.35-1
- update: update to 5.5.35
* Mon Jun 13 2022 uoser <uoser@uniontech.com> - 5.5.19-1.02
- update: update to 5.5.19-1.02
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.2.1-1
- Package init

View File

@ -1,4 +0,0 @@
version_control: github
src_repo: linuxdeepin/dtkcore
tag_prefix: ^v
seperator: .

Binary file not shown.