forked from openkylin/ukui-search
Revert "Merge branch '0715-v4-dev' into 'main'"
This reverts merge request !61
This commit is contained in:
parent
adda953f12
commit
d62580360f
|
@ -14,7 +14,7 @@
|
|||
*.so.*
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
#*.qm
|
||||
*.qm
|
||||
.#*
|
||||
*.*#
|
||||
core
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<schemalist gettext-domain="ukui-log4qt-ukui-search">
|
||||
<schema id="org.ukui.ukui-log4qt-ukui-search" path="/org/ukui/ukui-log4qt-ukui-search/">
|
||||
<key type="s" name="log4j-handleqtmessages">
|
||||
<default>"true"</default>
|
||||
<summary>hook qt messages</summary>
|
||||
<description>Control if hook qt messages</description>
|
||||
</key>
|
||||
<key type="s" name="log4j-rootlogger">
|
||||
<default>"WARN,console,daily"</default>
|
||||
<summary>config rootLogger's level and appenders</summary>
|
||||
<description>config rootLogger's level and appenders:"level,appender"</description>
|
||||
</key>
|
||||
<key type="s" name="log4j-appender-daily-datepattern">
|
||||
<default>".yyyy-MM-dd"</default>
|
||||
<summary>daily log file pattern</summary>
|
||||
<description>set daily log file pattern format:one day</description>
|
||||
</key>
|
||||
<key type="s" name="log4j-appender-daily-layout-conversionpattern">
|
||||
<default>"%d{yyyy-MM-dd HH:mm:ss,zzz}(%-4r)[%t]|%-5p| - %m%n"</default>
|
||||
<summary>set log message's format</summary>
|
||||
<description>set log message's format</description>
|
||||
</key>
|
||||
<key type="i" name="delaytime">
|
||||
<default>3600</default>
|
||||
<summary>set check log files delay time</summary>
|
||||
<description>set check log files delay time</description>
|
||||
</key>
|
||||
<key type="i" name="maxfilecount">
|
||||
<default>7</default>
|
||||
<summary>set log files count</summary>
|
||||
<description>set log files count,unit s</description>
|
||||
</key>
|
||||
<key type="i" name="maxfilesize">
|
||||
<default>512</default>
|
||||
<summary>set log files total size</summary>
|
||||
<description>set log files total size, unit M</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
|
@ -0,0 +1,14 @@
|
|||
<schemalist gettext-domain="ukui-search">
|
||||
<schema id="org.ukui.search.settings" path="/org/ukui/ukui-search/settings/">
|
||||
<key name="index-search" type="b">
|
||||
<default>false</default>
|
||||
<summary>search method</summary>
|
||||
<description>Is current search-method index-search.</description>
|
||||
</key>
|
||||
<key name="web-engine" type="s">
|
||||
<default>"baidu"</default>
|
||||
<summary>web engine</summary>
|
||||
<description>Web engine to search keyword online.</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
|
@ -8,4 +8,8 @@ Comment[zh_CN]=全局搜索
|
|||
Exec=/usr/bin/ukui-search -s
|
||||
Type=Application
|
||||
Icon=kylin-search
|
||||
X-UKUI-AutoRestart=true
|
||||
NoDisplay=true
|
||||
OnlyShowIn=UKUI
|
||||
X-UKUI-Autostart-Phase=Application
|
||||
Terminal=false
|
||||
|
|
|
@ -8,6 +8,7 @@ Comment[zh_CN]=全局搜索
|
|||
Exec=/usr/bin/ukui-search %U
|
||||
Type=Application
|
||||
Icon=kylin-search
|
||||
OnlyShowIn=MATE;
|
||||
X-MATE-Autostart-Phase=Application
|
||||
X-MATE-AutoRestart=true
|
||||
X-UKUI-AutoRestart=true
|
||||
OnlyShowIn=UKUI
|
||||
X-UKUI-Autostart-Phase=Application
|
||||
Terminal=false
|
||||
|
|
|
@ -11,12 +11,14 @@ Build-Depends: debhelper (>=9.0.0),
|
|||
qtscript5-dev,
|
||||
qttools5-dev-tools,
|
||||
libxapian-dev,
|
||||
libquazip5-dev,
|
||||
libquazip5-dev(>=0.7.6-6build1),
|
||||
libglib2.0-dev,
|
||||
libkf5windowsystem-dev,
|
||||
libgsettings-qt-dev,
|
||||
libqt5x11extras5-dev,
|
||||
libuchardet-dev,
|
||||
libpoppler-qt5-dev
|
||||
libpoppler-qt5-dev,
|
||||
libukui-log4qt-dev
|
||||
Standards-Version: 4.5.0
|
||||
Homepage: https://www.ukui.org/
|
||||
Vcs-Git: https://github.com/ukui/ukui-search.git
|
||||
|
@ -42,14 +44,6 @@ Description: Libraries for chinese-segmentation
|
|||
This package contains a few runtime libraries needed by
|
||||
libsearch.
|
||||
|
||||
Package: libchinese-segmentation-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
libchinese-segmentation0 (= ${binary:Version})
|
||||
Description: Libraries for chinese-segmentation(development files).
|
||||
|
||||
Package: libukui-search0
|
||||
Section: libs
|
||||
Architecture: any
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
usr/bin/ukui-search
|
||||
etc/xdg/autostart/*.desktop
|
||||
usr/share/applications/*.desktop
|
||||
src/.qm/*.qm usr/share/ukui-search/translations
|
||||
usr/share/glib-2.0/schemas/*.xml
|
||||
|
|
|
@ -39,7 +39,7 @@ struct SKeyWord {
|
|||
~SKeyWord() {
|
||||
word = std::move("");
|
||||
offsets.clear();
|
||||
// offsets.shrink_to_fit();
|
||||
offsets.shrink_to_fit();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,6 +16,6 @@ HEADERS += \
|
|||
$$PWD/SegmentBase.hpp \
|
||||
$$PWD/SegmentTagged.hpp \
|
||||
$$PWD/TextRankExtractor.hpp \
|
||||
# $$PWD/Trie.hpp \
|
||||
$$PWD/Trie.hpp \
|
||||
$$PWD/Unicode.hpp
|
||||
include(limonp/limonp.pri)
|
||||
|
|
|
@ -40,11 +40,12 @@ unix {
|
|||
target.path = $$[QT_INSTALL_LIBS]
|
||||
}
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
header.path = /usr/include/chinese-seg/
|
||||
header.files = *.h
|
||||
header_cppjieba.path = /usr/include/chinese-seg/cppjieba/
|
||||
header_cppjieba.files = cppjieba/*
|
||||
INSTALLS += header header_cppjieba
|
||||
|
||||
header.path = /usr/include/chinese-seg/
|
||||
header.files += *.h
|
||||
headercppjieba.path = /usr/include/chinese-seg/cppjieba/
|
||||
headercppjieba.files = cppjieba/*
|
||||
INSTALLS += header headercppjieba
|
||||
|
||||
#DISTFILES += \
|
||||
# jiaba/jieba.pri
|
||||
|
|
|
@ -26,8 +26,7 @@ using namespace Zeeker;
|
|||
size_t FileUtils::_max_index_count = 0;
|
||||
size_t FileUtils::_current_index_count = 0;
|
||||
unsigned short FileUtils::_index_status = 0;
|
||||
//FileUtils::SearchMethod FileUtils::searchMethod = FileUtils::SearchMethod::DIRECTSEARCH;
|
||||
FileUtils::SearchMethod FileUtils::searchMethod = FileUtils::SearchMethod::INDEXSEARCH;
|
||||
FileUtils::SearchMethod FileUtils::searchMethod = FileUtils::SearchMethod::DIRECTSEARCH;
|
||||
QMap<QString, QStringList> FileUtils::map_chinese2pinyin = QMap<QString, QStringList>();
|
||||
|
||||
FileUtils::FileUtils() {
|
||||
|
@ -181,9 +180,9 @@ QString FileUtils::getSettingName(const QString& setting) {
|
|||
|
||||
bool FileUtils::isOrUnder(QString pathA, QString pathB)
|
||||
{
|
||||
if(!pathA.startsWith("/"))
|
||||
if(pathA[0] != "/")
|
||||
pathA.prepend("/");
|
||||
if(!pathB.startsWith("/"))
|
||||
if(pathB[0] != "/")
|
||||
pathB.prepend("/");
|
||||
|
||||
if(pathA.length() < pathB.length())
|
||||
|
|
|
@ -37,14 +37,14 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent) {
|
|||
// m_settings->setAtomicSyncRequired(false);
|
||||
m_block_dirs_settings = new QSettings(BLOCK_DIRS, QSettings::IniFormat, this);
|
||||
m_block_dirs_settings->setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
// m_block_dirs_settings->setValue("These_are_block_dirs_conf_for_ukui_search","0");
|
||||
// m_block_dirs_settings->sync();
|
||||
// m_confWatcher = new QFileSystemWatcher(this);
|
||||
// m_confWatcher->addPath(BLOCK_DIRS);
|
||||
// connect(m_confWatcher, &QFileSystemWatcher::fileChanged, this, [ & ]() {
|
||||
// m_block_dirs_settings->sync();
|
||||
// m_confWatcher->addPath(BLOCK_DIRS);
|
||||
// });
|
||||
m_block_dirs_settings->setValue("These_are_block_dirs_conf_for_ukui_search","0");
|
||||
m_block_dirs_settings->sync();
|
||||
m_confWatcher = new QFileSystemWatcher(this);
|
||||
m_confWatcher->addPath(BLOCK_DIRS);
|
||||
connect(m_confWatcher, &QFileSystemWatcher::fileChanged, this, [ & ]() {
|
||||
m_block_dirs_settings->sync();
|
||||
m_confWatcher->addPath(BLOCK_DIRS);
|
||||
});
|
||||
|
||||
m_search_record_settings = new QSettings(SEARCH_HISTORY, QSettings::IniFormat, this);
|
||||
m_search_record_settings->setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
|
@ -60,10 +60,9 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent) {
|
|||
qWarning() << "Kylinssoclient Dbus connect fail!";
|
||||
|
||||
this->forceSync();
|
||||
m_cache.insert(FONT_SIZE_KEY, 11);
|
||||
//the default number of transparency in mainwindow is 0.7
|
||||
//if someone changes the num in mainwindow, here should be modified too
|
||||
m_cache.insert(TRANSPARENCY_KEY, 1);
|
||||
m_cache.insert(TRANSPARENCY_KEY, 0.7);
|
||||
if(QGSettings::isSchemaInstalled(CONTROL_CENTER_PERSONALISE_GSETTINGS_ID)) {
|
||||
m_trans_gsettings = new QGSettings(CONTROL_CENTER_PERSONALISE_GSETTINGS_ID, QByteArray(), this);
|
||||
connect(m_trans_gsettings, &QGSettings::changed, this, [ = ](const QString & key) {
|
||||
|
|
|
@ -51,13 +51,9 @@
|
|||
#define PATH_NOT_IN_HOME 2;
|
||||
#define PATH_PARENT_BLOCKED 3;
|
||||
|
||||
//#define MAIN_SETTINGS QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search.conf"
|
||||
//#define BLOCK_DIRS QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search-block-dirs.conf"
|
||||
//#define SEARCH_HISTORY QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search-history.conf"
|
||||
|
||||
#define MAIN_SETTINGS "/media/用户保险箱/.ukui-search/ukui-search.conf"
|
||||
#define BLOCK_DIRS "/media/用户保险箱/.ukui-search/ukui-search-block-dirs.conf"
|
||||
#define SEARCH_HISTORY "/media/用户保险箱/.ukui-search/ukui-search-history.conf"
|
||||
#define MAIN_SETTINGS QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search.conf"
|
||||
#define BLOCK_DIRS QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search-block-dirs.conf"
|
||||
#define SEARCH_HISTORY QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search-history.conf"
|
||||
//#define CLOUD_HISTORY "history"
|
||||
//#define CLOUD_APPLICATIONS "applications"
|
||||
|
||||
|
|
|
@ -169,12 +169,7 @@ void FirstIndex::run() {
|
|||
// QtConcurrent::run([&](){
|
||||
sem.acquire(1);
|
||||
mutex1.unlock();
|
||||
QStringList pathList;
|
||||
pathList.append("/media/用户保险箱");
|
||||
pathList.append("/media/邮件保险箱");
|
||||
pathList.append("/media/公共保险箱");
|
||||
pathList.append("/media/备份保险箱");
|
||||
this->setPath(pathList);
|
||||
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->Traverse();
|
||||
FileUtils::_max_index_count = this->q_index->length();
|
||||
qDebug() << "max_index_count:" << FileUtils::_max_index_count;
|
||||
|
@ -244,7 +239,7 @@ void FirstIndex::run() {
|
|||
if(p_indexGenerator)
|
||||
delete p_indexGenerator;
|
||||
p_indexGenerator = nullptr;
|
||||
|
||||
// GlobalSettings::getInstance()->forceSync();
|
||||
IndexStatusRecorder::getInstance()->setStatus(INDEX_DATABASE_STATE, "2");
|
||||
IndexStatusRecorder::getInstance()->setStatus(CONTENT_INDEX_DATABASE_STATE, "2");
|
||||
::_exit(0);
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include "assert.h"
|
||||
#include <sys/prctl.h>
|
||||
#include <syslog.h>
|
||||
//#include <QtConcurrent>
|
||||
|
|
|
@ -31,10 +31,8 @@
|
|||
#include <QStandardPaths>
|
||||
#include <malloc.h>
|
||||
|
||||
//#define INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/index_data").toStdString()
|
||||
//#define CONTENT_INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/content_index_data").toStdString()
|
||||
#define INDEX_PATH "/media/用户保险箱/.ukui-search/index_data"
|
||||
#define CONTENT_INDEX_PATH "/media/用户保险箱/.ukui-search/content_index_data"
|
||||
#define INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/index_data").toStdString()
|
||||
#define CONTENT_INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/content_index_data").toStdString()
|
||||
|
||||
using namespace Zeeker;
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#define CONTENT_INDEX_DATABASE_STATE "content_index_database_state"
|
||||
#define INDEX_DATABASE_STATE "index_database_state"
|
||||
#define INOTIFY_NORMAL_EXIT "inotify_normal_exit"
|
||||
#define INDEX_STATUS "/media/用户保险箱/.ukui-search/ukui-search-index-status.conf"
|
||||
#define PENDING_FILE_QUEUE_FINISH "pending_file_queue_finish"
|
||||
#define INDEX_STATUS QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search-index-status.conf"
|
||||
namespace Zeeker {
|
||||
//fixme: we need a better way to record index status.
|
||||
class IndexStatusRecorder : public QObject
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
QFileInfo fi(tmp); \
|
||||
if(!fi.isSymLink()){ \
|
||||
AddWatch(tmp); \
|
||||
setPath(QStringList(tmp)); \
|
||||
setPath(tmp); \
|
||||
Traverse(); \
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
|||
CREATE_FILE_NAME_INDEX \
|
||||
CREATE_FILE_CONTENT_INDEX
|
||||
using namespace Zeeker;
|
||||
InotifyIndex::InotifyIndex(const QStringList &pathList) : Traverse_BFS(pathList) {
|
||||
InotifyIndex::InotifyIndex(const QString& path) : Traverse_BFS(path) {
|
||||
qDebug() << "setInotifyMaxUserWatches start";
|
||||
UkuiSearchQDBus usQDBus;
|
||||
usQDBus.setInotifyMaxUserWatches();
|
||||
|
@ -62,21 +62,18 @@ InotifyIndex::~InotifyIndex() {
|
|||
|
||||
void InotifyIndex::firstTraverse() {
|
||||
QQueue<QString> bfs;
|
||||
for(QString path : this->m_pathList) {
|
||||
this->AddWatch(path);
|
||||
bfs.enqueue(path);
|
||||
QFileInfoList list;
|
||||
QDir dir;
|
||||
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
while(!bfs.empty()) {
|
||||
dir.setPath(bfs.dequeue());
|
||||
list = dir.entryInfoList();
|
||||
for(auto i : list) {
|
||||
if(i.isDir() && (!(i.isSymLink()))) {
|
||||
this->AddWatch(i.absoluteFilePath());
|
||||
bfs.enqueue(i.absoluteFilePath());
|
||||
}
|
||||
bfs.enqueue(this->path);
|
||||
QFileInfoList list;
|
||||
QDir dir;
|
||||
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
while(!bfs.empty()) {
|
||||
dir.setPath(bfs.dequeue());
|
||||
list = dir.entryInfoList();
|
||||
for(auto i : list) {
|
||||
if(i.isDir() && (!(i.isSymLink()))) {
|
||||
this->AddWatch(i.absoluteFilePath());
|
||||
bfs.enqueue(i.absoluteFilePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -252,8 +249,8 @@ void InotifyIndex::run() {
|
|||
m_fd = inotify_init();
|
||||
qDebug() << "m_fd----------->" << m_fd;
|
||||
|
||||
// this->AddWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
// this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->AddWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->firstTraverse();
|
||||
|
||||
int fifo_fd;
|
||||
|
|
|
@ -41,13 +41,13 @@ static InotifyIndex* global_instance_of_index = nullptr;
|
|||
class InotifyIndex : public QThread, public Traverse_BFS {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static InotifyIndex* getInstance(const QStringList &pathList) {
|
||||
static InotifyIndex* getInstance(const QString& path) {
|
||||
if(!global_instance_of_index) {
|
||||
global_instance_of_index = new InotifyIndex(pathList);
|
||||
global_instance_of_index = new InotifyIndex(path);
|
||||
}
|
||||
return global_instance_of_index;
|
||||
}
|
||||
InotifyIndex(const QStringList &pathList);
|
||||
InotifyIndex(const QString&);
|
||||
~InotifyIndex();
|
||||
|
||||
bool AddWatch(const QString&);
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
using namespace Zeeker;
|
||||
static InotifyWatch* global_instance_InotifyWatch = nullptr;
|
||||
|
||||
Zeeker::InotifyWatch *Zeeker::InotifyWatch::getInstance(const QStringList &pathList)
|
||||
Zeeker::InotifyWatch *Zeeker::InotifyWatch::getInstance(const QString &path)
|
||||
{
|
||||
if(!global_instance_InotifyWatch) {
|
||||
global_instance_InotifyWatch = new InotifyWatch(pathList);
|
||||
global_instance_InotifyWatch = new InotifyWatch(path);
|
||||
}
|
||||
return global_instance_InotifyWatch;
|
||||
}
|
||||
|
||||
Zeeker::InotifyWatch::InotifyWatch(const QStringList &pathList): Traverse_BFS(pathList)
|
||||
Zeeker::InotifyWatch::InotifyWatch(const QString &path): Traverse_BFS(path)
|
||||
{
|
||||
qDebug() << "setInotifyMaxUserWatches start";
|
||||
UkuiSearchQDBus usQDBus;
|
||||
|
@ -98,21 +98,18 @@ void InotifyWatch::DoSomething(const QFileInfo &info)
|
|||
void InotifyWatch::firstTraverse()
|
||||
{
|
||||
QQueue<QString> bfs;
|
||||
for(QString path : this->m_pathList) {
|
||||
this->addWatch(path);
|
||||
bfs.enqueue(path);
|
||||
QFileInfoList list;
|
||||
QDir dir;
|
||||
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
while(!bfs.empty()) {
|
||||
dir.setPath(bfs.dequeue());
|
||||
list = dir.entryInfoList();
|
||||
for(auto i : list) {
|
||||
if(i.isDir() && (!(i.isSymLink()))) {
|
||||
this->addWatch(i.absoluteFilePath());
|
||||
bfs.enqueue(i.absoluteFilePath());
|
||||
}
|
||||
bfs.enqueue(this->path);
|
||||
QFileInfoList list;
|
||||
QDir dir;
|
||||
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
while(!bfs.empty()) {
|
||||
dir.setPath(bfs.dequeue());
|
||||
list = dir.entryInfoList();
|
||||
for(auto i : list) {
|
||||
if(i.isDir() && (!(i.isSymLink()))) {
|
||||
this->addWatch(i.absoluteFilePath());
|
||||
bfs.enqueue(i.absoluteFilePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,8 +147,8 @@ void InotifyWatch::run()
|
|||
}
|
||||
}
|
||||
|
||||
// this->addWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
// this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->addWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
this->firstTraverse();
|
||||
|
||||
int fifo_fd;
|
||||
|
@ -399,7 +396,7 @@ void InotifyWatch::eventProcess(const char *buffer, ssize_t len)
|
|||
if(event->mask & IN_ISDIR) {
|
||||
if(!QFileInfo(path).isSymLink()){
|
||||
addWatch(path);
|
||||
setPath(QStringList(path));
|
||||
setPath(path);
|
||||
Traverse();
|
||||
}
|
||||
}
|
||||
|
@ -439,7 +436,7 @@ void InotifyWatch::eventProcess(const char *buffer, ssize_t len)
|
|||
|
||||
if(!QFileInfo(path).isSymLink()){
|
||||
addWatch(path);
|
||||
setPath(QStringList(path));
|
||||
setPath(path);
|
||||
Traverse();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@ class InotifyWatch : public QThread, public Traverse_BFS
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static InotifyWatch* getInstance(const QStringList &pathList);
|
||||
static InotifyWatch* getInstance(const QString& path);
|
||||
|
||||
bool addWatch(const QString &path);
|
||||
bool removeWatch(const QString &path, bool removeFromDatabase = true);
|
||||
|
@ -34,7 +34,7 @@ protected:
|
|||
private Q_SLOTS:
|
||||
void slotEvent(char *buf, ssize_t len);
|
||||
private:
|
||||
explicit InotifyWatch(const QStringList &pathList);
|
||||
explicit InotifyWatch(const QString& path);
|
||||
~InotifyWatch();
|
||||
char * filter();
|
||||
void eventProcess(int socket);
|
||||
|
|
|
@ -31,35 +31,7 @@ SearchManager::SearchManager(QObject *parent) : QObject(parent) {
|
|||
m_pool.setExpiryTimeout(1000);
|
||||
}
|
||||
|
||||
void SearchManager::searchLocalFiles(std::string keyword, std::queue<SearchResultInfo> *searchResultFile, std::queue<SearchResultInfo> *searchResultDir, std::queue<SearchResultInfo> *searchResultContent)
|
||||
{
|
||||
m_mutex1.lock();
|
||||
++uniqueSymbol1;
|
||||
m_mutex1.unlock();
|
||||
m_mutex2.lock();
|
||||
++uniqueSymbol2;
|
||||
m_mutex2.unlock();
|
||||
m_mutex3.lock();
|
||||
++uniqueSymbol3;
|
||||
m_mutex3.unlock();
|
||||
|
||||
FileSearchV4 *filesearch;
|
||||
filesearch = new FileSearchV4(searchResultFile,uniqueSymbol1,QString::fromStdString(keyword),"0",1,0,5);
|
||||
m_pool.start(filesearch);
|
||||
|
||||
FileSearchV4 *dirsearch;
|
||||
dirsearch = new FileSearchV4(searchResultDir,uniqueSymbol2,QString::fromStdString(keyword),"1",1,0,5);
|
||||
m_pool.start(dirsearch);
|
||||
|
||||
FileContentSearchV4 *contentSearch;
|
||||
contentSearch = new FileContentSearchV4(searchResultContent,uniqueSymbol3,QString::fromStdString(keyword),0,5);
|
||||
m_pool.start(contentSearch);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
SearchManager::~SearchManager()
|
||||
{
|
||||
SearchManager::~SearchManager() {
|
||||
}
|
||||
|
||||
int SearchManager::getCurrentIndexCount() {
|
||||
|
@ -416,363 +388,7 @@ int FileContentSearch::getResult(Xapian::MSet &result, std::string &keyWord) {
|
|||
// // deleteAllIndex(pathTobeDelete)
|
||||
return 0;
|
||||
}
|
||||
FileSearchV4::FileSearchV4(std::queue<SearchResultInfo> *searchResultFile, size_t uniqueSymbol, QString keyword, QString value, unsigned slot, int begin, int num)
|
||||
{
|
||||
this->setAutoDelete(true);
|
||||
m_search_result = searchResultFile;
|
||||
m_uniqueSymbol = uniqueSymbol;
|
||||
m_keyword = keyword;
|
||||
m_value = value;
|
||||
m_slot = slot;
|
||||
m_begin = begin;
|
||||
m_num = num;
|
||||
}
|
||||
|
||||
FileSearchV4::~FileSearchV4()
|
||||
{
|
||||
m_search_result = nullptr;
|
||||
}
|
||||
|
||||
void FileSearchV4::run()
|
||||
{
|
||||
int resultCount = 0;
|
||||
int total = 0;
|
||||
while(total < 100)
|
||||
{
|
||||
resultCount = keywordSearchfile();
|
||||
if(resultCount == 0 || resultCount == -1)
|
||||
break;
|
||||
total += resultCount;
|
||||
m_begin += m_num;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int FileSearchV4::keywordSearchfile()
|
||||
{
|
||||
try
|
||||
{
|
||||
qDebug() << "--keywordSearchfile start--";
|
||||
Xapian::Database db(INDEX_PATH);
|
||||
Xapian::Query query = creatQueryForFileSearch(db);
|
||||
Xapian::Enquire enquire(db);
|
||||
|
||||
Xapian::Query queryFile;
|
||||
if(!m_value.isEmpty())
|
||||
{
|
||||
std::string slotValue = m_value.toStdString();
|
||||
Xapian::Query queryValue = Xapian::Query(Xapian::Query::OP_VALUE_RANGE,m_slot,slotValue,slotValue);
|
||||
queryFile = Xapian::Query(Xapian::Query::OP_AND,query,queryValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
queryFile = query;
|
||||
}
|
||||
|
||||
qDebug() << "keywordSearchfile:"<<QString::fromStdString(queryFile.get_description());
|
||||
|
||||
enquire.set_query(queryFile);
|
||||
Xapian::MSet result = enquire.get_mset(m_begin, m_num);
|
||||
int resultCount = result.size();
|
||||
qDebug()<< "keywordSearchfile results count=" <<resultCount;
|
||||
if(resultCount == 0)
|
||||
return 0;
|
||||
if(getResult(result) == -1)
|
||||
return -1;
|
||||
|
||||
qDebug()<< "--keywordSearchfile finish--";
|
||||
return resultCount;
|
||||
}
|
||||
catch(const Xapian::Error &e)
|
||||
{
|
||||
qWarning() <<QString::fromStdString(e.get_description());
|
||||
qDebug()<< "--keywordSearchfile finish--";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Xapian::Query FileSearchV4::creatQueryForFileSearch(Xapian::Database &db)
|
||||
{
|
||||
auto userInput = m_keyword.toLower();
|
||||
std::vector<Xapian::Query> v;
|
||||
for(int i=0;i<userInput.size();i++)
|
||||
{
|
||||
v.push_back(Xapian::Query(QUrl::toPercentEncoding(userInput.at(i)).toStdString()));
|
||||
// qDebug()<<QString::fromStdString(Xapian::Query(QString(userInput.at(i)).toStdString()).get_description());
|
||||
}
|
||||
Xapian::Query queryPhrase =Xapian::Query(Xapian::Query::OP_PHRASE, v.begin(), v.end());
|
||||
return queryPhrase;
|
||||
}
|
||||
|
||||
int FileSearchV4::getResult(Xapian::MSet &result)
|
||||
{
|
||||
for (auto it = result.begin(); it != result.end(); ++it)
|
||||
{
|
||||
Xapian::Document doc = it.get_document();
|
||||
std::string data = doc.get_data();
|
||||
Xapian::weight docScoreWeight = it.get_weight();
|
||||
Xapian::percent docScorePercent = it.get_percent();
|
||||
QString path = QString::fromStdString(data);
|
||||
SearchResultInfo sSearchResult;
|
||||
std::string().swap(data);
|
||||
|
||||
if(SearchManager::isBlocked(path))
|
||||
continue;
|
||||
|
||||
QFileInfo info(path);
|
||||
|
||||
if(!info.exists())
|
||||
{
|
||||
// pathTobeDelete->append(QString::fromStdString(data));
|
||||
qDebug()<<path<<"is not exist!!";
|
||||
}
|
||||
else
|
||||
{
|
||||
sSearchResult.fileName = info.fileName().toStdString();
|
||||
sSearchResult.filePath = path.toStdString();
|
||||
sSearchResult.size = static_cast<size_t>(info.size());
|
||||
sSearchResult.type = info.suffix().toStdString();
|
||||
sSearchResult.time = info.lastModified().toString("yyyy/MM/dd hh:mm:ss").toStdString();
|
||||
|
||||
switch (m_value.toInt())
|
||||
{
|
||||
case 1:
|
||||
SearchManager::m_mutex1.lock();
|
||||
if(m_uniqueSymbol == SearchManager::uniqueSymbol2)
|
||||
{
|
||||
m_search_result->push(sSearchResult);
|
||||
SearchManager::m_mutex1.unlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchManager::m_mutex1.unlock();
|
||||
return -1;
|
||||
}
|
||||
|
||||
break;
|
||||
case 0:
|
||||
SearchManager::m_mutex2.lock();
|
||||
if(m_uniqueSymbol == SearchManager::uniqueSymbol1)
|
||||
{
|
||||
m_search_result->push(sSearchResult);
|
||||
SearchManager::m_mutex2.unlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchManager::m_mutex2.unlock();
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// searchResult.append(path);
|
||||
}
|
||||
qDebug()<< "doc="<< path << ",weight=" <<docScoreWeight << ",percent=" << docScorePercent;
|
||||
}
|
||||
// if(!pathTobeDelete->isEmpty())
|
||||
// deleteAllIndex(pathTobeDelete)
|
||||
return 0;
|
||||
}
|
||||
|
||||
FileContentSearchV4::FileContentSearchV4(std::queue<SearchResultInfo> *searchResult, size_t uniqueSymbol, QString keyword, int begin, int num)
|
||||
{
|
||||
this->setAutoDelete(true);
|
||||
m_search_result = searchResult;
|
||||
m_uniqueSymbol = uniqueSymbol;
|
||||
m_keyword = keyword;
|
||||
m_begin = begin;
|
||||
m_num = num;
|
||||
}
|
||||
|
||||
FileContentSearchV4::~FileContentSearchV4()
|
||||
{
|
||||
m_search_result = nullptr;
|
||||
}
|
||||
|
||||
void FileContentSearchV4::run()
|
||||
{
|
||||
int resultCount = 0;
|
||||
int total = 0;
|
||||
|
||||
while(total<50)
|
||||
{
|
||||
resultCount = keywordSearchContent();
|
||||
if(resultCount == 0 || resultCount == -1)
|
||||
break;
|
||||
total += resultCount;
|
||||
m_begin += m_num;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int FileContentSearchV4::keywordSearchContent()
|
||||
{
|
||||
try
|
||||
{
|
||||
qDebug()<<"--keywordSearchContent search start--";
|
||||
|
||||
Xapian::Database db(CONTENT_INDEX_PATH);
|
||||
Xapian::Enquire enquire(db);
|
||||
Xapian::QueryParser qp;
|
||||
qp.set_default_op(Xapian::Query::OP_AND);
|
||||
qp.set_database(db);
|
||||
/*
|
||||
::friso::ResultMap ret;
|
||||
::friso::FrisoSegmentation::getInstance()->callSegement(ret, keyword.toLocal8Bit().data());
|
||||
for (::friso::ResultMap::iterator it_map = ret.begin(); it_map != ret.end(); ++it_map){
|
||||
target_str += it_map->first;
|
||||
target_str += " ";
|
||||
it_map->second.first.clear();
|
||||
::std::vector<size_t>().swap(it_map->second.first);
|
||||
}
|
||||
|
||||
ret.clear();
|
||||
ret.erase(ret.begin(), ret.end());
|
||||
::friso::ResultMap().swap(ret);
|
||||
*/
|
||||
QVector<SKeyWord> sKeyWord = ChineseSegmentation::getInstance()->callSegement(m_keyword.toStdString());
|
||||
//Creat a query
|
||||
std::string words;
|
||||
for(int i=0;i<sKeyWord.size();i++)
|
||||
{
|
||||
words.append(sKeyWord.at(i).word).append(" ");
|
||||
}
|
||||
|
||||
Xapian::Query query = qp.parse_query(words);
|
||||
// Xapian::Query query = qp.parse_query(keyword.toStdString());
|
||||
|
||||
|
||||
|
||||
// QVector<SKeyWord> sKeyWord = ChineseSegmentation::getInstance()->callSegement(keyword);
|
||||
// //Creat a query
|
||||
// std::string words;
|
||||
// for(int i=0;i<sKeyWord.size();i++)
|
||||
// {
|
||||
// words.append(sKeyWord.at(i).word).append(" ");
|
||||
// }
|
||||
|
||||
|
||||
// Xapian::Query query = qp.parse_query(words);
|
||||
|
||||
// std::vector<Xapian::Query> v;
|
||||
// for(int i=0;i<sKeyWord.size();i++)
|
||||
// {
|
||||
// v.push_back(Xapian::Query(sKeyWord.at(i).word));
|
||||
// qDebug()<<QString::fromStdString(sKeyWord.at(i).word);
|
||||
// }
|
||||
// Xapian::Query queryPhrase =Xapian::Query(Xapian::Query::OP_AND, v.begin(), v.end());
|
||||
qDebug()<<"keywordSearchContent:"<<QString::fromStdString(query.get_description());
|
||||
|
||||
enquire.set_query(query);
|
||||
|
||||
Xapian::MSet result = enquire.get_mset(m_begin, m_num);
|
||||
int resultCount = result.size();
|
||||
if(result.size() == 0)
|
||||
return 0;
|
||||
qDebug()<< "keywordSearchContent results count=" <<resultCount;
|
||||
|
||||
if(getResult(result,words) == -1)
|
||||
return -1;
|
||||
|
||||
qDebug()<< "--keywordSearchContent search finish--";
|
||||
return resultCount;
|
||||
}
|
||||
catch(const Xapian::Error &e)
|
||||
{
|
||||
qWarning() <<QString::fromStdString(e.get_description());
|
||||
qDebug()<< "--keywordSearchContent search finish--";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int FileContentSearchV4::getResult(Xapian::MSet &result, std::string &keyWord)
|
||||
{
|
||||
for (auto it = result.begin(); it != result.end(); ++it)
|
||||
{
|
||||
Xapian::Document doc = it.get_document();
|
||||
std::string data = doc.get_data();
|
||||
double docScoreWeight = it.get_weight();
|
||||
Xapian::percent docScorePercent = it.get_percent();
|
||||
QString path = QString::fromStdString(doc.get_value(1));
|
||||
|
||||
if(SearchManager::isBlocked(path))
|
||||
continue;
|
||||
|
||||
QFileInfo info(path);
|
||||
SearchResultInfo sSearchResult;
|
||||
|
||||
if(!info.exists())
|
||||
{
|
||||
// pathTobeDelete->append(QString::fromStdString(data));
|
||||
qDebug()<<path<<"is not exist!!";
|
||||
continue;
|
||||
}
|
||||
|
||||
sSearchResult.fileName = info.fileName().toStdString();
|
||||
sSearchResult.filePath = path.toStdString();
|
||||
sSearchResult.size = static_cast<size_t>(info.size());
|
||||
sSearchResult.type = info.suffix().toStdString();
|
||||
sSearchResult.time = info.lastModified().toString("yyyy/MM/dd hh:mm:ss").toStdString();
|
||||
|
||||
// Construct snippets containing keyword.
|
||||
// snippets.append(QString::fromStdString( result.snippet(doc.get_data(),400)));
|
||||
// qWarning()<<QString::fromStdString(s);
|
||||
auto term = doc.termlist_begin();
|
||||
std::string wordTobeFound = QString::fromStdString(keyWord).section(" ",0,0).toStdString();
|
||||
int size = wordTobeFound.length();
|
||||
term.skip_to(wordTobeFound);
|
||||
int count =0;
|
||||
for(auto pos = term.positionlist_begin();pos != term.positionlist_end()&&count < 6;++pos)
|
||||
{
|
||||
std::string s = data.substr((*pos < 60)? 0: (*pos - 60) , size + 120);
|
||||
QString snippet = QString::fromStdString(s);
|
||||
if(snippet.size() > 6 + QString::fromStdString(keyWord).size())
|
||||
snippet.replace(0,3,"...").replace(snippet.size()-3,3,"...");
|
||||
else
|
||||
snippet.append("...").prepend("...");
|
||||
sSearchResult.snippets.push_back(snippet.toStdString());
|
||||
|
||||
QString().swap(snippet);
|
||||
std::string().swap(s);
|
||||
++count;
|
||||
}
|
||||
std::string().swap(data);
|
||||
|
||||
// for(QString i : QString::fromStdString(keyWord).split(" ",QString::SkipEmptyParts))
|
||||
// {
|
||||
// std::string word = i.toStdString();
|
||||
// term.skip_to(word);
|
||||
// int size = word.size();
|
||||
// auto pos = term.positionlist_begin();
|
||||
// std::string s = data.substr((*pos < 60)? 0: (*pos - 60) , size + 120);
|
||||
// QString snippet = QString::fromStdString(s);
|
||||
// snippet.replace(0,3,"...").replace(snippet.size()-3,3,"...");
|
||||
// snippets.append(snippet);
|
||||
// std::string().swap(word);
|
||||
// std::string().swap(s);
|
||||
// QString().swap(snippet);
|
||||
// }
|
||||
|
||||
SearchManager::m_mutex3.lock();
|
||||
if(m_uniqueSymbol == SearchManager::uniqueSymbol3)
|
||||
{
|
||||
|
||||
m_search_result->push(sSearchResult);
|
||||
SearchManager::m_mutex3.unlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchManager::m_mutex3.unlock();
|
||||
return -1;
|
||||
}
|
||||
// searchResult.insert(path,snippets);
|
||||
qDebug()<< "path="<< path << ",weight=" <<docScoreWeight << ",percent=" << docScorePercent;
|
||||
}
|
||||
// // if(!pathTobeDelete->isEmpty())
|
||||
// // deleteAllIndex(pathTobeDelete)
|
||||
return 0;
|
||||
}
|
||||
DirectSearch::DirectSearch(QString keyword, QQueue<QString> *searchResultFile, QQueue<QString> *searchResultDir, size_t uniqueSymbol) {
|
||||
this->setAutoDelete(true);
|
||||
m_keyword = keyword;
|
||||
|
|
|
@ -36,41 +36,23 @@
|
|||
#include <QtConcurrent/QtConcurrent>
|
||||
#include <QThread>
|
||||
#include <QUrl>
|
||||
#include <list>
|
||||
#include <queue>
|
||||
|
||||
#include "file-utils.h"
|
||||
#include "global-settings.h"
|
||||
#include "chinese-segmentation.h"
|
||||
|
||||
|
||||
//#define INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/index_data").toStdString()
|
||||
//#define CONTENT_INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/content_index_data").toStdString()
|
||||
#define INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/index_data").toStdString()
|
||||
#define CONTENT_INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/content_index_data").toStdString()
|
||||
|
||||
#define INDEX_PATH "/media/用户保险箱/.ukui-search/index_data"
|
||||
#define CONTENT_INDEX_PATH "/media/用户保险箱/.ukui-search/content_index_data"
|
||||
namespace Zeeker {
|
||||
struct SearchResultInfo{
|
||||
std::string filePath;
|
||||
std::string fileName;
|
||||
std::list<std::string> snippets;
|
||||
std::string time;
|
||||
std::string type;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
class LIBSEARCH_EXPORT SearchManager : public QObject {
|
||||
friend class FileSearch;
|
||||
friend class FileContentSearch;
|
||||
friend class FileSearchV4;
|
||||
friend class FileContentSearchV4;
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SearchManager(QObject *parent = nullptr);
|
||||
void searchLocalFiles(std::string keyword,
|
||||
std::queue<SearchResultInfo> *searchResultFile,
|
||||
std::queue<SearchResultInfo> *searchResultDir,
|
||||
std::queue<SearchResultInfo> *searchResultContent);
|
||||
~SearchManager();
|
||||
|
||||
static int getCurrentIndexCount();
|
||||
|
@ -78,7 +60,6 @@ public:
|
|||
static size_t uniqueSymbol1;
|
||||
static size_t uniqueSymbol2;
|
||||
static size_t uniqueSymbol3;
|
||||
|
||||
static QMutex m_mutex1;
|
||||
static QMutex m_mutex2;
|
||||
static QMutex m_mutex3;
|
||||
|
@ -152,44 +133,6 @@ private:
|
|||
int m_num = 20;
|
||||
};
|
||||
|
||||
class FileSearchV4 : public QRunnable
|
||||
{
|
||||
public:
|
||||
explicit FileSearchV4(std::queue<SearchResultInfo> *searchResult,size_t uniqueSymbol, QString keyword, QString value,unsigned slot = 1,int begin = 0, int num = 20);
|
||||
~FileSearchV4();
|
||||
protected:
|
||||
void run();
|
||||
private:
|
||||
int keywordSearchfile();
|
||||
Xapian::Query creatQueryForFileSearch(Xapian::Database &db);
|
||||
int getResult(Xapian::MSet &result);
|
||||
|
||||
std::queue<SearchResultInfo> *m_search_result = nullptr;
|
||||
QString m_value;
|
||||
unsigned m_slot = 1;
|
||||
size_t m_uniqueSymbol;
|
||||
QString m_keyword;
|
||||
int m_begin = 0;
|
||||
int m_num = 20;
|
||||
};
|
||||
class FileContentSearchV4 : public QRunnable
|
||||
{
|
||||
public:
|
||||
explicit FileContentSearchV4(std::queue<SearchResultInfo> *searchResult,size_t uniqueSymbol, QString keyword, int begin = 0, int num = 20);
|
||||
~FileContentSearchV4();
|
||||
protected:
|
||||
void run();
|
||||
private:
|
||||
int keywordSearchContent();
|
||||
int getResult(Xapian::MSet &result,std::string &keyWord);
|
||||
|
||||
std::queue<SearchResultInfo> *m_search_result = nullptr;
|
||||
size_t m_uniqueSymbol;
|
||||
QString m_keyword;
|
||||
int m_begin = 0;
|
||||
int m_num = 20;
|
||||
};
|
||||
|
||||
class DirectSearch : public QRunnable {
|
||||
public:
|
||||
explicit DirectSearch(QString keyword, QQueue<QString> *searchResultFile, QQueue<QString> *searchResultDir, size_t uniqueSymbol);
|
||||
|
|
|
@ -2,12 +2,7 @@
|
|||
using namespace Zeeker;
|
||||
SearchMethodManager::SearchMethodManager()
|
||||
{
|
||||
QStringList pathList;
|
||||
pathList.append("/media/用户保险箱");
|
||||
pathList.append("/media/邮件保险箱");
|
||||
pathList.append("/media/公共保险箱");
|
||||
pathList.append("/media/备份保险箱");
|
||||
m_iw = InotifyWatch::getInstance(pathList);
|
||||
m_iw = InotifyWatch::getInstance(HOME_PATH);
|
||||
}
|
||||
|
||||
void SearchMethodManager::searchMethod(FileUtils::SearchMethod sm) {
|
||||
|
|
|
@ -19,36 +19,31 @@
|
|||
*/
|
||||
#include "traverse_bfs.h"
|
||||
using namespace Zeeker;
|
||||
Traverse_BFS::Traverse_BFS(const QStringList& pathList) {
|
||||
for(QString path : pathList) {
|
||||
Q_ASSERT('/' == path.at(0));
|
||||
}
|
||||
|
||||
this->m_pathList = pathList;
|
||||
Traverse_BFS::Traverse_BFS(const QString& path) {
|
||||
Q_ASSERT('/' == path.at(0));
|
||||
this->path = path;
|
||||
}
|
||||
|
||||
void Traverse_BFS::Traverse() {
|
||||
QQueue<QString> bfs;
|
||||
for(QString path : m_pathList) {
|
||||
bfs.enqueue(path);
|
||||
QFileInfoList list;
|
||||
QDir dir;
|
||||
// QDir::Hidden
|
||||
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
while(!bfs.empty()) {
|
||||
dir.setPath(bfs.dequeue());
|
||||
list = dir.entryInfoList();
|
||||
for(auto i : list) {
|
||||
if(i.isDir() && (!(i.isSymLink()))) {
|
||||
bfs.enqueue(i.absoluteFilePath());
|
||||
}
|
||||
DoSomething(i);
|
||||
bfs.enqueue(this->path);
|
||||
QFileInfoList list;
|
||||
QDir dir;
|
||||
// QDir::Hidden
|
||||
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setSorting(QDir::DirsFirst);
|
||||
while(!bfs.empty()) {
|
||||
dir.setPath(bfs.dequeue());
|
||||
list = dir.entryInfoList();
|
||||
for(auto i : list) {
|
||||
if(i.isDir() && (!(i.isSymLink()))) {
|
||||
bfs.enqueue(i.absoluteFilePath());
|
||||
}
|
||||
DoSomething(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Traverse_BFS::setPath(const QStringList &pathList) {
|
||||
this->m_pathList = pathList;
|
||||
void Traverse_BFS::setPath(const QString& path) {
|
||||
this->path = path;
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@ public:
|
|||
void Traverse();
|
||||
virtual ~Traverse_BFS() = default;
|
||||
virtual void DoSomething(const QFileInfo&) = 0;
|
||||
void setPath(const QStringList &pathList);
|
||||
void setPath(const QString&);
|
||||
protected:
|
||||
Traverse_BFS(const QStringList &pathList);
|
||||
QStringList m_pathList;
|
||||
Traverse_BFS(const QString&);
|
||||
QString path = "/home";
|
||||
private:
|
||||
Traverse_BFS(const Traverse_BFS&) = delete;
|
||||
void operator=(const Traverse_BFS&) = delete;
|
||||
|
|
|
@ -43,5 +43,4 @@ namespace Zeeker {
|
|||
//};
|
||||
}
|
||||
|
||||
|
||||
#endif // LIBSEARCH_H
|
||||
|
|
|
@ -71,6 +71,7 @@ unix {
|
|||
INSTALLS += header
|
||||
}
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/../libchinese-segmentation
|
||||
DEPENDPATH += $$PWD/../libchinese-segmentation
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ void ContentWidget::initUI() {
|
|||
QPalette pal = palette();
|
||||
QPalette scroll_bar_pal = palette();
|
||||
// pal.setColor(QPalette::Base, QColor(0, 0, 0, 0));
|
||||
// pal.setColor(QPalette::Window, QColor(0, 0, 0, 0)); //使用此palette的窗口背景将为透明
|
||||
// scroll_bar_pal.setColor(QPalette::Base, QColor(0, 0, 0, 0));
|
||||
pal.setColor(QPalette::Window, QColor(0, 0, 0, 0)); //使用此palette的窗口背景将为透明
|
||||
scroll_bar_pal.setColor(QPalette::Base, QColor(0, 0, 0, 0));
|
||||
m_homePage = new QWidget(this);
|
||||
m_homePageLyt = new QVBoxLayout(m_homePage);
|
||||
m_homePageLyt->setSpacing(0);
|
||||
|
@ -108,8 +108,8 @@ void ContentWidget::initUI() {
|
|||
m_resultDetailArea->setFrameShape(QFrame::NoFrame);
|
||||
m_resultListArea->setPalette(pal);
|
||||
m_resultDetailArea->setPalette(pal);
|
||||
// m_resultListArea->verticalScrollBar()->setPalette(scroll_bar_pal);
|
||||
// m_resultDetailArea->verticalScrollBar()->setPalette(scroll_bar_pal);
|
||||
m_resultListArea->verticalScrollBar()->setPalette(scroll_bar_pal);
|
||||
m_resultDetailArea->verticalScrollBar()->setPalette(scroll_bar_pal);
|
||||
this->addWidget(m_homePage);
|
||||
this->addWidget(m_resultPage);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#define HOMEPAGE_SETTINGS "media/用户保险箱/.ukui-search/ukui-search-homepage.conf"
|
||||
#define HOMEPAGE_SETTINGS QDir::homePath()+"/.config/org.ukui/ukui-search/ukui-search-homepage.conf"
|
||||
namespace Zeeker {
|
||||
class ConfigFile : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
|
@ -94,8 +94,6 @@ void SearchListView::setList(QStringList list) {
|
|||
this->blockSignals(false);
|
||||
}
|
||||
rowheight = this->rowHeight(this->model()->index(0, 0, QModelIndex()));
|
||||
qDebug()<<"setList rowheight"<< rowheight;
|
||||
qDebug()<<"setList indexRowSizeHint"<<indexRowSizeHint(QModelIndex());
|
||||
this->setFixedHeight(m_item->getCurrentSize() * rowheight + 4);
|
||||
}
|
||||
|
||||
|
@ -136,7 +134,6 @@ void SearchListView::refresh()
|
|||
* @brief SearchListView::setKeyword 设置关键词
|
||||
* @param keyword 关键词
|
||||
*/
|
||||
|
||||
void SearchListView::setKeyword(QString keyword) {
|
||||
m_styleDelegate->setSearchKeyword(keyword);
|
||||
}
|
||||
|
|
|
@ -206,8 +206,7 @@ bool SearchBarHLayout::eventFilter(QObject *watched, QEvent *event) {
|
|||
*/
|
||||
SearchLineEdit::SearchLineEdit(QWidget *parent) : QLineEdit(parent) {
|
||||
this->setFocusPolicy(Qt::ClickFocus);
|
||||
this->setAttribute(Qt::WA_InputMethodEnabled);
|
||||
// this->installEventFilter(this);
|
||||
this->installEventFilter(this);
|
||||
// this->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
this->setMaxLength(100);
|
||||
|
||||
|
|
18
src/main.cpp
18
src/main.cpp
|
@ -174,19 +174,6 @@ int main(int argc, char *argv[]) {
|
|||
syslog(LOG_ERR, "Home is not exits!!\n");
|
||||
::sleep(1);
|
||||
}
|
||||
while(!QDir("/media/用户保险箱").exists()) {
|
||||
qWarning() << "集中管控目录未挂载!!";
|
||||
printf("集中管控目录未挂载!!");
|
||||
syslog(LOG_ERR, "集中管控目录未挂载!!\n");
|
||||
::sleep(1);
|
||||
}
|
||||
while(!QFileInfo("/media/用户保险箱").permission(QFileDevice::WriteUser)) {
|
||||
qWarning() << "/media/用户保险箱 无写入权限!!";
|
||||
printf("/media/用户保险箱 无写入权限!!");
|
||||
syslog(LOG_ERR, "/media/用户保险箱 无写入权限!!\n");
|
||||
::sleep(1);
|
||||
}
|
||||
|
||||
|
||||
// Output log to file
|
||||
qInstallMessageHandler(messageOutput);
|
||||
|
@ -276,8 +263,7 @@ int main(int argc, char *argv[]) {
|
|||
// Load translations
|
||||
QTranslator translator;
|
||||
try {
|
||||
// if (! translator.load("/usr/share/ukui-search/translations/" + QLocale::system().name())) throw -1;
|
||||
if (! translator.load(":/res/translations/zh_CN.qm")) throw -1;
|
||||
if(! translator.load("/usr/share/ukui-search/translations/" + QLocale::system().name())) throw - 1;
|
||||
app.installTranslator(&translator);
|
||||
} catch(...) {
|
||||
qDebug() << "Load translations file" << QLocale() << "failed!";
|
||||
|
@ -315,11 +301,9 @@ int main(int argc, char *argv[]) {
|
|||
if(QString::compare(QString("-s"), QString(QLatin1String(argv[1]))) == 0) {
|
||||
// w->moveToPanel();
|
||||
centerToScreen(w);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
XAtomHelper::getInstance()->setWindowMotifHint(w->winId(), w->m_hints);
|
||||
#endif
|
||||
|
||||
w->show();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
#include <QPalette>
|
||||
#include <QScreen>
|
||||
#include <QStyleOption>
|
||||
|
||||
//#include <KWindowEffects>
|
||||
#include <QPixmap>
|
||||
//#include "kwindowsystem.h"
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
#include <KWindowEffects>
|
||||
#include "kwindowsystem.h"
|
||||
#endif
|
||||
#include "qt-single-application.h"
|
||||
|
||||
//#include "inotify-manager.h"
|
||||
|
@ -75,7 +75,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
this->setWindowTitle(tr("ukui-search"));
|
||||
initUi();
|
||||
// initTimer();
|
||||
initTimer();
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
// setProperty("useStyleWindowManager", false); //禁止拖动
|
||||
|
@ -92,15 +92,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
setProperty("blurRegion", QRegion(path.toFillPolygon().toPolygon()));
|
||||
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon()));
|
||||
#endif
|
||||
connect(qApp, &QApplication::paletteChanged, this, [ = ](const QPalette & pal) {
|
||||
this->setPalette(pal);
|
||||
this->update();
|
||||
Q_FOREACH(QWidget *widget, this->findChildren<QWidget *>()) {
|
||||
if(widget) {
|
||||
widget->update();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
m_search_result_file = new QQueue<QString>;
|
||||
m_search_result_dir = new QQueue<QString>;
|
||||
|
@ -146,10 +137,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
}
|
||||
}
|
||||
});
|
||||
// QObject::connect(this, &MainWindow::searchMethodChanged, this, [ = ](FileUtils::SearchMethod sm) {
|
||||
// this->m_searchMethodManager.searchMethod(sm);
|
||||
// });
|
||||
this->m_searchMethodManager.searchMethod(FileUtils::SearchMethod::INDEXSEARCH);
|
||||
QObject::connect(this, &MainWindow::searchMethodChanged, this, [ = ](FileUtils::SearchMethod sm) {
|
||||
this->m_searchMethodManager.searchMethod(sm);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -168,14 +158,14 @@ MainWindow::~MainWindow() {
|
|||
m_settingsWidget = NULL;
|
||||
}
|
||||
#endif
|
||||
// if(m_askDialog) {
|
||||
// delete m_askDialog;
|
||||
// m_askDialog = NULL;
|
||||
// }
|
||||
// if(m_askTimer) {
|
||||
// delete m_askTimer;
|
||||
// m_askTimer = NULL;
|
||||
// }
|
||||
if(m_askDialog) {
|
||||
delete m_askDialog;
|
||||
m_askDialog = NULL;
|
||||
}
|
||||
if(m_askTimer) {
|
||||
delete m_askTimer;
|
||||
m_askTimer = NULL;
|
||||
}
|
||||
if(m_search_gsettings) {
|
||||
delete m_search_gsettings;
|
||||
m_search_gsettings = NULL;
|
||||
|
@ -283,17 +273,14 @@ void MainWindow::initUi() {
|
|||
}
|
||||
// m_seach_app_thread->stop();
|
||||
m_contentFrame->setCurrentIndex(0);
|
||||
// m_askTimer->stop();
|
||||
m_askTimer->stop();
|
||||
} else {
|
||||
m_contentFrame->setCurrentIndex(1);
|
||||
QTimer::singleShot(10, this, [ = ]() {
|
||||
startSearch(text);
|
||||
// //允许弹窗且当前次搜索(为关闭主界面,算一次搜索过程)未询问且当前为暴力搜索
|
||||
// if(GlobalSettings::getInstance()->getValue(ENABLE_CREATE_INDEX_ASK_DIALOG).toString() != "false" && !m_currentSearchAsked && FileUtils::searchMethod == FileUtils::SearchMethod::DIRECTSEARCH)
|
||||
// m_askTimer->start();
|
||||
});
|
||||
}
|
||||
// m_researchTimer->stop(); //如果搜索内容发生改变,则停止建索引后重新搜索的倒计时
|
||||
m_researchTimer->stop(); //如果搜索内容发生改变,则停止建索引后重新搜索的倒计时
|
||||
});
|
||||
|
||||
//初始化homepage
|
||||
|
@ -301,34 +288,34 @@ void MainWindow::initUi() {
|
|||
m_contentFrame->initHomePage();
|
||||
|
||||
//创建索引询问弹窗
|
||||
// m_askDialog = new CreateIndexAskDialog(this);
|
||||
//#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
// MotifWmHints ask_dialog_hints;
|
||||
// ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||
// ask_dialog_hints.functions = MWM_FUNC_ALL;
|
||||
// ask_dialog_hints.decorations = MWM_DECOR_BORDER;
|
||||
// XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints);
|
||||
//#endif
|
||||
// connect(m_askDialog, &CreateIndexAskDialog::closed, this, [ = ]() {
|
||||
// m_isAskDialogVisible = false;
|
||||
// });
|
||||
// connect(m_askDialog, &CreateIndexAskDialog::btnClicked, this, [ = ](const bool & create_index, const bool & no_longer_ask) {
|
||||
// if(no_longer_ask) {
|
||||
// GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "false");
|
||||
// } else {
|
||||
// GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "true");
|
||||
// }
|
||||
// if(create_index) {
|
||||
// if(m_search_gsettings && m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
|
||||
// m_search_gsettings->set(SEARCH_METHOD_KEY, true);
|
||||
// } else {
|
||||
// //调用创建索引接口
|
||||
// Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
|
||||
// //创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
|
||||
// m_researchTimer->start();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
m_askDialog = new CreateIndexAskDialog(this);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
MotifWmHints ask_dialog_hints;
|
||||
ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||
ask_dialog_hints.functions = MWM_FUNC_ALL;
|
||||
ask_dialog_hints.decorations = MWM_DECOR_BORDER;
|
||||
XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints);
|
||||
#endif
|
||||
connect(m_askDialog, &CreateIndexAskDialog::closed, this, [ = ]() {
|
||||
m_isAskDialogVisible = false;
|
||||
});
|
||||
connect(m_askDialog, &CreateIndexAskDialog::btnClicked, this, [ = ](const bool & create_index, const bool & no_longer_ask) {
|
||||
if(no_longer_ask) {
|
||||
GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "false");
|
||||
} else {
|
||||
GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "true");
|
||||
}
|
||||
if(create_index) {
|
||||
if(m_search_gsettings && m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
|
||||
m_search_gsettings->set(SEARCH_METHOD_KEY, true);
|
||||
} else {
|
||||
//调用创建索引接口
|
||||
Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
|
||||
//创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
|
||||
m_researchTimer->start();
|
||||
}
|
||||
}
|
||||
});
|
||||
installEventFilter(this);
|
||||
}
|
||||
|
||||
|
@ -399,9 +386,9 @@ void MainWindow::startSearch(QString keyword) {
|
|||
if(! m_search_result_thread->isRunning()) {
|
||||
m_search_result_thread->start();
|
||||
}
|
||||
// //允许弹窗且当前次搜索(为关闭主界面,算一次搜索过程)未询问且当前为暴力搜索
|
||||
// if(GlobalSettings::getInstance()->getValue(ENABLE_CREATE_INDEX_ASK_DIALOG).toString() != "false" && !m_currentSearchAsked && FileUtils::searchMethod == FileUtils::SearchMethod::DIRECTSEARCH)
|
||||
// m_askTimer->start();
|
||||
//允许弹窗且当前次搜索(为关闭主界面,算一次搜索过程)未询问且当前为暴力搜索
|
||||
if(GlobalSettings::getInstance()->getValue(ENABLE_CREATE_INDEX_ASK_DIALOG).toString() != "false" && !m_currentSearchAsked && FileUtils::searchMethod == FileUtils::SearchMethod::DIRECTSEARCH)
|
||||
m_askTimer->start();
|
||||
|
||||
m_contentFrame->setKeyword(keyword);
|
||||
|
||||
|
@ -499,28 +486,28 @@ void MainWindow::centerToScreen(QWidget* widget) {
|
|||
}
|
||||
|
||||
void MainWindow::initGsettings() {
|
||||
// const QByteArray id(UKUI_SEARCH_SCHEMAS);
|
||||
// if(QGSettings::isSchemaInstalled(id)) {
|
||||
// m_search_gsettings = new QGSettings(id);
|
||||
// connect(m_search_gsettings, &QGSettings::changed, this, [ = ](const QString & key) {
|
||||
// if(key == SEARCH_METHOD_KEY) {
|
||||
// bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
|
||||
// this->setSearchMethod(is_index_search);
|
||||
// } else if(key == WEB_ENGINE_KEY) {
|
||||
// QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString();
|
||||
// GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine);
|
||||
// Q_EMIT this->webEngineChanged();
|
||||
// }
|
||||
// });
|
||||
// if(m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
|
||||
// bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
|
||||
// this->setSearchMethod(is_index_search);
|
||||
// }
|
||||
// if(m_search_gsettings->keys().contains(WEB_ENGINE_KEY)) {
|
||||
// QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString();
|
||||
// GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine);
|
||||
// }
|
||||
// }
|
||||
const QByteArray id(UKUI_SEARCH_SCHEMAS);
|
||||
if(QGSettings::isSchemaInstalled(id)) {
|
||||
m_search_gsettings = new QGSettings(id);
|
||||
connect(m_search_gsettings, &QGSettings::changed, this, [ = ](const QString & key) {
|
||||
if(key == SEARCH_METHOD_KEY) {
|
||||
bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
|
||||
this->setSearchMethod(is_index_search);
|
||||
} else if(key == WEB_ENGINE_KEY) {
|
||||
QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString();
|
||||
GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine);
|
||||
Q_EMIT this->webEngineChanged();
|
||||
}
|
||||
});
|
||||
if(m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
|
||||
bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
|
||||
this->setSearchMethod(is_index_search);
|
||||
}
|
||||
if(m_search_gsettings->keys().contains(WEB_ENGINE_KEY)) {
|
||||
QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString();
|
||||
GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//使用GSetting获取当前窗口应该使用的透明度
|
||||
|
@ -528,26 +515,26 @@ double MainWindow::getTransparentData() {
|
|||
return GlobalSettings::getInstance()->getValue(TRANSPARENCY_KEY).toDouble();
|
||||
}
|
||||
|
||||
//void MainWindow::initTimer() {
|
||||
// m_askTimer = new QTimer;
|
||||
// m_askTimer->setInterval(5 * 1000);
|
||||
// connect(m_askTimer, &QTimer::timeout, this, [ = ]() {
|
||||
// if(this->isVisible()) {
|
||||
// m_isAskDialogVisible = true;
|
||||
// m_askDialog->show();
|
||||
// m_currentSearchAsked = true;
|
||||
// }
|
||||
// m_askTimer->stop();
|
||||
// });
|
||||
// m_researchTimer = new QTimer;
|
||||
// m_researchTimer->setInterval(10 * 1000);
|
||||
// connect(m_researchTimer, &QTimer::timeout, this, [ = ]() {
|
||||
// if(this->isVisible()) {
|
||||
// searchContent(m_searchLayout->text());
|
||||
// }
|
||||
// m_researchTimer->stop();
|
||||
// });
|
||||
//}
|
||||
void MainWindow::initTimer() {
|
||||
m_askTimer = new QTimer;
|
||||
m_askTimer->setInterval(5 * 1000);
|
||||
connect(m_askTimer, &QTimer::timeout, this, [ = ]() {
|
||||
if(this->isVisible()) {
|
||||
m_isAskDialogVisible = true;
|
||||
m_askDialog->show();
|
||||
m_currentSearchAsked = true;
|
||||
}
|
||||
m_askTimer->stop();
|
||||
});
|
||||
m_researchTimer = new QTimer;
|
||||
m_researchTimer->setInterval(10 * 1000);
|
||||
connect(m_researchTimer, &QTimer::timeout, this, [ = ]() {
|
||||
if(this->isVisible()) {
|
||||
startSearch(m_searchLayout->text());
|
||||
}
|
||||
m_researchTimer->stop();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MainWindow::tryHideMainwindow 尝试隐藏主界面并停止部分未完成的动作,重置部分状态值
|
||||
|
@ -556,13 +543,13 @@ bool MainWindow::tryHideMainwindow()
|
|||
{
|
||||
if (!m_isAskDialogVisible) {
|
||||
qDebug()<<"Mainwindow will be hidden";
|
||||
// m_currentSearchAsked = false;
|
||||
m_currentSearchAsked = false;
|
||||
this->hide();
|
||||
// m_askTimer->stop();
|
||||
// m_researchTimer->stop();
|
||||
m_askTimer->stop();
|
||||
m_researchTimer->stop();
|
||||
m_contentFrame->closeWebView();
|
||||
m_search_result_thread->requestInterruption();
|
||||
// m_search_result_thread->quit();
|
||||
m_search_result_thread->quit();
|
||||
return true;
|
||||
} else {
|
||||
//有上层弹窗未关闭,不允许隐藏主界面
|
||||
|
@ -575,17 +562,17 @@ bool MainWindow::tryHideMainwindow()
|
|||
* @brief MainWindow::setSearchMethod 设置搜索模式
|
||||
* @param is_index_search true为索引搜索,false为暴力搜索
|
||||
*/
|
||||
//void MainWindow::setSearchMethod(const bool &is_index_search) {
|
||||
// if(is_index_search) {
|
||||
// //调用创建索引接口
|
||||
// Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
|
||||
// //创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
|
||||
// m_researchTimer->start();
|
||||
// } else {
|
||||
// Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::DIRECTSEARCH);
|
||||
// m_researchTimer->stop();
|
||||
// }
|
||||
//}
|
||||
void MainWindow::setSearchMethod(const bool &is_index_search) {
|
||||
if(is_index_search) {
|
||||
//调用创建索引接口
|
||||
Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
|
||||
//创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
|
||||
m_researchTimer->start();
|
||||
} else {
|
||||
Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::DIRECTSEARCH);
|
||||
m_researchTimer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MainWindow::nativeEvent 处理窗口失焦事件
|
||||
|
@ -630,11 +617,11 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
|
|||
|
||||
bool MainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
// if (event->type() == QEvent::ActivationChange) {
|
||||
// if(QApplication::activeWindow() != this) {
|
||||
// tryHideMainwindow();
|
||||
// }
|
||||
// }
|
||||
if (event->type() == QEvent::ActivationChange) {
|
||||
if(QApplication::activeWindow() != this) {
|
||||
tryHideMainwindow();
|
||||
}
|
||||
}
|
||||
return QMainWindow::eventFilter(watched,event);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,16 +44,13 @@
|
|||
#include <QKeyEvent>
|
||||
#include <QGSettings/QGSettings>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
#include "content-widget.h"
|
||||
#include "input-box.h"
|
||||
#include "index/index-generator.h"
|
||||
#include "libsearch.h"
|
||||
#include "search-app-thread.h"
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
#include "xatom-helper.h"
|
||||
#endif
|
||||
|
@ -66,7 +63,6 @@
|
|||
#define SEARCH_METHOD_KEY "indexSearch"
|
||||
#define WEB_ENGINE_KEY "webEngine"
|
||||
|
||||
|
||||
namespace Zeeker {
|
||||
class SearchResult;
|
||||
class MainWindow : public QMainWindow {
|
||||
|
@ -94,7 +90,6 @@ public:
|
|||
MotifWmHints m_hints;
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// MainWindow quit when focus out.
|
||||
|
@ -124,7 +119,7 @@ private:
|
|||
SearchManager* m_searcher = nullptr;
|
||||
SettingsMatch *m_settingsMatch = nullptr;
|
||||
QSystemTrayIcon *m_sys_tray_icon = nullptr;
|
||||
// CreateIndexAskDialog * m_askDialog = nullptr;
|
||||
CreateIndexAskDialog * m_askDialog = nullptr;
|
||||
bool m_isAskDialogVisible = false;
|
||||
|
||||
QTimer * m_askTimer = nullptr; //询问是否创建索引弹窗弹出的计时器
|
||||
|
@ -134,9 +129,9 @@ private:
|
|||
|
||||
SearchMethodManager m_searchMethodManager;
|
||||
|
||||
// void setSearchMethod(const bool&);
|
||||
void setSearchMethod(const bool&);
|
||||
double getTransparentData();
|
||||
// void initTimer();
|
||||
void initTimer();
|
||||
bool tryHideMainwindow();
|
||||
|
||||
protected:
|
||||
|
@ -146,7 +141,7 @@ protected:
|
|||
void initUi();
|
||||
|
||||
Q_SIGNALS:
|
||||
// void searchMethodChanged(FileUtils::SearchMethod);
|
||||
void searchMethodChanged(FileUtils::SearchMethod);
|
||||
void webEngineChanged();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
|
|
@ -66,7 +66,6 @@ int SearchItemModel::rowCount(const QModelIndex& index) const {
|
|||
* @param index 条目的索引
|
||||
* @return model显示的列数
|
||||
*/
|
||||
|
||||
int SearchItemModel::columnCount(const QModelIndex& index) const {
|
||||
return index.isValid() ? 0 : 1;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -5,7 +5,6 @@
|
|||
<file>res/icons/close.svg</file>
|
||||
<file>res/qt-translations/qt_zh_CN.qm</file>
|
||||
<file>res/icons/net-disconnected.svg</file>
|
||||
<file>res/translations/zh_CN.qm</file>
|
||||
<file>res/icons/system-search.symbolic.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -34,7 +34,7 @@ extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int tran
|
|||
SettingsWidget::SettingsWidget(QWidget *parent) : QWidget(parent) {
|
||||
// this->setWindowIcon(QIcon::fromTheme("kylin-search"));
|
||||
this->setWindowTitle(tr("ukui-search-settings"));
|
||||
this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
||||
// this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
||||
// this->setAttribute(Qt::WA_TranslucentBackground);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
|
@ -226,6 +226,11 @@ void SettingsWidget::initUi() {
|
|||
// m_mainLyt->addWidget(m_bottomBtnFrame);
|
||||
|
||||
m_contentLyt->addStretch();
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
|
||||
this->m_titleFrame->hide();
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,7 +62,6 @@ private:
|
|||
MotifWmHints m_hints;
|
||||
#endif
|
||||
|
||||
|
||||
//标题栏
|
||||
QVBoxLayout * m_mainLyt = nullptr;
|
||||
QFrame * m_contentFrame = nullptr;
|
||||
|
|
28
src/src.pro
28
src/src.pro
|
@ -1,4 +1,4 @@
|
|||
QT += core gui dbus xml x11extras
|
||||
QT += core gui dbus KWindowSystem xml x11extras
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
|
@ -9,7 +9,7 @@ TEMPLATE = app
|
|||
PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0
|
||||
CONFIG += c++11 link_pkgconfig no_keywords lrelease
|
||||
LIBS += -lxapian -lgsettings-qt -lquazip5 -lX11
|
||||
#LIBS += -lukui-log4qt
|
||||
LIBS += -lukui-log4qt #-L/usr/local/lib/libjemalloc -ljemalloc
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
|
@ -33,8 +33,8 @@ SOURCES += \
|
|||
mainwindow.cpp \
|
||||
search-app-thread.cpp \
|
||||
search-result.cpp \
|
||||
settings-widget.cpp
|
||||
# xatom-helper.cpp
|
||||
settings-widget.cpp \
|
||||
xatom-helper.cpp
|
||||
|
||||
|
||||
HEADERS += \
|
||||
|
@ -44,8 +44,8 @@ HEADERS += \
|
|||
mainwindow.h \
|
||||
search-app-thread.h \
|
||||
search-result.h \
|
||||
settings-widget.h
|
||||
# xatom-helper.h
|
||||
settings-widget.h \
|
||||
xatom-helper.h
|
||||
|
||||
# Default rules for deployment.
|
||||
|
||||
|
@ -70,10 +70,10 @@ TRANSLATIONS += \
|
|||
qm_files.path = /usr/share/ukui-search/translations/
|
||||
qm_files.files = $$OUT_PWD/.qm/*.qm
|
||||
|
||||
#schemes.path = /usr/share/glib-2.0/schemas/
|
||||
#schemes.files += ../data/org.ukui.search.data.gschema.xml ../data/org.ukui.log4qt.ukui-search.gschema.xml
|
||||
schemes.path = /usr/share/glib-2.0/schemas/
|
||||
schemes.files += ../data/org.ukui.search.data.gschema.xml ../data/org.ukui.log4qt.ukui-search.gschema.xml
|
||||
|
||||
INSTALLS += qm_files
|
||||
INSTALLS += qm_files schemes
|
||||
|
||||
LIBS += -L$$OUT_PWD/../libchinese-segmentation -lchinese-segmentation \
|
||||
-L$$OUT_PWD/../libsearch -lukui-search
|
||||
|
@ -83,3 +83,13 @@ DEPENDPATH += $$PWD/../libchinese-segmentation
|
|||
|
||||
INCLUDEPATH += $$PWD/../libsearch
|
||||
DEPENDPATH += $$PWD/../libsearch
|
||||
|
||||
#DISTFILES += \
|
||||
# ../data/ukui-search-menu.desktop \
|
||||
# $$OUT_PWD/.qm/bo.qm \
|
||||
# $$OUT_PWD/.qm/tr.qm \
|
||||
# $$OUT_PWD/.qm/zh_CN.qm
|
||||
|
||||
DISTFILES += \
|
||||
../data/org.ukui.log4qt.ukui-search.gschema.xml \
|
||||
../data/org.ukui.search.data.gschema.xml
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../src/main.cpp" line="206"/>
|
||||
<location filename="../../src/main.cpp" line="195"/>
|
||||
<source>ukui-search is already running!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -12,57 +12,57 @@
|
|||
<context>
|
||||
<name>Zeeker::ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="370"/>
|
||||
<location filename="../../src/content-widget.cpp" line="359"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="406"/>
|
||||
<location filename="../../src/content-widget.cpp" line="395"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="407"/>
|
||||
<location filename="../../src/content-widget.cpp" line="396"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="672"/>
|
||||
<location filename="../../src/content-widget.cpp" line="661"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="674"/>
|
||||
<location filename="../../src/content-widget.cpp" line="663"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="676"/>
|
||||
<location filename="../../src/content-widget.cpp" line="665"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="678"/>
|
||||
<location filename="../../src/content-widget.cpp" line="667"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="680"/>
|
||||
<location filename="../../src/content-widget.cpp" line="669"/>
|
||||
<source>File Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="682"/>
|
||||
<location filename="../../src/content-widget.cpp" line="671"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="684"/>
|
||||
<location filename="../../src/content-widget.cpp" line="673"/>
|
||||
<source>Web Pages</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="686"/>
|
||||
<location filename="../../src/content-widget.cpp" line="675"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -70,32 +70,32 @@
|
|||
<context>
|
||||
<name>Zeeker::CreateIndexAskDialog</name>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="27"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="28"/>
|
||||
<source>ukui-search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="53"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="49"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="78"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="74"/>
|
||||
<source>Creating index can help you getting results quickly, whether to create or not?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="89"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="83"/>
|
||||
<source>Don't remind</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="100"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="94"/>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="102"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="96"/>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -111,17 +111,17 @@
|
|||
<context>
|
||||
<name>Zeeker::MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="68"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="66"/>
|
||||
<source>ukui-search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="123"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="120"/>
|
||||
<source>Global Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="205"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="197"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -170,32 +170,32 @@
|
|||
<context>
|
||||
<name>Zeeker::SearchDetailView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="209"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="211"/>
|
||||
<source>Introduction: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="224"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="230"/>
|
||||
<source>Application</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="358"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="365"/>
|
||||
<source>Document</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="478"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="486"/>
|
||||
<source>Preview is not avaliable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="528"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="536"/>
|
||||
<source>Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="536"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="544"/>
|
||||
<source>Last time modified</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -208,155 +208,155 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="80"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="300"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="532"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="74"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="289"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="519"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="109"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="103"/>
|
||||
<source><h2>Settings</h2></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="114"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="108"/>
|
||||
<source><h3>Index State</h3></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="116"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="118"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="110"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="112"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="126"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<source><h3>File Index Settings</h3></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="128"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="122"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="131"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="158"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="152"/>
|
||||
<source><h3>Search Engine Settings</h3></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="154"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="173"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="167"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="175"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="169"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="177"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="171"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="300"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="289"/>
|
||||
<source>Whether to delete this directory?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="301"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="290"/>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="302"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="291"/>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="360"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="349"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="363"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="352"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="371"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="360"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="417"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="404"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="418"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="405"/>
|
||||
<source>select blocked folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="419"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="406"/>
|
||||
<source>Select</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="420"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="407"/>
|
||||
<source>Position: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="421"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="408"/>
|
||||
<source>FileName: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="422"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="409"/>
|
||||
<source>FileType: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="423"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="410"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="516"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="503"/>
|
||||
<source>Choosen path is Empty!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="520"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="507"/>
|
||||
<source>Choosen path is not in "home"!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="524"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="511"/>
|
||||
<source>Its' parent folder has been blocked!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="528"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="515"/>
|
||||
<source>Set blocked folder failed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="533"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="520"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../src/main.cpp" line="206"/>
|
||||
<location filename="../../src/main.cpp" line="195"/>
|
||||
<source>ukui-search is already running!</source>
|
||||
<translation>ukui-bul zaten çalışıyor!</translation>
|
||||
</message>
|
||||
|
@ -247,57 +247,57 @@
|
|||
<context>
|
||||
<name>Zeeker::ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="370"/>
|
||||
<location filename="../../src/content-widget.cpp" line="359"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished">Yeni Açılan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="406"/>
|
||||
<location filename="../../src/content-widget.cpp" line="395"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished">Hızlı Aç</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="407"/>
|
||||
<location filename="../../src/content-widget.cpp" line="396"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished">Genel olarak kullanılan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="672"/>
|
||||
<location filename="../../src/content-widget.cpp" line="661"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished">Uygulamalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="674"/>
|
||||
<location filename="../../src/content-widget.cpp" line="663"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished">Ayarlar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="676"/>
|
||||
<location filename="../../src/content-widget.cpp" line="665"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished">Dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="678"/>
|
||||
<location filename="../../src/content-widget.cpp" line="667"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished">Dizinler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="680"/>
|
||||
<location filename="../../src/content-widget.cpp" line="669"/>
|
||||
<source>File Contents</source>
|
||||
<translation type="unfinished">Dosya İçeriği</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="682"/>
|
||||
<location filename="../../src/content-widget.cpp" line="671"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished">En İyi Eşleşen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="684"/>
|
||||
<location filename="../../src/content-widget.cpp" line="673"/>
|
||||
<source>Web Pages</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="686"/>
|
||||
<location filename="../../src/content-widget.cpp" line="675"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Bilinmeyen</translation>
|
||||
</message>
|
||||
|
@ -305,32 +305,32 @@
|
|||
<context>
|
||||
<name>Zeeker::CreateIndexAskDialog</name>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="27"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="28"/>
|
||||
<source>ukui-search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="53"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="49"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">Ara</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="78"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="74"/>
|
||||
<source>Creating index can help you getting results quickly, whether to create or not?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="89"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="83"/>
|
||||
<source>Don't remind</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="100"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="94"/>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="102"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="96"/>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -346,17 +346,17 @@
|
|||
<context>
|
||||
<name>Zeeker::MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="68"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="66"/>
|
||||
<source>ukui-search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="123"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="120"/>
|
||||
<source>Global Search</source>
|
||||
<translation type="unfinished">Genel Arama</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="205"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="197"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">Ara</translation>
|
||||
</message>
|
||||
|
@ -405,32 +405,32 @@
|
|||
<context>
|
||||
<name>Zeeker::SearchDetailView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="209"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="211"/>
|
||||
<source>Introduction: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="224"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="230"/>
|
||||
<source>Application</source>
|
||||
<translation type="unfinished">Uygulama</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="358"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="365"/>
|
||||
<source>Document</source>
|
||||
<translation type="unfinished">Belge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="478"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="486"/>
|
||||
<source>Preview is not avaliable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="528"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="536"/>
|
||||
<source>Path</source>
|
||||
<translation type="unfinished">Yol</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="536"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="544"/>
|
||||
<source>Last time modified</source>
|
||||
<translation type="unfinished">Son değiştirilme zamanı</translation>
|
||||
</message>
|
||||
|
@ -443,155 +443,155 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="80"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="300"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="532"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="74"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="289"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="519"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">Ara</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="109"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="103"/>
|
||||
<source><h2>Settings</h2></source>
|
||||
<translation type="unfinished"><h2>Ayarlar</h2></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="114"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="108"/>
|
||||
<source><h3>Index State</h3></source>
|
||||
<translation type="unfinished"><h3>Dizin Durumu</h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="116"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="118"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="110"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="112"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished">...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="126"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<source><h3>File Index Settings</h3></source>
|
||||
<translation type="unfinished"><h3>Dosya Dizini Ayarları</h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="128"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="122"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation type="unfinished">Aşağıdaki klasörler aranmayacaktır. Klasör ekleyip kaldırarak ayarlayabilirsiniz.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="131"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished">Göz ardı edilen klasörleri ekleyin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="158"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="152"/>
|
||||
<source><h3>Search Engine Settings</h3></source>
|
||||
<translation type="unfinished"><h3>SArama Motoru Ayarları</h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="154"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation type="unfinished">Lütfen tercih ettiğiniz arama motorunu seçin.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="173"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="167"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="175"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="169"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="177"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="171"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="300"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="289"/>
|
||||
<source>Whether to delete this directory?</source>
|
||||
<translation type="unfinished">Bu dizini silinsin mi?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="301"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="290"/>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="302"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="291"/>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="360"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="349"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished">Oluşturuluyor...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="363"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="352"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished">Tamam</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="371"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="360"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished">Dizin Girişi: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="417"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="404"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished">Dizinler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="418"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="405"/>
|
||||
<source>select blocked folder</source>
|
||||
<translation type="unfinished">engellenen klasörü seç</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="419"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="406"/>
|
||||
<source>Select</source>
|
||||
<translation type="unfinished">Seç</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="420"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="407"/>
|
||||
<source>Position: </source>
|
||||
<translation type="unfinished">Pozisyon: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="421"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="408"/>
|
||||
<source>FileName: </source>
|
||||
<translation type="unfinished">Dosya Adı: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="422"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="409"/>
|
||||
<source>FileType: </source>
|
||||
<translation type="unfinished">Dosya Türü: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="423"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="410"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">İptal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="516"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="503"/>
|
||||
<source>Choosen path is Empty!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="520"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="507"/>
|
||||
<source>Choosen path is not in "home"!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="524"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="511"/>
|
||||
<source>Its' parent folder has been blocked!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="528"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="515"/>
|
||||
<source>Set blocked folder failed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="533"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="520"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../src/main.cpp" line="206"/>
|
||||
<location filename="../../src/main.cpp" line="195"/>
|
||||
<source>ukui-search is already running!</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
@ -12,57 +12,57 @@
|
|||
<context>
|
||||
<name>Zeeker::ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="370"/>
|
||||
<location filename="../../src/content-widget.cpp" line="359"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation>最近</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="406"/>
|
||||
<location filename="../../src/content-widget.cpp" line="395"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation>快速入口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="407"/>
|
||||
<location filename="../../src/content-widget.cpp" line="396"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation>常用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="672"/>
|
||||
<location filename="../../src/content-widget.cpp" line="661"/>
|
||||
<source>Apps</source>
|
||||
<translation>应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="674"/>
|
||||
<location filename="../../src/content-widget.cpp" line="663"/>
|
||||
<source>Settings</source>
|
||||
<translation>配置项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="676"/>
|
||||
<location filename="../../src/content-widget.cpp" line="665"/>
|
||||
<source>Files</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="678"/>
|
||||
<location filename="../../src/content-widget.cpp" line="667"/>
|
||||
<source>Dirs</source>
|
||||
<translation>文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="680"/>
|
||||
<location filename="../../src/content-widget.cpp" line="669"/>
|
||||
<source>File Contents</source>
|
||||
<translation>文件内容</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="682"/>
|
||||
<location filename="../../src/content-widget.cpp" line="671"/>
|
||||
<source>Best Matches</source>
|
||||
<translation>最佳匹配</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="684"/>
|
||||
<location filename="../../src/content-widget.cpp" line="673"/>
|
||||
<source>Web Pages</source>
|
||||
<translation>网页</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="686"/>
|
||||
<location filename="../../src/content-widget.cpp" line="675"/>
|
||||
<source>Unknown</source>
|
||||
<translation>未知</translation>
|
||||
</message>
|
||||
|
@ -70,32 +70,32 @@
|
|||
<context>
|
||||
<name>Zeeker::CreateIndexAskDialog</name>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="27"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="28"/>
|
||||
<source>ukui-search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="53"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="49"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="78"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="74"/>
|
||||
<source>Creating index can help you getting results quickly, whether to create or not?</source>
|
||||
<translation>创建索引可以快速获取搜索结果,是否创建?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="89"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="83"/>
|
||||
<source>Don't remind</source>
|
||||
<translation>不再提醒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="100"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="94"/>
|
||||
<source>No</source>
|
||||
<translation>否(N)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="102"/>
|
||||
<location filename="../../src/create-index-ask-dialog.cpp" line="96"/>
|
||||
<source>Yes</source>
|
||||
<translation>是(Y)</translation>
|
||||
</message>
|
||||
|
@ -111,17 +111,17 @@
|
|||
<context>
|
||||
<name>Zeeker::MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="68"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="66"/>
|
||||
<source>ukui-search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="123"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="120"/>
|
||||
<source>Global Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="205"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="197"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
|
@ -170,32 +170,32 @@
|
|||
<context>
|
||||
<name>Zeeker::SearchDetailView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="209"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="211"/>
|
||||
<source>Introduction: %1</source>
|
||||
<translation>软件介绍: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="224"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="230"/>
|
||||
<source>Application</source>
|
||||
<translation>应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="358"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="365"/>
|
||||
<source>Document</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="478"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="486"/>
|
||||
<source>Preview is not avaliable</source>
|
||||
<translation>当前预览不可用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="528"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="536"/>
|
||||
<source>Path</source>
|
||||
<translation>路径</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="536"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="544"/>
|
||||
<source>Last time modified</source>
|
||||
<translation>上次修改时间</translation>
|
||||
</message>
|
||||
|
@ -208,155 +208,155 @@
|
|||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="80"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="300"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="532"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="74"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="289"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="519"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="109"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="103"/>
|
||||
<source><h2>Settings</h2></source>
|
||||
<translation><h2>设置</h2></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="114"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="108"/>
|
||||
<source><h3>Index State</h3></source>
|
||||
<translation><h3>索引状态</h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="116"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="118"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="110"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="112"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="126"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<source><h3>File Index Settings</h3></source>
|
||||
<translation><h3>文件索引设置</h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="128"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="122"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation>搜索将不再查看以下文件夹。通过增加和删除文件夹可进行文件索引设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="131"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation>添加文件夹至黑名单</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="158"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="152"/>
|
||||
<source><h3>Search Engine Settings</h3></source>
|
||||
<translation><h3>搜索引擎设置</h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="154"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation>设置互联网搜索引擎</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="173"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="167"/>
|
||||
<source>baidu</source>
|
||||
<translation>百度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="175"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="169"/>
|
||||
<source>sougou</source>
|
||||
<translation>搜狗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="177"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="171"/>
|
||||
<source>360</source>
|
||||
<translation>360</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="300"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="289"/>
|
||||
<source>Whether to delete this directory?</source>
|
||||
<translation>是否要删除此目录</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="301"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="290"/>
|
||||
<source>Yes</source>
|
||||
<translation>是(Y)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="302"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="291"/>
|
||||
<source>No</source>
|
||||
<translation>否(N)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="360"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="349"/>
|
||||
<source>Creating ...</source>
|
||||
<translation>正在索引</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="363"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="352"/>
|
||||
<source>Done</source>
|
||||
<translation>索引完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="371"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="360"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation>索引项: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="417"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="404"/>
|
||||
<source>Directories</source>
|
||||
<translation>文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="418"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="405"/>
|
||||
<source>select blocked folder</source>
|
||||
<translation>选择屏蔽文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="419"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="406"/>
|
||||
<source>Select</source>
|
||||
<translation>选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="420"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="407"/>
|
||||
<source>Position: </source>
|
||||
<translation>位置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="421"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="408"/>
|
||||
<source>FileName: </source>
|
||||
<translation>名称:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="422"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="409"/>
|
||||
<source>FileType: </source>
|
||||
<translation>类型:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="423"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="410"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="516"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="503"/>
|
||||
<source>Choosen path is Empty!</source>
|
||||
<translation>选择的路径不存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="520"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="507"/>
|
||||
<source>Choosen path is not in "home"!</source>
|
||||
<translation>请选择家目录下的文件夹!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="524"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="511"/>
|
||||
<source>Its' parent folder has been blocked!</source>
|
||||
<translation>父文件夹已被屏蔽!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="528"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="515"/>
|
||||
<source>Set blocked folder failed!</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="533"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="520"/>
|
||||
<source>OK</source>
|
||||
<translation>好的</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue