Revert "Merge branch '0715-v4-dev' into 'main'"

This reverts merge request !61
This commit is contained in:
PengfeiZhang 2021-07-19 05:34:13 +00:00
parent adda953f12
commit d62580360f
44 changed files with 489 additions and 931 deletions

2
.gitignore vendored
View File

@ -14,7 +14,7 @@
*.so.* *.so.*
*_pch.h.cpp *_pch.h.cpp
*_resource.rc *_resource.rc
#*.qm *.qm
.#* .#*
*.*# *.*#
core core

View File

@ -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>

View File

@ -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>

View File

@ -8,4 +8,8 @@ Comment[zh_CN]=全局搜索
Exec=/usr/bin/ukui-search -s Exec=/usr/bin/ukui-search -s
Type=Application Type=Application
Icon=kylin-search Icon=kylin-search
X-UKUI-AutoRestart=true
NoDisplay=true
OnlyShowIn=UKUI
X-UKUI-Autostart-Phase=Application
Terminal=false Terminal=false

View File

@ -8,6 +8,7 @@ Comment[zh_CN]=全局搜索
Exec=/usr/bin/ukui-search %U Exec=/usr/bin/ukui-search %U
Type=Application Type=Application
Icon=kylin-search Icon=kylin-search
OnlyShowIn=MATE; X-UKUI-AutoRestart=true
X-MATE-Autostart-Phase=Application OnlyShowIn=UKUI
X-MATE-AutoRestart=true X-UKUI-Autostart-Phase=Application
Terminal=false

14
debian/control vendored
View File

@ -11,12 +11,14 @@ Build-Depends: debhelper (>=9.0.0),
qtscript5-dev, qtscript5-dev,
qttools5-dev-tools, qttools5-dev-tools,
libxapian-dev, libxapian-dev,
libquazip5-dev, libquazip5-dev(>=0.7.6-6build1),
libglib2.0-dev, libglib2.0-dev,
libkf5windowsystem-dev,
libgsettings-qt-dev, libgsettings-qt-dev,
libqt5x11extras5-dev, libqt5x11extras5-dev,
libuchardet-dev, libuchardet-dev,
libpoppler-qt5-dev libpoppler-qt5-dev,
libukui-log4qt-dev
Standards-Version: 4.5.0 Standards-Version: 4.5.0
Homepage: https://www.ukui.org/ Homepage: https://www.ukui.org/
Vcs-Git: https://github.com/ukui/ukui-search.git 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 This package contains a few runtime libraries needed by
libsearch. 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 Package: libukui-search0
Section: libs Section: libs
Architecture: any Architecture: any

View File

