diff --git a/libsearch/filesystemwatcher/file-system-watcher.cpp b/libsearch/filesystemwatcher/file-system-watcher.cpp index f4fe84e..503e3f5 100644 --- a/libsearch/filesystemwatcher/file-system-watcher.cpp +++ b/libsearch/filesystemwatcher/file-system-watcher.cpp @@ -311,7 +311,7 @@ void FileSystemWatcher::eventProcess(int socket) } if (event->mask & EventModify) { // qDebug() << path << "--EventModify"; - if(!event->mask & IN_ISDIR) { + if(!(event->mask & IN_ISDIR)) { Q_EMIT modified(path); } } diff --git a/libsearch/mailsearch/mail-search-plugin.cpp b/libsearch/mailsearch/mail-search-plugin.cpp index 5b63529..9408a5c 100644 --- a/libsearch/mailsearch/mail-search-plugin.cpp +++ b/libsearch/mailsearch/mail-search-plugin.cpp @@ -18,6 +18,7 @@ * */ #include "mail-search-plugin.h" +#include #include "file-utils.h" #include "chinese-segmentation.h" using namespace UkuiSearch; diff --git a/libsearch/notesearch/note-search-plugin.cpp b/libsearch/notesearch/note-search-plugin.cpp index f06ade5..ba1bc51 100644 --- a/libsearch/notesearch/note-search-plugin.cpp +++ b/libsearch/notesearch/note-search-plugin.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "file-utils.h" #include "chinese-segmentation.h" using namespace UkuiSearch; diff --git a/libsearch/searchinterface/result-item.cpp b/libsearch/searchinterface/result-item.cpp index 176fd26..65e9a6c 100644 --- a/libsearch/searchinterface/result-item.cpp +++ b/libsearch/searchinterface/result-item.cpp @@ -76,3 +76,15 @@ ResultItem::~ResultItem() ResultItem::ResultItem(const ResultItem &item): d(new ResultItemPrivate(*item.d)) { } + +ResultItem &ResultItem::operator=(const ResultItem &other) +{ + *d = *other.d; + return *this; +} +ResultItem &ResultItem::operator=(ResultItem &&other) Q_DECL_NOEXCEPT +{ + d = other.d; + other.d = nullptr; + return *this; +} diff --git a/libsearch/searchinterface/result-item.h b/libsearch/searchinterface/result-item.h index 6711115..5a38c03 100644 --- a/libsearch/searchinterface/result-item.h +++ b/libsearch/searchinterface/result-item.h @@ -30,10 +30,13 @@ public: explicit ResultItem(); virtual ~ResultItem(); - ResultItem(const ResultItem &item); explicit ResultItem(const size_t searchId); explicit ResultItem(const QString &itemKey); ResultItem(const size_t searchId, const QString &itemKey, const SearchResultPropertyMap &map); + ResultItem(const ResultItem &item); + ResultItem &operator=(const ResultItem &other); + ResultItem &operator=(ResultItem &&other) Q_DECL_NOEXCEPT; + void setSearchId(const size_t searchId); void setItemKey(const QString &itemKey); size_t getSearchId() const; diff --git a/libsearch/searchinterface/searchtasks/file-content-search-task.cpp b/libsearch/searchinterface/searchtasks/file-content-search-task.cpp index 161136c..c8d9b49 100644 --- a/libsearch/searchinterface/searchtasks/file-content-search-task.cpp +++ b/libsearch/searchinterface/searchtasks/file-content-search-task.cpp @@ -29,6 +29,7 @@ //Qt #include #include +#include using namespace UkuiSearch; diff --git a/libsearch/settingsearch/settings-search-plugin.cpp b/libsearch/settingsearch/settings-search-plugin.cpp index 1d35b13..8ded2d4 100644 --- a/libsearch/settingsearch/settings-search-plugin.cpp +++ b/libsearch/settingsearch/settings-search-plugin.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "settings-search-plugin.h" #include "file-utils.h" diff --git a/libsearch/websearch/web-search-plugin.cpp b/libsearch/websearch/web-search-plugin.cpp index 1024e97..ac4eff2 100644 --- a/libsearch/websearch/web-search-plugin.cpp +++ b/libsearch/websearch/web-search-plugin.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "web-search-plugin.h" #include "global-settings.h" #define WEB_ENGINE_KEY "webEngine"