Fix a potential bug in plugin interface.

This commit is contained in:
iaom 2021-12-14 14:58:46 +08:00
parent 5fb81dd1d9
commit 0fea295bea
2 changed files with 3 additions and 3 deletions

View File

@ -472,8 +472,8 @@ void DirectSearch::run() {
} }
if(i.fileName().contains(m_keyword, Qt::CaseInsensitive)) { if(i.fileName().contains(m_keyword, Qt::CaseInsensitive)) {
// qWarning() << i.fileName() << m_keyword; // qWarning() << i.fileName() << m_keyword;
if(m_searchResult->length() > 49) // if(m_searchResult->length() > 49)
return; // return;
if((i.isDir() && m_value == DIR_SEARCH_VALUE)) { if((i.isDir() && m_value == DIR_SEARCH_VALUE)) {
SearchPluginIface::ResultInfo ri; SearchPluginIface::ResultInfo ri;
if(SearchManager::creatResultInfo(ri,i.absoluteFilePath())) { if(SearchManager::creatResultInfo(ri,i.absoluteFilePath())) {

View File

@ -7,7 +7,7 @@
namespace UkuiSearch { namespace UkuiSearch {
// TODO I want a unlocked queue // TODO I want a unlocked queue
template <typename T> template <typename T>
class LIBSEARCH_EXPORT DataQueue : public QList<T> class LIBSEARCH_EXPORT DataQueue : protected QList<T>
{ {
public: public:
inline void enqueue(const T &t) { inline void enqueue(const T &t) {