@ -1,3 +1,5 @@
usr/bin/ukui-search usr/bin/ukui-search
etc/xdg/autostart/*.desktop etc/xdg/autostart/*.desktop
usr/share/applications/*.desktop usr/share/applications/*.desktop
src/.qm/*.qm usr/share/ukui-search/translations
usr/share/glib-2.0/schemas/*.xml

View File

@ -39,7 +39,7 @@ struct SKeyWord {
~SKeyWord() { ~SKeyWord() {
word = std::move(""); word = std::move("");
offsets.clear(); offsets.clear();
// offsets.shrink_to_fit(); offsets.shrink_to_fit();
} }
}; };

View File

@ -16,6 +16,6 @@ HEADERS += \
$$PWD/SegmentBase.hpp \ $$PWD/SegmentBase.hpp \
$$PWD/SegmentTagged.hpp \ $$PWD/SegmentTagged.hpp \
$$PWD/TextRankExtractor.hpp \ $$PWD/TextRankExtractor.hpp \
# $$PWD/Trie.hpp \ $$PWD/Trie.hpp \
$$PWD/Unicode.hpp $$PWD/Unicode.hpp
include(limonp/limonp.pri) include(limonp/limonp.pri)

View File

@ -40,11 +40,12 @@ unix {
target.path = $$[QT_INSTALL_LIBS] target.path = $$[QT_INSTALL_LIBS]
} }
!isEmpty(target.path): INSTALLS += target !isEmpty(target.path): INSTALLS += target
header.path = /usr/include/chinese-seg/
header.files = *.h header.path = /usr/include/chinese-seg/
header_cppjieba.path = /usr/include/chinese-seg/cppjieba/ header.files += *.h
header_cppjieba.files = cppjieba/* headercppjieba.path = /usr/include/chinese-seg/cppjieba/
INSTALLS += header header_cppjieba headercppjieba.files = cppjieba/*
INSTALLS += header headercppjieba
#DISTFILES += \ #DISTFILES += \
# jiaba/jieba.pri # jiaba/jieba.pri

View File

@ -26,8 +26,7 @@ using namespace Zeeker;
size_t FileUtils::_max_index_count = 0; size_t FileUtils::_max_index_count = 0;
size_t FileUtils::_current_index_count = 0; size_t FileUtils::_current_index_count = 0;
unsigned short FileUtils::_index_status = 0; unsigned short FileUtils::_index_status = 0;
//FileUtils::SearchMethod FileUtils::searchMethod = FileUtils::SearchMethod::DIRECTSEARCH; FileUtils::SearchMethod FileUtils::searchMethod = FileUtils::SearchMethod::DIRECTSEARCH;
FileUtils::SearchMethod FileUtils::searchMethod = FileUtils::SearchMethod::INDEXSEARCH;
QMap<QString, QStringList> FileUtils::map_chinese2pinyin = QMap<QString, QStringList>(); QMap<QString, QStringList> FileUtils::map_chinese2pinyin = QMap<QString, QStringList>();
FileUtils::FileUtils() { FileUtils::FileUtils() {
@ -181,9 +180,9 @@ QString FileUtils::getSettingName(const QString& setting) {
bool FileUtils::isOrUnder(QString pathA, QString pathB) bool FileUtils::isOrUnder(QString pathA, QString pathB)
{ {
if(!pathA.startsWith("/")) if(pathA[0] != "/")
pathA.prepend("/"); pathA.prepend("/");
if(!pathB.startsWith("/")) if(pathB[0] != "/")
pathB.prepend("/"); pathB.prepend("/");
if(pathA.length() < pathB.length()) if(pathA.length() < pathB.length())

View File

@ -37,14 +37,14 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent) {
// m_settings->setAtomicSyncRequired(false); // m_settings->setAtomicSyncRequired(false);
m_block_dirs_settings = new QSettings(BLOCK_DIRS, QSettings::IniFormat, this); m_block_dirs_settings = new QSettings(BLOCK_DIRS, QSettings::IniFormat, this);
m_block_dirs_settings->setIniCodec(QTextCodec::codecForName("UTF-8")); 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->setValue("These_are_block_dirs_conf_for_ukui_search","0");
// m_block_dirs_settings->sync(); m_block_dirs_settings->sync();
// m_confWatcher = new QFileSystemWatcher(this); m_confWatcher = new QFileSystemWatcher(this);
// m_confWatcher->addPath(BLOCK_DIRS); m_confWatcher->addPath(BLOCK_DIRS);
// connect(m_confWatcher, &QFileSystemWatcher::fileChanged, this, [ & ]() { connect(m_confWatcher, &QFileSystemWatcher::fileChanged, this, [ & ]() {
// m_block_dirs_settings->sync(); m_block_dirs_settings->sync();
// m_confWatcher->addPath(BLOCK_DIRS); m_confWatcher->addPath(BLOCK_DIRS);
// }); });
m_search_record_settings = new QSettings(SEARCH_HISTORY, QSettings::IniFormat, this); m_search_record_settings = new QSettings(SEARCH_HISTORY, QSettings::IniFormat, this);
m_search_record_settings->setIniCodec(QTextCodec::codecForName("UTF-8")); m_search_record_settings->setIniCodec(QTextCodec::codecForName("UTF-8"));
@ -60,10 +60,9 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent) {
qWarning() << "Kylinssoclient Dbus connect fail!"; qWarning() << "Kylinssoclient Dbus connect fail!";
this->forceSync(); this->forceSync();
m_cache.insert(FONT_SIZE_KEY, 11);
//the default number of transparency in mainwindow is 0.7 //the default number of transparency in mainwindow is 0.7
//if someone changes the num in mainwindow, here should be modified too //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)) { if(QGSettings::isSchemaInstalled(CONTROL_CENTER_PERSONALISE_GSETTINGS_ID)) {
m_trans_gsettings = new QGSettings(CONTROL_CENTER_PERSONALISE_GSETTINGS_ID, QByteArray(), this); m_trans_gsettings = new QGSettings(CONTROL_CENTER_PERSONALISE_GSETTINGS_ID, QByteArray(), this);
connect(m_trans_gsettings, &QGSettings::changed, this, [ = ](const QString & key) { connect(m_trans_gsettings, &QGSettings::changed, this, [ = ](const QString & key) {

View File

@ -51,13 +51,9 @@
#define PATH_NOT_IN_HOME 2; #define PATH_NOT_IN_HOME 2;
#define PATH_PARENT_BLOCKED 3; #define PATH_PARENT_BLOCKED 3;
//#define MAIN_SETTINGS QDir::homePath() + "/.config/org.ukui/ukui-search/ukui-search.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 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 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 CLOUD_HISTORY "history" //#define CLOUD_HISTORY "history"
//#define CLOUD_APPLICATIONS "applications" //#define CLOUD_APPLICATIONS "applications"

View File

@ -169,12 +169,7 @@ void FirstIndex::run() {
// QtConcurrent::run([&](){ // QtConcurrent::run([&](){
sem.acquire(1); sem.acquire(1);
mutex1.unlock(); mutex1.unlock();
QStringList pathList; this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
pathList.append("/media/用户保险箱");
pathList.append("/media/邮件保险箱");
pathList.append("/media/公共保险箱");
pathList.append("/media/备份保险箱");
this->setPath(pathList);
this->Traverse(); this->Traverse();
FileUtils::_max_index_count = this->q_index->length(); FileUtils::_max_index_count = this->q_index->length();
qDebug() << "max_index_count:" << FileUtils::_max_index_count; qDebug() << "max_index_count:" << FileUtils::_max_index_count;
@ -244,7 +239,7 @@ void FirstIndex::run() {
if(p_indexGenerator) if(p_indexGenerator)
delete p_indexGenerator; delete p_indexGenerator;
p_indexGenerator = nullptr; p_indexGenerator = nullptr;
// GlobalSettings::getInstance()->forceSync();
IndexStatusRecorder::getInstance()->setStatus(INDEX_DATABASE_STATE, "2"); IndexStatusRecorder::getInstance()->setStatus(INDEX_DATABASE_STATE, "2");
IndexStatusRecorder::getInstance()->setStatus(CONTENT_INDEX_DATABASE_STATE, "2"); IndexStatusRecorder::getInstance()->setStatus(CONTENT_INDEX_DATABASE_STATE, "2");
::_exit(0); ::_exit(0);

View File

@ -33,7 +33,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/wait.h> #include <sys/wait.h>
#include "assert.h"
#include <sys/prctl.h> #include <sys/prctl.h>
#include <syslog.h> #include <syslog.h>
//#include <QtConcurrent> //#include <QtConcurrent>

View File

@ -31,10 +31,8 @@
#include <QStandardPaths> #include <QStandardPaths>
#include <malloc.h> #include <malloc.h>
//#define INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/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 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"
using namespace Zeeker; using namespace Zeeker;

View File

@ -8,8 +8,8 @@
#define CONTENT_INDEX_DATABASE_STATE "content_index_database_state" #define CONTENT_INDEX_DATABASE_STATE "content_index_database_state"
#define INDEX_DATABASE_STATE "index_database_state" #define INDEX_DATABASE_STATE "index_database_state"
#define INOTIFY_NORMAL_EXIT "inotify_normal_exit" #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 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 { namespace Zeeker {
//fixme: we need a better way to record index status. //fixme: we need a better way to record index status.
class IndexStatusRecorder : public QObject class IndexStatusRecorder : public QObject

View File

@ -38,7 +38,7 @@
QFileInfo fi(tmp); \ QFileInfo fi(tmp); \
if(!fi.isSymLink()){ \ if(!fi.isSymLink()){ \
AddWatch(tmp); \ AddWatch(tmp); \
setPath(QStringList(tmp)); \ setPath(tmp); \
Traverse(); \ Traverse(); \
} }
@ -47,7 +47,7 @@
CREATE_FILE_NAME_INDEX \ CREATE_FILE_NAME_INDEX \
CREATE_FILE_CONTENT_INDEX CREATE_FILE_CONTENT_INDEX
using namespace Zeeker; using namespace Zeeker;
InotifyIndex::InotifyIndex(const QStringList &pathList) : Traverse_BFS(pathList) { InotifyIndex::InotifyIndex(const QString& path) : Traverse_BFS(path) {
qDebug() << "setInotifyMaxUserWatches start"; qDebug() << "setInotifyMaxUserWatches start";
UkuiSearchQDBus usQDBus; UkuiSearchQDBus usQDBus;
usQDBus.setInotifyMaxUserWatches(); usQDBus.setInotifyMaxUserWatches();
@ -62,21 +62,18 @@ InotifyIndex::~InotifyIndex() {
void InotifyIndex::firstTraverse() { void InotifyIndex::firstTraverse() {
QQueue<QString> bfs; QQueue<QString> bfs;
for(QString path : this->m_pathList) { bfs.enqueue(this->path);
this->AddWatch(path); QFileInfoList list;
bfs.enqueue(path); QDir dir;
QFileInfoList list; dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
QDir dir; dir.setSorting(QDir::DirsFirst);
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); while(!bfs.empty()) {
dir.setSorting(QDir::DirsFirst); dir.setPath(bfs.dequeue());
while(!bfs.empty()) { list = dir.entryInfoList();
dir.setPath(bfs.dequeue()); for(auto i : list) {
list = dir.entryInfoList(); if(i.isDir() && (!(i.isSymLink()))) {
for(auto i : list) { this->AddWatch(i.absoluteFilePath());
if(i.isDir() && (!(i.isSymLink()))) { bfs.enqueue(i.absoluteFilePath());
this->AddWatch(i.absoluteFilePath());
bfs.enqueue(i.absoluteFilePath());
}
} }
} }
} }
@ -252,8 +249,8 @@ void InotifyIndex::run() {
m_fd = inotify_init(); m_fd = inotify_init();
qDebug() << "m_fd----------->" << m_fd; qDebug() << "m_fd----------->" << m_fd;
// this->AddWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); this->AddWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
// this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->firstTraverse(); this->firstTraverse();
int fifo_fd; int fifo_fd;

View File

@ -41,13 +41,13 @@ static InotifyIndex* global_instance_of_index = nullptr;
class InotifyIndex : public QThread, public Traverse_BFS { class InotifyIndex : public QThread, public Traverse_BFS {
Q_OBJECT Q_OBJECT
public: public:
static InotifyIndex* getInstance(const QStringList &pathList) { static InotifyIndex* getInstance(const QString& path) {
if(!global_instance_of_index) { if(!global_instance_of_index) {
global_instance_of_index = new InotifyIndex(pathList); global_instance_of_index = new InotifyIndex(path);
} }
return global_instance_of_index; return global_instance_of_index;
} }
InotifyIndex(const QStringList &pathList); InotifyIndex(const QString&);
~InotifyIndex(); ~InotifyIndex();
bool AddWatch(const QString&); bool AddWatch(const QString&);

View File

@ -5,15 +5,15 @@
using namespace Zeeker; using namespace Zeeker;
static InotifyWatch* global_instance_InotifyWatch = nullptr; 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) { if(!global_instance_InotifyWatch) {
global_instance_InotifyWatch = new InotifyWatch(pathList); global_instance_InotifyWatch = new InotifyWatch(path);
} }
return global_instance_InotifyWatch; 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"; qDebug() << "setInotifyMaxUserWatches start";
UkuiSearchQDBus usQDBus; UkuiSearchQDBus usQDBus;
@ -98,21 +98,18 @@ void InotifyWatch::DoSomething(const QFileInfo &info)
void InotifyWatch::firstTraverse() void InotifyWatch::firstTraverse()
{ {
QQueue<QString> bfs; QQueue<QString> bfs;
for(QString path : this->m_pathList) { bfs.enqueue(this->path);
this->addWatch(path); QFileInfoList list;
bfs.enqueue(path); QDir dir;
QFileInfoList list; dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
QDir dir; dir.setSorting(QDir::DirsFirst);
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); while(!bfs.empty()) {
dir.setSorting(QDir::DirsFirst); dir.setPath(bfs.dequeue());
while(!bfs.empty()) { list = dir.entryInfoList();
dir.setPath(bfs.dequeue()); for(auto i : list) {
list = dir.entryInfoList(); if(i.isDir() && (!(i.isSymLink()))) {
for(auto i : list) { this->addWatch(i.absoluteFilePath());
if(i.isDir() && (!(i.isSymLink()))) { bfs.enqueue(i.absoluteFilePath());
this->addWatch(i.absoluteFilePath());
bfs.enqueue(i.absoluteFilePath());
}
} }
} }
} }
@ -150,8 +147,8 @@ void InotifyWatch::run()
} }
} }
// this->addWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); this->addWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
// this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->firstTraverse(); this->firstTraverse();
int fifo_fd; int fifo_fd;
@ -399,7 +396,7 @@ void InotifyWatch::eventProcess(const char *buffer, ssize_t len)
if(event->mask & IN_ISDIR) { if(event->mask & IN_ISDIR) {
if(!QFileInfo(path).isSymLink()){ if(!QFileInfo(path).isSymLink()){
addWatch(path); addWatch(path);
setPath(QStringList(path)); setPath(path);
Traverse(); Traverse();
} }
} }
@ -439,7 +436,7 @@ void InotifyWatch::eventProcess(const char *buffer, ssize_t len)
if(!QFileInfo(path).isSymLink()){ if(!QFileInfo(path).isSymLink()){
addWatch(path); addWatch(path);
setPath(QStringList(path)); setPath(path);
Traverse(); Traverse();
} }
} else { } else {

View File

@ -20,7 +20,7 @@ class InotifyWatch : public QThread, public Traverse_BFS
{ {
Q_OBJECT Q_OBJECT
public: public:
static InotifyWatch* getInstance(const QStringList &pathList); static InotifyWatch* getInstance(const QString& path);
bool addWatch(const QString &path); bool addWatch(const QString &path);
bool removeWatch(const QString &path, bool removeFromDatabase = true); bool removeWatch(const QString &path, bool removeFromDatabase = true);
@ -34,7 +34,7 @@ protected:
private Q_SLOTS: private Q_SLOTS:
void slotEvent(char *buf, ssize_t len); void slotEvent(char *buf, ssize_t len);
private: private:
explicit InotifyWatch(const QStringList &pathList); explicit InotifyWatch(const QString& path);
~InotifyWatch(); ~InotifyWatch();
char * filter(); char * filter();
void eventProcess(int socket); void eventProcess(int socket);

View File

@ -31,35 +31,7 @@ SearchManager::SearchManager(QObject *parent) : QObject(parent) {
m_pool.setExpiryTimeout(1000); m_pool.setExpiryTimeout(1000);
} }
void SearchManager::searchLocalFiles(std::string keyword, std::queue<SearchResultInfo> *searchResultFile, std::queue<SearchResultInfo> *searchResultDir, std::queue<SearchResultInfo> *searchResultContent) SearchManager::~SearchManager() {
{
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()
{
} }
int SearchManager::getCurrentIndexCount() { int SearchManager::getCurrentIndexCount() {
@ -416,363 +388,7 @@ int FileContentSearch::getResult(Xapian::MSet &result, std::string &keyWord) {
// // deleteAllIndex(pathTobeDelete) // // deleteAllIndex(pathTobeDelete)
return 0; 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) { DirectSearch::DirectSearch(QString keyword, QQueue<QString> *searchResultFile, QQueue<QString> *searchResultDir, size_t uniqueSymbol) {
this->setAutoDelete(true); this->setAutoDelete(true);
m_keyword = keyword; m_keyword = keyword;

View File

@ -36,41 +36,23 @@
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
#include <QThread> #include <QThread>
#include <QUrl> #include <QUrl>
#include <list>
#include <queue>
#include "file-utils.h" #include "file-utils.h"
#include "global-settings.h" #include "global-settings.h"
#include "chinese-segmentation.h" #include "chinese-segmentation.h"
//#define INDEX_PATH (QStandardPaths::writableLocation(QStandardPaths::HomeLocation)+"/.config/org.ukui/ukui-search/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 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 { 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 { class LIBSEARCH_EXPORT SearchManager : public QObject {
friend class FileSearch; friend class FileSearch;
friend class FileContentSearch; friend class FileContentSearch;
friend class FileSearchV4;
friend class FileContentSearchV4;
Q_OBJECT Q_OBJECT
public: public:
explicit SearchManager(QObject *parent = nullptr); explicit SearchManager(QObject *parent = nullptr);
void searchLocalFiles(std::string keyword,
std::queue<SearchResultInfo> *searchResultFile,
std::queue<SearchResultInfo> *searchResultDir,
std::queue<SearchResultInfo> *searchResultContent);
~SearchManager(); ~SearchManager();
static int getCurrentIndexCount(); static int getCurrentIndexCount();
@ -78,7 +60,6 @@ public:
static size_t uniqueSymbol1; static size_t uniqueSymbol1;
static size_t uniqueSymbol2; static size_t uniqueSymbol2;
static size_t uniqueSymbol3; static size_t uniqueSymbol3;
static QMutex m_mutex1; static QMutex m_mutex1;
static QMutex m_mutex2; static QMutex m_mutex2;
static QMutex m_mutex3; static QMutex m_mutex3;
@ -152,44 +133,6 @@ private:
int m_num = 20; 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 { class DirectSearch : public QRunnable {
public: public:
explicit DirectSearch(QString keyword, QQueue<QString> *searchResultFile, QQueue<QString> *searchResultDir, size_t uniqueSymbol); explicit DirectSearch(QString keyword, QQueue<QString> *searchResultFile, QQueue<QString> *searchResultDir, size_t uniqueSymbol);

View File

@ -2,12 +2,7 @@
using namespace Zeeker; using namespace Zeeker;
SearchMethodManager::SearchMethodManager() SearchMethodManager::SearchMethodManager()
{ {
QStringList pathList; m_iw = InotifyWatch::getInstance(HOME_PATH);
pathList.append("/media/用户保险箱");
pathList.append("/media/邮件保险箱");
pathList.append("/media/公共保险箱");
pathList.append("/media/备份保险箱");
m_iw = InotifyWatch::getInstance(pathList);
} }
void SearchMethodManager::searchMethod(FileUtils::SearchMethod sm) { void SearchMethodManager::searchMethod(FileUtils::SearchMethod sm) {

View File

@ -19,36 +19,31 @@
*/ */
#include "traverse_bfs.h" #include "traverse_bfs.h"
using namespace Zeeker; using namespace Zeeker;
Traverse_BFS::Traverse_BFS(const QStringList& pathList) { Traverse_BFS::Traverse_BFS(const QString& path) {
for(QString path : pathList) { Q_ASSERT('/' == path.at(0));
Q_ASSERT('/' == path.at(0)); this->path = path;
}
this->m_pathList = pathList;
} }
void Traverse_BFS::Traverse() { void Traverse_BFS::Traverse() {
QQueue<QString> bfs; QQueue<QString> bfs;
for(QString path : m_pathList) { bfs.enqueue(this->path);
bfs.enqueue(path); QFileInfoList list;
QFileInfoList list; QDir dir;
QDir dir; // QDir::Hidden
// QDir::Hidden dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); dir.setSorting(QDir::DirsFirst);
dir.setSorting(QDir::DirsFirst); while(!bfs.empty()) {
while(!bfs.empty()) { dir.setPath(bfs.dequeue());
dir.setPath(bfs.dequeue()); list = dir.entryInfoList();
list = dir.entryInfoList(); for(auto i : list) {
for(auto i : list) { if(i.isDir() && (!(i.isSymLink()))) {
if(i.isDir() && (!(i.isSymLink()))) { bfs.enqueue(i.absoluteFilePath());
bfs.enqueue(i.absoluteFilePath());
}
DoSomething(i);
} }
DoSomething(i);
} }
} }
} }
void Traverse_BFS::setPath(const QStringList &pathList) { void Traverse_BFS::setPath(const QString& path) {
this->m_pathList = pathList; this->path = path;
} }

