Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c3e12a6c50
!26 [sync] PR-24: fix coredump of ukui-search
From: @openeuler-sync-bot 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-07-24 07:24:49 +00:00
peijiankang
f25b3e02b8 fix coredump of ukui-search
(cherry picked from commit 219273ad9b09e2fead273a43666cac5ee9dbeaf2)
2023-06-16 10:05:28 +08:00
openeuler-ci-bot
aa47544dab
!22 update new version 3.1
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2023-05-24 01:18:26 +00:00
peijiankang
c47fcb005f update new version 3.1 2023-05-23 10:18:40 +08:00
openeuler-ci-bot
3aff024466
!17 sync master to openEuler-22.03-LTS-Next
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2022-06-22 06:52:55 +00:00
peijiankang
d149f9bbb1 update version to 0.4.2 2022-06-22 10:50:55 +08:00
openeuler-ci-bot
0d8aae2506
!12 [sync] PR-11: add ukui-interface BuildRequires
From: @openeuler-sync-bot 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-06-21 08:10:54 +00:00
pei-jiankang
3943d8bd47 add ukui-interface BuildRequires
(cherry picked from commit de12f11baa38b111af449bbeaa492598840764f0)
2022-05-10 10:34:47 +08:00
openeuler-ci-bot
2fda1b87d3 !9 Modified fifo path.
From: @tanyulong2021
Reviewed-by: @dou33
Signed-off-by: @dou33
2021-12-07 07:23:48 +00:00
tanyulong2021
3209574699 Modified fifo path. 2021-12-07 15:09:54 +08:00
12 changed files with 158 additions and 316 deletions

View File

@ -1,27 +0,0 @@
From df1939d0ae618ab22e11a5f161c3df63e51fdc60 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Wed, 27 Oct 2021 18:27:25 +0800
Subject: [PATCH] Update changelog
---
debian/changelog | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 9c45c7e..2ed311f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ukui-search (0.5.1+0926) v101; urgency=medium
+
+ * Bug 78787
+ * 任务号:无
+ * 其他改动:无
+
+ -- zhangpengfei <zhangpengfei@kylinos.cn> Sun, 26 Sep 2021 13:37:10 +0800
ukui-search (0.4.1-1~0803) unstable; urgency=medium
* Initial release.
--
2.30.0

View File

@ -0,0 +1,55 @@
From 1bdde6b56b3d7812f6a8ed6dd26494a467f09f48 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Thu, 15 Jun 2023 18:27:12 +0800
Subject: [PATCH] fix coredump of ukui-search
---
libsearch/index/ocrobject.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libsearch/index/ocrobject.cpp b/libsearch/index/ocrobject.cpp
index 6d3d717..f9f9a6d 100644
--- a/libsearch/index/ocrobject.cpp
+++ b/libsearch/index/ocrobject.cpp
@@ -43,6 +43,9 @@ void OcrObject::getTxtContent(QString &path, QString &textcontent)
// }
//多进程版本
+ // set locale to "C" for tesseract
+ char *old_ctype = strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
//qDebug() << "path:" << path;
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
if (api->Init(NULL, "chi_sim")) {
@@ -72,6 +75,9 @@ void OcrObject::getTxtContent(QString &path, QString &textcontent)
delete api;
api = nullptr;
}
+ // restore your previous locale
+ setlocale(LC_ALL, old_ctype);
+ free(old_ctype);
}
OcrObject::OcrObject(QObject *parent) : QObject(parent)
@@ -90,10 +96,18 @@ OcrObject::~OcrObject()
void OcrObject::init()
{
+ // set locale to "C" for tesseract
+ char *old_ctype = strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+
m_api = new tesseract::TessBaseAPI();
if (m_api->Init(NULL, "chi_sim")) {
qDebug() << "Could not initialize tesseract.\n";
return;
}
m_api->SetVariable("user_defined_dpi", "1080");//图片中未标明分辨率的默认设置为1080
+
+ // restore your previous locale
+ setlocale(LC_ALL, old_ctype);
+ free(old_ctype);
}
--
2.33.0

View File