View File

@ -31,10 +31,10 @@ public:
void Traverse(); void Traverse();
virtual ~Traverse_BFS() = default; virtual ~Traverse_BFS() = default;
virtual void DoSomething(const QFileInfo&) = 0; virtual void DoSomething(const QFileInfo&) = 0;
void setPath(const QStringList &pathList); void setPath(const QString&);
protected: protected:
Traverse_BFS(const QStringList &pathList); Traverse_BFS(const QString&);
QStringList m_pathList; QString path = "/home";
private: private:
Traverse_BFS(const Traverse_BFS&) = delete; Traverse_BFS(const Traverse_BFS&) = delete;
void operator=(const Traverse_BFS&) = delete; void operator=(const Traverse_BFS&) = delete;

View File

@ -43,5 +43,4 @@ namespace Zeeker {
//}; //};
} }
#endif // LIBSEARCH_H #endif // LIBSEARCH_H

View File

@ -71,6 +71,7 @@ unix {
INSTALLS += header INSTALLS += header
} }
INCLUDEPATH += $$PWD/../libchinese-segmentation INCLUDEPATH += $$PWD/../libchinese-segmentation
DEPENDPATH += $$PWD/../libchinese-segmentation DEPENDPATH += $$PWD/../libchinese-segmentation

View File

@ -62,8 +62,8 @@ void ContentWidget::initUI() {
QPalette pal = palette(); QPalette pal = palette();
QPalette scroll_bar_pal = palette(); QPalette scroll_bar_pal = palette();
// pal.setColor(QPalette::Base, QColor(0, 0, 0, 0)); // pal.setColor(QPalette::Base, QColor(0, 0, 0, 0));
// pal.setColor(QPalette::Window, QColor(0, 0, 0, 0)); //使用此palette的窗口背景将为透明 pal.setColor(QPalette::Window, QColor(0, 0, 0, 0)); //使用此palette的窗口背景将为透明
// scroll_bar_pal.setColor(QPalette::Base, QColor(0, 0, 0, 0)); scroll_bar_pal.setColor(QPalette::Base, QColor(0, 0, 0, 0));
m_homePage = new QWidget(this); m_homePage = new QWidget(this);
m_homePageLyt = new QVBoxLayout(m_homePage); m_homePageLyt = new QVBoxLayout(m_homePage);
m_homePageLyt->setSpacing(0); m_homePageLyt->setSpacing(0);
@ -108,8 +108,8 @@ void ContentWidget::initUI() {
m_resultDetailArea->setFrameShape(QFrame::NoFrame); m_resultDetailArea->setFrameShape(QFrame::NoFrame);
m_resultListArea->setPalette(pal); m_resultListArea->setPalette(pal);
m_resultDetailArea->setPalette(pal); m_resultDetailArea->setPalette(pal);
// m_resultListArea->verticalScrollBar()->setPalette(scroll_bar_pal); m_resultListArea->verticalScrollBar()->setPalette(scroll_bar_pal);
// m_resultDetailArea->verticalScrollBar()->setPalette(scroll_bar_pal); m_resultDetailArea->verticalScrollBar()->setPalette(scroll_bar_pal);
this->addWidget(m_homePage); this->addWidget(m_homePage);
this->addWidget(m_resultPage); this->addWidget(m_resultPage);

View File

@ -25,7 +25,7 @@
#include <QDebug> #include <QDebug>
#include <QFileInfo> #include <QFileInfo>
#include <QDir> #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 { namespace Zeeker {
class ConfigFile : public QObject { class ConfigFile : public QObject {
Q_OBJECT Q_OBJECT

View File

@ -94,8 +94,6 @@ void SearchListView::setList(QStringList list) {
this->blockSignals(false); this->blockSignals(false);
} }
rowheight = this->rowHeight(this->model()->index(0, 0, QModelIndex())); 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); this->setFixedHeight(m_item->getCurrentSize() * rowheight + 4);
} }
@ -136,7 +134,6 @@ void SearchListView::refresh()
* @brief SearchListView::setKeyword * @brief SearchListView::setKeyword
* @param keyword * @param keyword
*/ */
void SearchListView::setKeyword(QString keyword) { void SearchListView::setKeyword(QString keyword) {
m_styleDelegate->setSearchKeyword(keyword); m_styleDelegate->setSearchKeyword(keyword);
} }

View File

@ -206,8 +206,7 @@ bool SearchBarHLayout::eventFilter(QObject *watched, QEvent *event) {
*/ */
SearchLineEdit::SearchLineEdit(QWidget *parent) : QLineEdit(parent) { SearchLineEdit::SearchLineEdit(QWidget *parent) : QLineEdit(parent) {
this->setFocusPolicy(Qt::ClickFocus); this->setFocusPolicy(Qt::ClickFocus);
this->setAttribute(Qt::WA_InputMethodEnabled); this->installEventFilter(this);
// this->installEventFilter(this);
// this->setContextMenuPolicy(Qt::NoContextMenu); // this->setContextMenuPolicy(Qt::NoContextMenu);
this->setMaxLength(100); this->setMaxLength(100);

View File

@ -174,19 +174,6 @@ int main(int argc, char *argv[]) {
syslog(LOG_ERR, "Home is not exits!!\n"); syslog(LOG_ERR, "Home is not exits!!\n");
::sleep(1); ::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 // Output log to file
qInstallMessageHandler(messageOutput); qInstallMessageHandler(messageOutput);
@ -276,8 +263,7 @@ int main(int argc, char *argv[]) {
// Load translations // Load translations
QTranslator translator; QTranslator translator;
try { try {
// if (! translator.load("/usr/share/ukui-search/translations/" + QLocale::system().name())) throw -1; if(! translator.load("/usr/share/ukui-search/translations/" + QLocale::system().name())) throw - 1;
if (! translator.load(":/res/translations/zh_CN.qm")) throw -1;
app.installTranslator(&translator); app.installTranslator(&translator);
} catch(...) { } catch(...) {
qDebug() << "Load translations file" << QLocale() << "failed!"; 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) { if(QString::compare(QString("-s"), QString(QLatin1String(argv[1]))) == 0) {
// w->moveToPanel(); // w->moveToPanel();
centerToScreen(w); centerToScreen(w);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
XAtomHelper::getInstance()->setWindowMotifHint(w->winId(), w->m_hints); XAtomHelper::getInstance()->setWindowMotifHint(w->winId(), w->m_hints);
#endif #endif
w->show(); w->show();
} }

View File

@ -29,11 +29,11 @@
#include <QPalette> #include <QPalette>
#include <QScreen> #include <QScreen>
#include <QStyleOption> #include <QStyleOption>
//#include <KWindowEffects>
#include <QPixmap> #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 "qt-single-application.h"
//#include "inotify-manager.h" //#include "inotify-manager.h"
@ -75,7 +75,7 @@ MainWindow::MainWindow(QWidget *parent) :
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
this->setWindowTitle(tr("ukui-search")); this->setWindowTitle(tr("ukui-search"));
initUi(); initUi();
// initTimer(); initTimer();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
// setProperty("useStyleWindowManager", false); //禁止拖动 // setProperty("useStyleWindowManager", false); //禁止拖动
@ -92,15 +92,6 @@ MainWindow::MainWindow(QWidget *parent) :
setProperty("blurRegion", QRegion(path.toFillPolygon().toPolygon())); setProperty("blurRegion", QRegion(path.toFillPolygon().toPolygon()));
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon()));
#endif #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_file = new QQueue<QString>;
m_search_result_dir = 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) { QObject::connect(this, &MainWindow::searchMethodChanged, this, [ = ](FileUtils::SearchMethod sm) {
// this->m_searchMethodManager.searchMethod(sm); this->m_searchMethodManager.searchMethod(sm);
// }); });
this->m_searchMethodManager.searchMethod(FileUtils::SearchMethod::INDEXSEARCH);
} }
@ -168,14 +158,14 @@ MainWindow::~MainWindow() {
m_settingsWidget = NULL; m_settingsWidget = NULL;
} }
#endif #endif
// if(m_askDialog) { if(m_askDialog) {
// delete m_askDialog; delete m_askDialog;
// m_askDialog = NULL; m_askDialog = NULL;
// } }
// if(m_askTimer) { if(m_askTimer) {
// delete m_askTimer; delete m_askTimer;
// m_askTimer = NULL; m_askTimer = NULL;
// } }
if(m_search_gsettings) { if(m_search_gsettings) {
delete m_search_gsettings; delete m_search_gsettings;
m_search_gsettings = NULL; m_search_gsettings = NULL;
@ -283,17 +273,14 @@ void MainWindow::initUi() {
} }
// m_seach_app_thread->stop(); // m_seach_app_thread->stop();
m_contentFrame->setCurrentIndex(0); m_contentFrame->setCurrentIndex(0);
// m_askTimer->stop(); m_askTimer->stop();
} else { } else {
m_contentFrame->setCurrentIndex(1); m_contentFrame->setCurrentIndex(1);
QTimer::singleShot(10, this, [ = ]() { QTimer::singleShot(10, this, [ = ]() {
startSearch(text); 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 //初始化homepage
@ -301,34 +288,34 @@ void MainWindow::initUi() {
m_contentFrame->initHomePage(); m_contentFrame->initHomePage();
//创建索引询问弹窗 //创建索引询问弹窗
// m_askDialog = new CreateIndexAskDialog(this); m_askDialog = new CreateIndexAskDialog(this);
//#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
// MotifWmHints ask_dialog_hints; MotifWmHints ask_dialog_hints;
// ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
// ask_dialog_hints.functions = MWM_FUNC_ALL; ask_dialog_hints.functions = MWM_FUNC_ALL;
// ask_dialog_hints.decorations = MWM_DECOR_BORDER; ask_dialog_hints.decorations = MWM_DECOR_BORDER;
// XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints); XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints);
//#endif #endif
// connect(m_askDialog, &CreateIndexAskDialog::closed, this, [ = ]() { connect(m_askDialog, &CreateIndexAskDialog::closed, this, [ = ]() {
// m_isAskDialogVisible = false; m_isAskDialogVisible = false;
// }); });
// connect(m_askDialog, &CreateIndexAskDialog::btnClicked, this, [ = ](const bool & create_index, const bool & no_longer_ask) { connect(m_askDialog, &CreateIndexAskDialog::btnClicked, this, [ = ](const bool & create_index, const bool & no_longer_ask) {
// if(no_longer_ask) { if(no_longer_ask) {
// GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "false"); GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "false");
// } else { } else {
// GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "true"); GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "true");
// } }
// if(create_index) { if(create_index) {
// if(m_search_gsettings && m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) { if(m_search_gsettings && m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
// m_search_gsettings->set(SEARCH_METHOD_KEY, true); m_search_gsettings->set(SEARCH_METHOD_KEY, true);
// } else { } else {
// //调用创建索引接口 //调用创建索引接口
// Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH); Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
// //创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索) //创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
// m_researchTimer->start(); m_researchTimer->start();
// } }
// } }
// }); });
installEventFilter(this); installEventFilter(this);
} }
@ -399,9 +386,9 @@ void MainWindow::startSearch(QString keyword) {
if(! m_search_result_thread->isRunning()) { if(! m_search_result_thread->isRunning()) {
m_search_result_thread->start(); m_search_result_thread->start();
} }
// //允许弹窗且当前次搜索(为关闭主界面,算一次搜索过程)未询问且当前为暴力搜索 //允许弹窗且当前次搜索(为关闭主界面,算一次搜索过程)未询问且当前为暴力搜索
// if(GlobalSettings::getInstance()->getValue(ENABLE_CREATE_INDEX_ASK_DIALOG).toString() != "false" && !m_currentSearchAsked && FileUtils::searchMethod == FileUtils::SearchMethod::DIRECTSEARCH) if(GlobalSettings::getInstance()->getValue(ENABLE_CREATE_INDEX_ASK_DIALOG).toString() != "false" && !m_currentSearchAsked && FileUtils::searchMethod == FileUtils::SearchMethod::DIRECTSEARCH)
// m_askTimer->start(); m_askTimer->start();
m_contentFrame->setKeyword(keyword); m_contentFrame->setKeyword(keyword);
@ -499,28 +486,28 @@ void MainWindow::centerToScreen(QWidget* widget) {
} }
void MainWindow::initGsettings() { void MainWindow::initGsettings() {
// const QByteArray id(UKUI_SEARCH_SCHEMAS); const QByteArray id(UKUI_SEARCH_SCHEMAS);
// if(QGSettings::isSchemaInstalled(id)) { if(QGSettings::isSchemaInstalled(id)) {
// m_search_gsettings = new QGSettings(id); m_search_gsettings = new QGSettings(id);
// connect(m_search_gsettings, &QGSettings::changed, this, [ = ](const QString & key) { connect(m_search_gsettings, &QGSettings::changed, this, [ = ](const QString & key) {
// if(key == SEARCH_METHOD_KEY) { if(key == SEARCH_METHOD_KEY) {
// bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool(); bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
// this->setSearchMethod(is_index_search); this->setSearchMethod(is_index_search);
// } else if(key == WEB_ENGINE_KEY) { } else if(key == WEB_ENGINE_KEY) {
// QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString(); QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString();
// GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine); GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine);
// Q_EMIT this->webEngineChanged(); Q_EMIT this->webEngineChanged();
// } }
// }); });
// if(m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) { if(m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
// bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool(); bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
// this->setSearchMethod(is_index_search); this->setSearchMethod(is_index_search);
// } }
// if(m_search_gsettings->keys().contains(WEB_ENGINE_KEY)) { if(m_search_gsettings->keys().contains(WEB_ENGINE_KEY)) {
// QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString(); QString web_engine = m_search_gsettings->get(WEB_ENGINE_KEY).toString();
// GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine); GlobalSettings::getInstance()->setValue(WEB_ENGINE, web_engine);
// } }
// } }
} }
//使用GSetting获取当前窗口应该使用的透明度 //使用GSetting获取当前窗口应该使用的透明度
@ -528,26 +515,26 @@ double MainWindow::getTransparentData() {
return GlobalSettings::getInstance()->getValue(TRANSPARENCY_KEY).toDouble(); return GlobalSettings::getInstance()->getValue(TRANSPARENCY_KEY).toDouble();
} }
//void MainWindow::initTimer() { void MainWindow::initTimer() {
// m_askTimer = new QTimer; m_askTimer = new QTimer;
// m_askTimer->setInterval(5 * 1000); m_askTimer->setInterval(5 * 1000);
// connect(m_askTimer, &QTimer::timeout, this, [ = ]() { connect(m_askTimer, &QTimer::timeout, this, [ = ]() {
// if(this->isVisible()) { if(this->isVisible()) {
// m_isAskDialogVisible = true; m_isAskDialogVisible = true;
// m_askDialog->show(); m_askDialog->show();
// m_currentSearchAsked = true; m_currentSearchAsked = true;
// } }
// m_askTimer->stop(); m_askTimer->stop();
// }); });
// m_researchTimer = new QTimer; m_researchTimer = new QTimer;
// m_researchTimer->setInterval(10 * 1000); m_researchTimer->setInterval(10 * 1000);
// connect(m_researchTimer, &QTimer::timeout, this, [ = ]() { connect(m_researchTimer, &QTimer::timeout, this, [ = ]() {
// if(this->isVisible()) { if(this->isVisible()) {
// searchContent(m_searchLayout->text()); startSearch(m_searchLayout->text());
// } }
// m_researchTimer->stop(); m_researchTimer->stop();
// }); });
//} }
/** /**
* @brief MainWindow::tryHideMainwindow * @brief MainWindow::tryHideMainwindow
@ -556,13 +543,13 @@ bool MainWindow::tryHideMainwindow()
{ {
if (!m_isAskDialogVisible) { if (!m_isAskDialogVisible) {
qDebug()<<"Mainwindow will be hidden"; qDebug()<<"Mainwindow will be hidden";
// m_currentSearchAsked = false; m_currentSearchAsked = false;
this->hide(); this->hide();
// m_askTimer->stop(); m_askTimer->stop();
// m_researchTimer->stop(); m_researchTimer->stop();
m_contentFrame->closeWebView(); m_contentFrame->closeWebView();
m_search_result_thread->requestInterruption(); m_search_result_thread->requestInterruption();
// m_search_result_thread->quit(); m_search_result_thread->quit();
return true; return true;
} else { } else {
//有上层弹窗未关闭,不允许隐藏主界面 //有上层弹窗未关闭,不允许隐藏主界面
@ -575,17 +562,17 @@ bool MainWindow::tryHideMainwindow()
* @brief MainWindow::setSearchMethod * @brief MainWindow::setSearchMethod
* @param is_index_search true为索引搜索false为暴力搜索 * @param is_index_search true为索引搜索false为暴力搜索
*/ */
//void MainWindow::setSearchMethod(const bool &is_index_search) { void MainWindow::setSearchMethod(const bool &is_index_search) {
// if(is_index_search) { if(is_index_search) {
// //调用创建索引接口 //调用创建索引接口
// Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH); Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
// //创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索) //创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
// m_researchTimer->start(); m_researchTimer->start();
// } else { } else {
// Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::DIRECTSEARCH); Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::DIRECTSEARCH);
// m_researchTimer->stop(); m_researchTimer->stop();
// } }
//} }
/** /**
* @brief MainWindow::nativeEvent * @brief MainWindow::nativeEvent
@ -630,11 +617,11 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
bool MainWindow::eventFilter(QObject *watched, QEvent *event) bool MainWindow::eventFilter(QObject *watched, QEvent *event)
{ {
// if (event->type() == QEvent::ActivationChange) { if (event->type() == QEvent::ActivationChange) {
// if(QApplication::activeWindow() != this) { if(QApplication::activeWindow() != this) {
// tryHideMainwindow(); tryHideMainwindow();
// } }
// } }
return QMainWindow::eventFilter(watched,event); return QMainWindow::eventFilter(watched,event);
} }

View File

@ -44,16 +44,13 @@
#include <QKeyEvent> #include <QKeyEvent>
#include <QGSettings/QGSettings> #include <QGSettings/QGSettings>
#include <QSystemTrayIcon> #include <QSystemTrayIcon>
#include <QTimer> #include <QTimer>
#include "content-widget.h" #include "content-widget.h"
#include "input-box.h" #include "input-box.h"
#include "index/index-generator.h" #include "index/index-generator.h"
#include "libsearch.h" #include "libsearch.h"
#include "search-app-thread.h" #include "search-app-thread.h"
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
#include "xatom-helper.h" #include "xatom-helper.h"
#endif #endif
@ -66,7 +63,6 @@
#define SEARCH_METHOD_KEY "indexSearch" #define SEARCH_METHOD_KEY "indexSearch"
#define WEB_ENGINE_KEY "webEngine" #define WEB_ENGINE_KEY "webEngine"
namespace Zeeker { namespace Zeeker {
class SearchResult; class SearchResult;
class MainWindow : public QMainWindow { class MainWindow : public QMainWindow {
@ -94,7 +90,6 @@ public:
MotifWmHints m_hints; MotifWmHints m_hints;
#endif #endif
private: private:
// MainWindow quit when focus out. // MainWindow quit when focus out.
@ -124,7 +119,7 @@ private:
SearchManager* m_searcher = nullptr; SearchManager* m_searcher = nullptr;
SettingsMatch *m_settingsMatch = nullptr; SettingsMatch *m_settingsMatch = nullptr;
QSystemTrayIcon *m_sys_tray_icon = nullptr; QSystemTrayIcon *m_sys_tray_icon = nullptr;
// CreateIndexAskDialog * m_askDialog = nullptr; CreateIndexAskDialog * m_askDialog = nullptr;
bool m_isAskDialogVisible = false; bool m_isAskDialogVisible = false;
QTimer * m_askTimer = nullptr; //询问是否创建索引弹窗弹出的计时器 QTimer * m_askTimer = nullptr; //询问是否创建索引弹窗弹出的计时器
@ -134,9 +129,9 @@ private:
SearchMethodManager m_searchMethodManager; SearchMethodManager m_searchMethodManager;
// void setSearchMethod(const bool&); void setSearchMethod(const bool&);
double getTransparentData(); double getTransparentData();
// void initTimer(); void initTimer();
bool tryHideMainwindow(); bool tryHideMainwindow();
protected: protected:
@ -146,7 +141,7 @@ protected:
void initUi(); void initUi();
Q_SIGNALS: Q_SIGNALS:
// void searchMethodChanged(FileUtils::SearchMethod); void searchMethodChanged(FileUtils::SearchMethod);
void webEngineChanged(); void webEngineChanged();
public Q_SLOTS: public Q_SLOTS:

View File

@ -66,7 +66,6 @@ int SearchItemModel::rowCount(const QModelIndex& index) const {
* @param index * @param index
* @return model显示的列数 * @return model显示的列数
*/ */
int SearchItemModel::columnCount(const QModelIndex& index) const { int SearchItemModel::columnCount(const QModelIndex& index) const {
return index.isValid() ? 0 : 1; return index.isValid() ? 0 : 1;
} }

Binary file not shown.

View File

@ -5,7 +5,6 @@
<file>res/icons/close.svg</file> <file>res/icons/close.svg</file>
<file>res/qt-translations/qt_zh_CN.qm</file> <file>res/qt-translations/qt_zh_CN.qm</file>
<file>res/icons/net-disconnected.svg</file> <file>res/icons/net-disconnected.svg</file>
<file>res/translations/zh_CN.qm</file>
<file>res/icons/system-search.symbolic.png</file> <file>res/icons/system-search.symbolic.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -34,7 +34,7 @@ extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int tran
SettingsWidget::SettingsWidget(QWidget *parent) : QWidget(parent) { SettingsWidget::SettingsWidget(QWidget *parent) : QWidget(parent) {
// this->setWindowIcon(QIcon::fromTheme("kylin-search")); // this->setWindowIcon(QIcon::fromTheme("kylin-search"));
this->setWindowTitle(tr("ukui-search-settings")); this->setWindowTitle(tr("ukui-search-settings"));
this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint); // this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
// this->setAttribute(Qt::WA_TranslucentBackground); // this->setAttribute(Qt::WA_TranslucentBackground);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
@ -226,6 +226,11 @@ void SettingsWidget::initUi() {
// m_mainLyt->addWidget(m_bottomBtnFrame); // m_mainLyt->addWidget(m_bottomBtnFrame);
m_contentLyt->addStretch(); m_contentLyt->addStretch();
#if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
this->m_titleFrame->hide();
setAttribute(Qt::WA_DeleteOnClose);
#endif
} }
/** /**

View File

@ -62,7 +62,6 @@ private:
MotifWmHints m_hints; MotifWmHints m_hints;
#endif #endif
//标题栏 //标题栏
QVBoxLayout * m_mainLyt = nullptr; QVBoxLayout * m_mainLyt = nullptr;
QFrame * m_contentFrame = nullptr; QFrame * m_contentFrame = nullptr;

View File

@ -1,4 +1,4 @@
QT += core gui dbus xml x11extras QT += core gui dbus KWindowSystem xml x11extras
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@ -9,7 +9,7 @@ TEMPLATE = app
PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0
CONFIG += c++11 link_pkgconfig no_keywords lrelease CONFIG += c++11 link_pkgconfig no_keywords lrelease
LIBS += -lxapian -lgsettings-qt -lquazip5 -lX11 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 # The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings # any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the # depend on your compiler). Please consult the documentation of the
@ -33,8 +33,8 @@ SOURCES += \
mainwindow.cpp \ mainwindow.cpp \
search-app-thread.cpp \ search-app-thread.cpp \
search-result.cpp \ search-result.cpp \
settings-widget.cpp settings-widget.cpp \
# xatom-helper.cpp xatom-helper.cpp
HEADERS += \ HEADERS += \
@ -44,8 +44,8 @@ HEADERS += \
mainwindow.h \ mainwindow.h \
search-app-thread.h \ search-app-thread.h \
search-result.h \ search-result.h \
settings-widget.h settings-widget.h \
# xatom-helper.h xatom-helper.h
# Default rules for deployment. # Default rules for deployment.
@ -70,10 +70,10 @@ TRANSLATIONS += \
qm_files.path = /usr/share/ukui-search/translations/ qm_files.path = /usr/share/ukui-search/translations/
qm_files.files = $$OUT_PWD/.qm/*.qm qm_files.files = $$OUT_PWD/.qm/*.qm
#schemes.path = /usr/share/glib-2.0/schemas/ 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.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 \ LIBS += -L$$OUT_PWD/../libchinese-segmentation -lchinese-segmentation \
-L$$OUT_PWD/../libsearch -lukui-search -L$$OUT_PWD/../libsearch -lukui-search
@ -83,3 +83,13 @@ DEPENDPATH += $$PWD/../libchinese-segmentation
INCLUDEPATH += $$PWD/../libsearch INCLUDEPATH += $$PWD/../libsearch
DEPENDPATH += $$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

View File

@ -4,7 +4,7 @@
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>
<location filename="../../src/main.cpp" line="206"/> <location filename="../../src/main.cpp" line="195"/>
<source>ukui-search is already running!</source> <source>ukui-search is already running!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -12,57 +12,57 @@
<context> <context>
<name>Zeeker::ContentWidget</name> <name>Zeeker::ContentWidget</name>
<message> <message>
<location filename="../../src/content-widget.cpp" line="370"/> <location filename="../../src/content-widget.cpp" line="359"/>
<source>Recently Opened</source> <source>Recently Opened</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="406"/> <location filename="../../src/content-widget.cpp" line="395"/>
<source>Open Quickly</source> <source>Open Quickly</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="407"/> <location filename="../../src/content-widget.cpp" line="396"/>
<source>Commonly Used</source> <source>Commonly Used</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="672"/> <location filename="../../src/content-widget.cpp" line="661"/>
<source>Apps</source> <source>Apps</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="674"/> <location filename="../../src/content-widget.cpp" line="663"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="676"/> <location filename="../../src/content-widget.cpp" line="665"/>
<source>Files</source> <source>Files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="678"/> <location filename="../../src/content-widget.cpp" line="667"/>
<source>Dirs</source> <source>Dirs</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="680"/> <location filename="../../src/content-widget.cpp" line="669"/>
<source>File Contents</source> <source>File Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="682"/> <location filename="../../src/content-widget.cpp" line="671"/>
<source>Best Matches</source> <source>Best Matches</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="684"/> <location filename="../../src/content-widget.cpp" line="673"/>
<source>Web Pages</source> <source>Web Pages</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="686"/> <location filename="../../src/content-widget.cpp" line="675"/>
<source>Unknown</source> <source>Unknown</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -70,32 +70,32 @@
<context> <context>
<name>Zeeker::CreateIndexAskDialog</name> <name>Zeeker::CreateIndexAskDialog</name>
<message> <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> <source>ukui-search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Creating index can help you getting results quickly, whether to create or not?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/create-index-ask-dialog.cpp" line="89"/> <location filename="../../src/create-index-ask-dialog.cpp" line="83"/>
<source>Don&apos;t remind</source> <source>Don&apos;t remind</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>No</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Yes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -111,17 +111,17 @@
<context> <context>
<name>Zeeker::MainWindow</name> <name>Zeeker::MainWindow</name>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="68"/> <location filename="../../src/mainwindow.cpp" line="66"/>
<source>ukui-search</source> <source>ukui-search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="123"/> <location filename="../../src/mainwindow.cpp" line="120"/>
<source>Global Search</source> <source>Global Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="205"/> <location filename="../../src/mainwindow.cpp" line="197"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -170,32 +170,32 @@
<context> <context>
<name>Zeeker::SearchDetailView</name> <name>Zeeker::SearchDetailView</name>
<message> <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> <source>Introduction: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Application</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Document</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Preview is not avaliable</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Path</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Last time modified</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -208,155 +208,155 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="80"/> <location filename="../../src/settings-widget.cpp" line="74"/>
<location filename="../../src/settings-widget.cpp" line="300"/> <location filename="../../src/settings-widget.cpp" line="289"/>
<location filename="../../src/settings-widget.cpp" line="532"/> <location filename="../../src/settings-widget.cpp" line="519"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="109"/> <location filename="../../src/settings-widget.cpp" line="103"/>
<source>&lt;h2&gt;Settings&lt;/h2&gt;</source> <source>&lt;h2&gt;Settings&lt;/h2&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="114"/> <location filename="../../src/settings-widget.cpp" line="108"/>
<source>&lt;h3&gt;Index State&lt;/h3&gt;</source> <source>&lt;h3&gt;Index State&lt;/h3&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="116"/> <location filename="../../src/settings-widget.cpp" line="110"/>
<location filename="../../src/settings-widget.cpp" line="118"/> <location filename="../../src/settings-widget.cpp" line="112"/>
<source>...</source> <source>...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="126"/> <location filename="../../src/settings-widget.cpp" line="120"/>
<source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source> <source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="137"/> <location filename="../../src/settings-widget.cpp" line="131"/>
<source>Add ignored folders</source> <source>Add ignored folders</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="158"/> <location filename="../../src/settings-widget.cpp" line="152"/>
<source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source> <source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Please select search engine you preferred.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="173"/> <location filename="../../src/settings-widget.cpp" line="167"/>
<source>baidu</source> <source>baidu</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="175"/> <location filename="../../src/settings-widget.cpp" line="169"/>
<source>sougou</source> <source>sougou</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="177"/> <location filename="../../src/settings-widget.cpp" line="171"/>
<source>360</source> <source>360</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Whether to delete this directory?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="301"/> <location filename="../../src/settings-widget.cpp" line="290"/>
<source>Yes</source> <source>Yes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="302"/> <location filename="../../src/settings-widget.cpp" line="291"/>
<source>No</source> <source>No</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="360"/> <location filename="../../src/settings-widget.cpp" line="349"/>
<source>Creating ...</source> <source>Creating ...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="363"/> <location filename="../../src/settings-widget.cpp" line="352"/>
<source>Done</source> <source>Done</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="371"/> <location filename="../../src/settings-widget.cpp" line="360"/>
<source>Index Entry: %1</source> <source>Index Entry: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="417"/> <location filename="../../src/settings-widget.cpp" line="404"/>
<source>Directories</source> <source>Directories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="418"/> <location filename="../../src/settings-widget.cpp" line="405"/>
<source>select blocked folder</source> <source>select blocked folder</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="419"/> <location filename="../../src/settings-widget.cpp" line="406"/>
<source>Select</source> <source>Select</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="420"/> <location filename="../../src/settings-widget.cpp" line="407"/>
<source>Position: </source> <source>Position: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="421"/> <location filename="../../src/settings-widget.cpp" line="408"/>
<source>FileName: </source> <source>FileName: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="422"/> <location filename="../../src/settings-widget.cpp" line="409"/>
<source>FileType: </source> <source>FileType: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="423"/> <location filename="../../src/settings-widget.cpp" line="410"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="516"/> <location filename="../../src/settings-widget.cpp" line="503"/>
<source>Choosen path is Empty!</source> <source>Choosen path is Empty!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="520"/> <location filename="../../src/settings-widget.cpp" line="507"/>
<source>Choosen path is not in &quot;home&quot;!</source> <source>Choosen path is not in &quot;home&quot;!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="524"/> <location filename="../../src/settings-widget.cpp" line="511"/>
<source>Its&apos; parent folder has been blocked!</source> <source>Its&apos; parent folder has been blocked!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="528"/> <location filename="../../src/settings-widget.cpp" line="515"/>
<source>Set blocked folder failed!</source> <source>Set blocked folder failed!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="533"/> <location filename="../../src/settings-widget.cpp" line="520"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -99,7 +99,7 @@
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>
<location filename="../../src/main.cpp" line="206"/> <location filename="../../src/main.cpp" line="195"/>
<source>ukui-search is already running!</source> <source>ukui-search is already running!</source>
<translation>ukui-bul zaten çalışıyor!</translation> <translation>ukui-bul zaten çalışıyor!</translation>
</message> </message>
@ -247,57 +247,57 @@
<context> <context>
<name>Zeeker::ContentWidget</name> <name>Zeeker::ContentWidget</name>
<message> <message>
<location filename="../../src/content-widget.cpp" line="370"/> <location filename="../../src/content-widget.cpp" line="359"/>
<source>Recently Opened</source> <source>Recently Opened</source>
<translation type="unfinished">Yeni ılan</translation> <translation type="unfinished">Yeni ılan</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="406"/> <location filename="../../src/content-widget.cpp" line="395"/>
<source>Open Quickly</source> <source>Open Quickly</source>
<translation type="unfinished">Hızlı </translation> <translation type="unfinished">Hızlı </translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="407"/> <location filename="../../src/content-widget.cpp" line="396"/>
<source>Commonly Used</source> <source>Commonly Used</source>
<translation type="unfinished">Genel olarak kullanılan</translation> <translation type="unfinished">Genel olarak kullanılan</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="672"/> <location filename="../../src/content-widget.cpp" line="661"/>
<source>Apps</source> <source>Apps</source>
<translation type="unfinished">Uygulamalar</translation> <translation type="unfinished">Uygulamalar</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="674"/> <location filename="../../src/content-widget.cpp" line="663"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished">Ayarlar</translation> <translation type="unfinished">Ayarlar</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="676"/> <location filename="../../src/content-widget.cpp" line="665"/>
<source>Files</source> <source>Files</source>
<translation type="unfinished">Dosyalar</translation> <translation type="unfinished">Dosyalar</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="678"/> <location filename="../../src/content-widget.cpp" line="667"/>
<source>Dirs</source> <source>Dirs</source>
<translation type="unfinished">Dizinler</translation> <translation type="unfinished">Dizinler</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="680"/> <location filename="../../src/content-widget.cpp" line="669"/>
<source>File Contents</source> <source>File Contents</source>
<translation type="unfinished">Dosya İçeriği</translation> <translation type="unfinished">Dosya İçeriği</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="682"/> <location filename="../../src/content-widget.cpp" line="671"/>
<source>Best Matches</source> <source>Best Matches</source>
<translation type="unfinished">En İyi Eşleşen</translation> <translation type="unfinished">En İyi Eşleşen</translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="684"/> <location filename="../../src/content-widget.cpp" line="673"/>
<source>Web Pages</source> <source>Web Pages</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="686"/> <location filename="../../src/content-widget.cpp" line="675"/>
<source>Unknown</source> <source>Unknown</source>
<translation type="unfinished">Bilinmeyen</translation> <translation type="unfinished">Bilinmeyen</translation>
</message> </message>
@ -305,32 +305,32 @@
<context> <context>
<name>Zeeker::CreateIndexAskDialog</name> <name>Zeeker::CreateIndexAskDialog</name>
<message> <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> <source>ukui-search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Search</source>
<translation type="unfinished">Ara</translation> <translation type="unfinished">Ara</translation>
</message> </message>
<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> <source>Creating index can help you getting results quickly, whether to create or not?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/create-index-ask-dialog.cpp" line="89"/> <location filename="../../src/create-index-ask-dialog.cpp" line="83"/>
<source>Don&apos;t remind</source> <source>Don&apos;t remind</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>No</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Yes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -346,17 +346,17 @@
<context> <context>
<name>Zeeker::MainWindow</name> <name>Zeeker::MainWindow</name>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="68"/> <location filename="../../src/mainwindow.cpp" line="66"/>
<source>ukui-search</source> <source>ukui-search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="123"/> <location filename="../../src/mainwindow.cpp" line="120"/>
<source>Global Search</source> <source>Global Search</source>
<translation type="unfinished">Genel Arama</translation> <translation type="unfinished">Genel Arama</translation>
</message> </message>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="205"/> <location filename="../../src/mainwindow.cpp" line="197"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished">Ara</translation> <translation type="unfinished">Ara</translation>
</message> </message>
@ -405,32 +405,32 @@
<context> <context>
<name>Zeeker::SearchDetailView</name> <name>Zeeker::SearchDetailView</name>
<message> <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> <source>Introduction: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Application</source>
<translation type="unfinished">Uygulama</translation> <translation type="unfinished">Uygulama</translation>
</message> </message>
<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> <source>Document</source>
<translation type="unfinished">Belge</translation> <translation type="unfinished">Belge</translation>
</message> </message>
<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> <source>Preview is not avaliable</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Path</source>
<translation type="unfinished">Yol</translation> <translation type="unfinished">Yol</translation>
</message> </message>
<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> <source>Last time modified</source>
<translation type="unfinished">Son değiştirilme zamanı</translation> <translation type="unfinished">Son değiştirilme zamanı</translation>
</message> </message>
@ -443,155 +443,155 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="80"/> <location filename="../../src/settings-widget.cpp" line="74"/>
<location filename="../../src/settings-widget.cpp" line="300"/> <location filename="../../src/settings-widget.cpp" line="289"/>
<location filename="../../src/settings-widget.cpp" line="532"/> <location filename="../../src/settings-widget.cpp" line="519"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished">Ara</translation> <translation type="unfinished">Ara</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="109"/> <location filename="../../src/settings-widget.cpp" line="103"/>
<source>&lt;h2&gt;Settings&lt;/h2&gt;</source> <source>&lt;h2&gt;Settings&lt;/h2&gt;</source>
<translation type="unfinished">&lt;h2&gt;Ayarlar&lt;/h2&gt;</translation> <translation type="unfinished">&lt;h2&gt;Ayarlar&lt;/h2&gt;</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="114"/> <location filename="../../src/settings-widget.cpp" line="108"/>
<source>&lt;h3&gt;Index State&lt;/h3&gt;</source> <source>&lt;h3&gt;Index State&lt;/h3&gt;</source>
<translation type="unfinished">&lt;h3&gt;Dizin Durumu&lt;/h3&gt;</translation> <translation type="unfinished">&lt;h3&gt;Dizin Durumu&lt;/h3&gt;</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="116"/> <location filename="../../src/settings-widget.cpp" line="110"/>
<location filename="../../src/settings-widget.cpp" line="118"/> <location filename="../../src/settings-widget.cpp" line="112"/>
<source>...</source> <source>...</source>
<translation type="unfinished">...</translation> <translation type="unfinished">...</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="126"/> <location filename="../../src/settings-widget.cpp" line="120"/>
<source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source> <source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source>
<translation type="unfinished">&lt;h3&gt;Dosya Dizini Ayarları&lt;/h3&gt;</translation> <translation type="unfinished">&lt;h3&gt;Dosya Dizini Ayarları&lt;/h3&gt;</translation>
</message> </message>
<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> <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> <translation type="unfinished">Aşağıdaki klasörler aranmayacaktır. Klasör ekleyip kaldırarak ayarlayabilirsiniz.</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="137"/> <location filename="../../src/settings-widget.cpp" line="131"/>
<source>Add ignored folders</source> <source>Add ignored folders</source>
<translation type="unfinished">Göz ardı edilen klasörleri ekleyin</translation> <translation type="unfinished">Göz ardı edilen klasörleri ekleyin</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="158"/> <location filename="../../src/settings-widget.cpp" line="152"/>
<source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source> <source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source>
<translation type="unfinished">&lt;h3&gt;SArama Motoru Ayarları&lt;/h3&gt;</translation> <translation type="unfinished">&lt;h3&gt;SArama Motoru Ayarları&lt;/h3&gt;</translation>
</message> </message>
<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> <source>Please select search engine you preferred.</source>
<translation type="unfinished">Lütfen tercih ettiğiniz arama motorunu seçin.</translation> <translation type="unfinished">Lütfen tercih ettiğiniz arama motorunu seçin.</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="173"/> <location filename="../../src/settings-widget.cpp" line="167"/>
<source>baidu</source> <source>baidu</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="175"/> <location filename="../../src/settings-widget.cpp" line="169"/>
<source>sougou</source> <source>sougou</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="177"/> <location filename="../../src/settings-widget.cpp" line="171"/>
<source>360</source> <source>360</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Whether to delete this directory?</source>
<translation type="unfinished">Bu dizini silinsin mi?</translation> <translation type="unfinished">Bu dizini silinsin mi?</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="301"/> <location filename="../../src/settings-widget.cpp" line="290"/>
<source>Yes</source> <source>Yes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="302"/> <location filename="../../src/settings-widget.cpp" line="291"/>
<source>No</source> <source>No</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="360"/> <location filename="../../src/settings-widget.cpp" line="349"/>
<source>Creating ...</source> <source>Creating ...</source>
<translation type="unfinished">Oluşturuluyor...</translation> <translation type="unfinished">Oluşturuluyor...</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="363"/> <location filename="../../src/settings-widget.cpp" line="352"/>
<source>Done</source> <source>Done</source>
<translation type="unfinished">Tamam</translation> <translation type="unfinished">Tamam</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="371"/> <location filename="../../src/settings-widget.cpp" line="360"/>
<source>Index Entry: %1</source> <source>Index Entry: %1</source>
<translation type="unfinished">Dizin Girişi: %1</translation> <translation type="unfinished">Dizin Girişi: %1</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="417"/> <location filename="../../src/settings-widget.cpp" line="404"/>
<source>Directories</source> <source>Directories</source>
<translation type="unfinished">Dizinler</translation> <translation type="unfinished">Dizinler</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="418"/> <location filename="../../src/settings-widget.cpp" line="405"/>
<source>select blocked folder</source> <source>select blocked folder</source>
<translation type="unfinished">engellenen klasörü seç</translation> <translation type="unfinished">engellenen klasörü seç</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="419"/> <location filename="../../src/settings-widget.cpp" line="406"/>
<source>Select</source> <source>Select</source>
<translation type="unfinished">Seç</translation> <translation type="unfinished">Seç</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="420"/> <location filename="../../src/settings-widget.cpp" line="407"/>
<source>Position: </source> <source>Position: </source>
<translation type="unfinished">Pozisyon: </translation> <translation type="unfinished">Pozisyon: </translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="421"/> <location filename="../../src/settings-widget.cpp" line="408"/>
<source>FileName: </source> <source>FileName: </source>
<translation type="unfinished">Dosya Adı: </translation> <translation type="unfinished">Dosya Adı: </translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="422"/> <location filename="../../src/settings-widget.cpp" line="409"/>
<source>FileType: </source> <source>FileType: </source>
<translation type="unfinished">Dosya Türü: </translation> <translation type="unfinished">Dosya Türü: </translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="423"/> <location filename="../../src/settings-widget.cpp" line="410"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished">İptal</translation> <translation type="unfinished">İptal</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="516"/> <location filename="../../src/settings-widget.cpp" line="503"/>
<source>Choosen path is Empty!</source> <source>Choosen path is Empty!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="520"/> <location filename="../../src/settings-widget.cpp" line="507"/>
<source>Choosen path is not in &quot;home&quot;!</source> <source>Choosen path is not in &quot;home&quot;!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="524"/> <location filename="../../src/settings-widget.cpp" line="511"/>
<source>Its&apos; parent folder has been blocked!</source> <source>Its&apos; parent folder has been blocked!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="528"/> <location filename="../../src/settings-widget.cpp" line="515"/>
<source>Set blocked folder failed!</source> <source>Set blocked folder failed!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="533"/> <location filename="../../src/settings-widget.cpp" line="520"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -4,7 +4,7 @@
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>
<location filename="../../src/main.cpp" line="206"/> <location filename="../../src/main.cpp" line="195"/>
<source>ukui-search is already running!</source> <source>ukui-search is already running!</source>
<translation></translation> <translation></translation>
</message> </message>
@ -12,57 +12,57 @@
<context> <context>
<name>Zeeker::ContentWidget</name> <name>Zeeker::ContentWidget</name>
<message> <message>
<location filename="../../src/content-widget.cpp" line="370"/> <location filename="../../src/content-widget.cpp" line="359"/>
<source>Recently Opened</source> <source>Recently Opened</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="406"/> <location filename="../../src/content-widget.cpp" line="395"/>
<source>Open Quickly</source> <source>Open Quickly</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="407"/> <location filename="../../src/content-widget.cpp" line="396"/>
<source>Commonly Used</source> <source>Commonly Used</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="672"/> <location filename="../../src/content-widget.cpp" line="661"/>
<source>Apps</source> <source>Apps</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="674"/> <location filename="../../src/content-widget.cpp" line="663"/>
<source>Settings</source> <source>Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="676"/> <location filename="../../src/content-widget.cpp" line="665"/>
<source>Files</source> <source>Files</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="678"/> <location filename="../../src/content-widget.cpp" line="667"/>
<source>Dirs</source> <source>Dirs</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="680"/> <location filename="../../src/content-widget.cpp" line="669"/>
<source>File Contents</source> <source>File Contents</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="682"/> <location filename="../../src/content-widget.cpp" line="671"/>
<source>Best Matches</source> <source>Best Matches</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="684"/> <location filename="../../src/content-widget.cpp" line="673"/>
<source>Web Pages</source> <source>Web Pages</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="686"/> <location filename="../../src/content-widget.cpp" line="675"/>
<source>Unknown</source> <source>Unknown</source>
<translation></translation> <translation></translation>
</message> </message>
@ -70,32 +70,32 @@
<context> <context>
<name>Zeeker::CreateIndexAskDialog</name> <name>Zeeker::CreateIndexAskDialog</name>
<message> <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> <source>ukui-search</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Search</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Creating index can help you getting results quickly, whether to create or not?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/create-index-ask-dialog.cpp" line="89"/> <location filename="../../src/create-index-ask-dialog.cpp" line="83"/>
<source>Don&apos;t remind</source> <source>Don&apos;t remind</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>No</source>
<translation>(N)</translation> <translation>(N)</translation>
</message> </message>
<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> <source>Yes</source>
<translation>(Y)</translation> <translation>(Y)</translation>
</message> </message>
@ -111,17 +111,17 @@
<context> <context>
<name>Zeeker::MainWindow</name> <name>Zeeker::MainWindow</name>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="68"/> <location filename="../../src/mainwindow.cpp" line="66"/>
<source>ukui-search</source> <source>ukui-search</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="123"/> <location filename="../../src/mainwindow.cpp" line="120"/>
<source>Global Search</source> <source>Global Search</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/mainwindow.cpp" line="205"/> <location filename="../../src/mainwindow.cpp" line="197"/>
<source>Search</source> <source>Search</source>
<translation></translation> <translation></translation>
</message> </message>
@ -170,32 +170,32 @@
<context> <context>
<name>Zeeker::SearchDetailView</name> <name>Zeeker::SearchDetailView</name>
<message> <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> <source>Introduction: %1</source>
<translation>: %1</translation> <translation>: %1</translation>
</message> </message>
<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> <source>Application</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Document</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Preview is not avaliable</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Path</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Last time modified</source>
<translation></translation> <translation></translation>
</message> </message>
@ -208,155 +208,155 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="80"/> <location filename="../../src/settings-widget.cpp" line="74"/>
<location filename="../../src/settings-widget.cpp" line="300"/> <location filename="../../src/settings-widget.cpp" line="289"/>
<location filename="../../src/settings-widget.cpp" line="532"/> <location filename="../../src/settings-widget.cpp" line="519"/>
<source>Search</source> <source>Search</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="109"/> <location filename="../../src/settings-widget.cpp" line="103"/>
<source>&lt;h2&gt;Settings&lt;/h2&gt;</source> <source>&lt;h2&gt;Settings&lt;/h2&gt;</source>
<translation>&lt;h2&gt;&lt;/h2&gt;</translation> <translation>&lt;h2&gt;&lt;/h2&gt;</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="114"/> <location filename="../../src/settings-widget.cpp" line="108"/>
<source>&lt;h3&gt;Index State&lt;/h3&gt;</source> <source>&lt;h3&gt;Index State&lt;/h3&gt;</source>
<translation>&lt;h3&gt;&lt;/h3&gt;</translation> <translation>&lt;h3&gt;&lt;/h3&gt;</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="116"/> <location filename="../../src/settings-widget.cpp" line="110"/>
<location filename="../../src/settings-widget.cpp" line="118"/> <location filename="../../src/settings-widget.cpp" line="112"/>
<source>...</source> <source>...</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="126"/> <location filename="../../src/settings-widget.cpp" line="120"/>
<source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source> <source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source>
<translation>&lt;h3&gt;&lt;/h3&gt;</translation> <translation>&lt;h3&gt;&lt;/h3&gt;</translation>
</message> </message>
<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> <source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="137"/> <location filename="../../src/settings-widget.cpp" line="131"/>
<source>Add ignored folders</source> <source>Add ignored folders</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="158"/> <location filename="../../src/settings-widget.cpp" line="152"/>
<source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source> <source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source>
<translation>&lt;h3&gt;&lt;/h3&gt;</translation> <translation>&lt;h3&gt;&lt;/h3&gt;</translation>
</message> </message>
<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> <source>Please select search engine you preferred.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="173"/> <location filename="../../src/settings-widget.cpp" line="167"/>
<source>baidu</source> <source>baidu</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="175"/> <location filename="../../src/settings-widget.cpp" line="169"/>
<source>sougou</source> <source>sougou</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="177"/> <location filename="../../src/settings-widget.cpp" line="171"/>
<source>360</source> <source>360</source>
<translation>360</translation> <translation>360</translation>
</message> </message>
<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> <source>Whether to delete this directory?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="301"/> <location filename="../../src/settings-widget.cpp" line="290"/>
<source>Yes</source> <source>Yes</source>
<translation>(Y)</translation> <translation>(Y)</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="302"/> <location filename="../../src/settings-widget.cpp" line="291"/>
<source>No</source> <source>No</source>
<translation>(N)</translation> <translation>(N)</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="360"/> <location filename="../../src/settings-widget.cpp" line="349"/>
<source>Creating ...</source> <source>Creating ...</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="363"/> <location filename="../../src/settings-widget.cpp" line="352"/>
<source>Done</source> <source>Done</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="371"/> <location filename="../../src/settings-widget.cpp" line="360"/>
<source>Index Entry: %1</source> <source>Index Entry: %1</source>
<translation>: %1</translation> <translation>: %1</translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="417"/> <location filename="../../src/settings-widget.cpp" line="404"/>
<source>Directories</source> <source>Directories</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="418"/> <location filename="../../src/settings-widget.cpp" line="405"/>
<source>select blocked folder</source> <source>select blocked folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="419"/> <location filename="../../src/settings-widget.cpp" line="406"/>
<source>Select</source> <source>Select</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="420"/> <location filename="../../src/settings-widget.cpp" line="407"/>
<source>Position: </source> <source>Position: </source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="421"/> <location filename="../../src/settings-widget.cpp" line="408"/>
<source>FileName: </source> <source>FileName: </source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="422"/> <location filename="../../src/settings-widget.cpp" line="409"/>
<source>FileType: </source> <source>FileType: </source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="423"/> <location filename="../../src/settings-widget.cpp" line="410"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="516"/> <location filename="../../src/settings-widget.cpp" line="503"/>
<source>Choosen path is Empty!</source> <source>Choosen path is Empty!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="520"/> <location filename="../../src/settings-widget.cpp" line="507"/>
<source>Choosen path is not in &quot;home&quot;!</source> <source>Choosen path is not in &quot;home&quot;!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="524"/> <location filename="../../src/settings-widget.cpp" line="511"/>
<source>Its&apos; parent folder has been blocked!</source> <source>Its&apos; parent folder has been blocked!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="528"/> <location filename="../../src/settings-widget.cpp" line="515"/>
<source>Set blocked folder failed!</source> <source>Set blocked folder failed!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="533"/> <location filename="../../src/settings-widget.cpp" line="520"/>
<source>OK</source> <source>OK</source>
<translation></translation> <translation></translation>
</message> </message>