@ -1,37 +0,0 @@
From b537d67f758a349b26afb15c1fba4aaa472a2186 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Fri, 29 Oct 2021 14:44:36 +0800
Subject: [PATCH] fix Index crash when meet encrypt doc files
---
libsearch/parser/binary-parser.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libsearch/parser/binary-parser.cpp b/libsearch/parser/binary-parser.cpp
index 59e9ef4..e45ca67 100644
--- a/libsearch/parser/binary-parser.cpp
+++ b/libsearch/parser/binary-parser.cpp
@@ -4874,6 +4874,7 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS,
const ULONG *aulBlockDepot;
ULONG ulTextOffset, ulBeginTextInfo;
ULONG ulTotLength, ulLen;
+ ULONG ulEncryptInfo;
long lIndex, lPieces, lOff;
size_t tTextInfoLen, tBlockDepotLen, tBlockSize;
int iType, iLen;
@@ -4883,6 +4884,12 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS,
ulBeginTextInfo = ulGetLong(0x1a2, aucHeader); /* fcClx */
tTextInfoLen = (size_t)ulGetLong(0x1a6, aucHeader); /* lcbClx */
+ ulEncryptInfo = ulGetLong(0x0a, aucHeader);
+ if(ulEncryptInfo & 0x0100) {
+ qDebug() << "Encrypt file:" << m_strFileName << (size_t)ulEncryptInfo;
+ return false;
+ }
+
if(pPPS->tTable.ulSize == 0)
return false;
--
2.30.0

View File

@ -1,34 +0,0 @@
From c3f9d1a9197f25df90267917cc45f3224f5f0721 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Mon, 1 Nov 2021 14:01:30 +0800
Subject: [PATCH] File name is obscured when it's too long in detail page
---
src/control/search-detail-view.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/control/search-detail-view.cpp b/src/control/search-detail-view.cpp
index 8865e81..f791188 100644
--- a/src/control/search-detail-view.cpp
+++ b/src/control/search-detail-view.cpp
@@ -216,7 +216,7 @@ void SearchDetailView::setAppWidget(const QString &appname, const QString &path,
m_optionView->show();
QFontMetrics fontMetrics = m_nameLabel->fontMetrics();
- QString showname = fontMetrics.elidedText(m_name, Qt::ElideRight, 274); //当字体长度超过215时显示为省略号
+ QString showname = fontMetrics.elidedText(m_name, Qt::ElideRight, 200); //当字体长度超过200时显示为省略号
// m_nameLabel->setText(showname);
m_nameLabel->setText(QString("<h3 style=\"font-weight:normal;\">%1</h3>").arg(escapeHtml(showname)));
if(QString::compare(showname, m_name)) {
@@ -351,7 +351,7 @@ void SearchDetailView::setupWidget(const int& type, const QString& path) {
setIcon(path);
QFontMetrics fontMetrics = m_nameLabel->fontMetrics();
QString wholeName = FileUtils::getFileName(path);
- QString name = fontMetrics.elidedText(wholeName, Qt::ElideRight, 274);
+ QString name = fontMetrics.elidedText(wholeName, Qt::ElideRight, 200);
// m_nameLabel->setText(name);
m_nameLabel->setText(QString("<h3 style=\"font-weight:normal;\">%1</h3>").arg(escapeHtml(name)));
if(QString::compare(name, wholeName)) {
--
2.30.0

View File

@ -1,36 +0,0 @@
From 5cd5f93db4c72b048ad7da484ee6237fabb4a023 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Mon, 1 Nov 2021 14:12:50 +0800
Subject: [PATCH] Black list wont't work when block home location
---
libsearch/index/search-manager.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libsearch/index/search-manager.cpp b/libsearch/index/search-manager.cpp
index c501594..5f1ea8a 100644
--- a/libsearch/index/search-manager.cpp
+++ b/libsearch/index/search-manager.cpp
@@ -398,6 +398,10 @@ DirectSearch::DirectSearch(QString keyword, QQueue<QString> *searchResultFile, Q
}
void DirectSearch::run() {
+ QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
+ if(blockList.contains(QStandardPaths::writableLocation(QStandardPaths::HomeLocation).remove(0,1), Qt::CaseSensitive)) {
+ return;
+ }
QQueue<QString> bfs;
bfs.enqueue(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
QFileInfoList list;
@@ -405,7 +409,7 @@ void DirectSearch::run() {
// QDir::Hidden
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
dir.setSorting(QDir::DirsFirst);
- QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
+ //QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
while(!bfs.empty()) {
dir.setPath(bfs.dequeue());
list = dir.entryInfoList();
--
2.30.0

View File

@ -1,47 +0,0 @@
From bd1da6d672e547cf407a0846da6e9d49e603f774 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Thu, 11 Nov 2021 16:21:15 +0800
Subject: [PATCH] Update changelog
---
debian/changelog | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2ed311f..79445c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,30 @@
+ukui-search (0.1.0+0207) v101; urgency=medium
+
+ * Fix: Index error when there are too much files in user directory.
+ - 当用户目录下的文件太多时,新建的文件有可能不会被索引到。
+ * Fix: 38072 browser+S4休眠500次过程中出现提示空间不足。
+ * Fix: Index error when copied a folder which has many children folders.
+ -当复制一个含有多层子文件夹的文件夹时,文件夹中的文件有可能不会被正确的建立索引。
+ * Fix: Index delete error when files were delete from disk.
+ - 文件删除时,数据库删除操作失败。
+ * Update debian/contorl,add dependence.
+ - 在debian/contorl中增加运行依赖。
+ * Fix: Window title is not translated.
+ - 修复任务栏窗口标题未汉化的Bug(36548)
+ * Fix: Modify applications list opened quickly.
+ - 修改快速打开列表项(35708、35311)
+ * Fix: QFileDialog is incompletely translated.
+ - 修复文件选择弹窗汉化不完整的bug(35800)
+ * Fix: There is no tooltip when filename is too long to display.
+ - 修复文件名过长时,文件详情页文件名悬停不完整显示的问题(37934)
+ * Fix: Translations for warning dialog is incomplete.
+ - 修复警示弹窗翻译为完成的bug(38130)
+ * Fix: Button for question dialog is in English.
+ - 修复删除黑名单询问弹窗按钮未汉化的Bug(38128)
+ * Fix: Detail widget for best content result is incorrect.
+ - 修复最佳匹配里的文件内容项显示有误的问题(35563、35971)
+
+ -- zhangpengfei <zhangpengfei@kylinos.cn> Sun, 07 Feb 2021 10:28:35 +0800
ukui-search (0.5.1+0926) v101; urgency=medium
* Bug 78787
--
2.30.0

View File

@ -1,28 +0,0 @@
From 182bfe6bd32ca098008ca50f09bedf61fe3ef558 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Thu, 2 Dec 2021 10:13:42 +0800
Subject: [PATCH] update debian changelog
---
debian/changelog | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 79445c9..7f1185a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,3 +37,11 @@ ukui-search (0.4.1-1~0803) unstable; urgency=medium
* Initial release.
-- handsome_feng <jianfengli@ubuntukylin.com> Thu, 05 Aug 2021 15:58:06 +0800
+ukui-search (0.1.1+0219-1) v101; urgency=medium
+
+ * Remove QWebEngineView dependence.
+ * Remove friso dependence.
+ * Update debian/control.
+
+ -- zhangpengfei <zhangpengfei@kylinos.cn> Fri, 19 Feb 2021 11:37:16 +0800
+
--
2.30.0

View File

@ -1,24 +0,0 @@
From 3118f367f10657c2c9e2da3df17668565810432f Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Fri, 3 Dec 2021 09:49:54 +0800
Subject: [PATCH] Update app-match.cpp info
---
libsearch/appsearch/app-match.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/libsearch/appsearch/app-match.cpp b/libsearch/appsearch/app-match.cpp
index 8ad8d31..d7d9fd4 100644
--- a/libsearch/appsearch/app-match.cpp
+++ b/libsearch/appsearch/app-match.cpp
@@ -34,6 +34,7 @@ AppMatch::AppMatch(QObject *parent) : QThread(parent)
{
m_watchAppDir = new QFileSystemWatcher(this);
m_watchAppDir->addPath("/usr/share/applications/");
+ //This part is not right?
QDir androidPath(QDir::homePath() + "/.local/share/applications/");
if(androidPath.exists()) {
m_watchAppDir->addPath(QDir::homePath() + "/.local/share/applications/");
--
2.30.0

Binary file not shown.

BIN
ukui-search-3.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,20 +1,11 @@
%define debug_package %{nil}
Name: ukui-search
Version: 0.4.1
Release: 8
Summary: Advanced ukui menu
License: GPL-3.0
Version: 3.1
Release: 4
Summary: a user-wide desktop search feature of UKUI desktop environment
License: GPL-2.0-or-later and GPL-3.0-or-later and Apache-2.0
URL: http://www.ukui.org
Source0: %{name}-%{version}.tar.gz
Patch0: 0001-Update-changelog.patch
Patch1: 0002-fix-Index-crash-when-meet-encrypt-doc-files.patch
Patch2: 0003-File-name-is-obscured-when-it-s-too-long-in-detail-page.patch
Patch3: 0004-Black-list-wont-t-work-when-block-home-location.patch
Patch4: 0005-Update-changelog-for-easy-view.patch
Patch5: 0006-update-debian-changelog.patch
Patch6: 0007-Update-app-match.cpp-info.patch
Patch01: 0001-fix-coredump-of-ukui-search.patch
BuildRequires: pkgconf
BuildRequires: gsettings-qt-devel
@ -23,130 +14,155 @@ BuildRequires: qtchooser
BuildRequires: qt5-qtscript-devel
BuildRequires: qt5-qttools-devel
BuildRequires: xapian-core-devel
BuildRequires: quazip-qt5-devel
BuildRequires: quazip-qt5-devel quazip-qt5
BuildRequires: glib2-devel
BuildRequires: kf5-kwindowsystem-devel
BuildRequires: qt5-qtx11extras-devel
BuildRequires: uchardet-devel
BuildRequires: poppler-qt5-devel
BuildRequires: ukui-interface
BuildRequires: libqtxdg-devel
BuildRequires: libukcc-devel
BuildRequires: opencv
BuildRequires: tesseract-devel
Requires: libukui-search0 ukui-search-systemdbus quazip-qt5
%description
Portable, efficient middle-ware for different kinds of mail access
ukui-search is a user-wide desktop search feature of UKUI desktop environment
%package -n libchinese-segmentation0
Summary: libs
Summary: Libraries for chinese-segmentation
License: LGPLv2+
Provides: libchinese-segmentation
%description -n libchinese-segmentation0
Libraries for chinese-segmentation
.This package contains a few runtime libraries needed by
libsearch.
%package -n libchinese-segmentation-devel
Summary: Libraries for chinese-segmentation development
Requires: libchinese-segmentation0
%package -n libchinese-segmentation-dev
Summary: libs
License: LGPLv2+
Provides: libchinese-segmentation
%description -n libchinese-segmentation-dev
Libraries for chinese-segmentation
.This package contains a few runtime libraries needed by
libsearch.
%description -n libchinese-segmentation-devel
%{summary}.
%package -n libukui-search0
Summary: libs
License: LGPLv2+
Summary: Libraries for ukui-search
Provides: libukui-search
Requires: libchinese-segmentation0 ukui-search-systemdbus
%description -n libukui-search0
Libraries for ukui-search
%package -n libukui-search-dev
Summary: libdevel
License: LGPLv2+
%description -n libukui-search-dev
Libraries for ukui-search(development files).
%{summary}.
%package -n libukui-search-devel
Summary: Libraries for ukui-search(development files).
Requires: libukui-search0 libchinese-segmentation0 ukui-search-systemdbus
%description -n libukui-search-devel
%{summary}.
%package -n ukui-search-systemdbus
Summary: libdevel
License: LGPLv2+
Summary: ukui-search-systemdbus is a systembus interface to modify max_user_watches nums permanent.
%description -n ukui-search-systemdbus
ukui-search-systemdbus is a systembus interface to modify max_user_watches nums
permanent.
%{summary}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch01 -p1
%build
mkdir build && cd build
qmake-qt5 ..
make
%{qmake_qt5} ..
%{make_build}
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd %{_builddir}/%{name}-%{version}/build
make INSTALL_ROOT=%{buildroot} install
cd build
%{make_install} INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}/usr/share/ukui-search/translations/
cp -r %{_builddir}/%{name}-%{version}/build/frontend/.qm/*.qm %{buildroot}/usr/share/ukui-search/translations/
cp -r %{_builddir}/%{name}-%{version}/build/libsearch/.qm/*.qm %{buildroot}/usr/share/ukui-search/translations/
cp -r %{_builddir}/%{name}-%{version}/build/search-ukcc-plugin/.qm/*.qm %{buildroot}/usr/share/ukui-search/search-ukcc-plugin/translations/
%clean
rm -rf $RPM_BUILD_ROOT
%files
/usr/share/applications/ukui-search-menu.desktop
/etc/xdg/autostart/ukui-search.desktop
/usr/bin/ukui-search
/usr/include/ukui-search/*.h
/usr/share/glib-2.0/schemas/org.ukui.log4qt.ukui-search.gschema.xml
/usr/share/glib-2.0/schemas/org.ukui.search.data.gschema.xml
%{_bindir}/ukui-search
%{_bindir}/ukui-search-service
%{_bindir}/ukui-search-app-data-service
%{_sysconfdir}/xdg/autostart/*.desktop
%{_datadir}/applications/*.desktop
%{_datadir}/ukui-search/translations/tr.qm
%{_datadir}/ukui-search/translations/bo.qm
%{_datadir}/ukui-search/translations/zh_CN.qm
%{_datadir}/glib-2.0/schemas/*.xml
%{_libdir}/ukui-control-center/*
%{_datadir}/ukui-search/search-ukcc-plugin/translations/*
%{_datadir}/ukui-search/search-ukcc-plugin/image/*
%files -n libchinese-segmentation0
/usr/lib64/libchinese-segmentation.so.*
/usr/share/ukui-search/res/dict/*.utf8
%files -n libchinese-segmentation-dev
/usr/include/chinese-seg/*
/usr/lib64/libchinese-segmentation.so
%{_libdir}/libchinese-segmentation.so.*
%{_datadir}/ukui-search/res/dict/*
%files -n libchinese-segmentation-devel
%{_includedir}/chinese-seg/*
%{_libdir}/libchinese-segmentation.so
%files -n libukui-search0
/usr/lib64/libukui-search.so.*
%{_libdir}/libukui-search.so.*
%{_datadir}/ukui-search/translations/libukui-search_zh_CN.qm
%files -n libukui-search-dev
/usr/include/ukui-search/*
/usr/lib64/libukui-search.so
%files -n libukui-search-devel
%{_includedir}/ukui-search/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libukui-search.so
%files -n ukui-search-systemdbus
/usr/share/dbus-1/system-services/com.ukui.search.qt.systemdbus.service
/etc/dbus-1/system.d/com.ukui.search.qt.systemdbus.conf
/usr/bin/ukui-search-systemdbus
%{_datadir}/dbus-1/system-services/com.ukui.search.qt.systemdbus.service
%{_sysconfdir}/dbus-1/system.d/com.ukui.search.qt.systemdbus.conf
%{_bindir}/ukui-search-systemdbus
%changelog
* Thu Jun 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add 0001-fix-coredump-of-ukui-search.patch
* Fri Feb 10 2023 peijiankang <peijiankang@kylinos.cn> - 3.1-3
- add build debuginfo and debugsource
* Mon Jan 9 2023 peijiankang <peijiankang@kylinos.cn> - 3.1-2
- add search-ukcc-plugin translation files
* Tue Nov 1 2022 peijiankang <peijiankang@kylinos.cn> - 3.1-1
- update version to 3.1
* Wed Jun 22 2022 peijiankang <peijiankang@kylinos.cn> - 0.4.2-3
- fix install error
* Tue Jun 21 2022 peijiankang <peijiankang@kylinos.cn> - 0.4.2-2
- add translation files
* Tue Jun 21 2022 peijiankang <peijiankang@kylinos.cn> - 0.4.2-1
- update version to 0.4.2
* Mon May 23 2022 tanyulong <tanyulong@kylinos.cn> - 0.4.1-11
- Improve the project according to the requirements of compliance improvement
* Mon May 09 2022 pei-jiankang <peijiankang@kylinos.cn> - 0.4.1-10
- add ukui-interface BuildRequires
* Tue Dec 07 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-9
- Modified fifo path
* Fri Dec 03 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-8
- Update app match.cpp info

4
ukui-search.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: https://github.com/ukui/ukui-search.git
tag_prefix: "v"
separator: "."