diff --git a/debian/libukui-search-dev.install b/debian/libukui-search-dev.install index e31886a..64fd975 100644 --- a/debian/libukui-search-dev.install +++ b/debian/libukui-search-dev.install @@ -1,2 +1,3 @@ usr/include/ukui-search/* +usr/lib/*/pkgconfig/*.pc usr/lib/*/libukui-search.so diff --git a/libsearch/development-files/header-files/UkuiSearchController b/libsearch/development-files/header-files/UkuiSearchController new file mode 100644 index 0000000..6d87eca --- /dev/null +++ b/libsearch/development-files/header-files/UkuiSearchController @@ -0,0 +1 @@ +#include "search-controller.h" diff --git a/libsearch/development-files/header-files/UkuiSearchPluginIface b/libsearch/development-files/header-files/UkuiSearchPluginIface new file mode 100644 index 0000000..94d4d98 --- /dev/null +++ b/libsearch/development-files/header-files/UkuiSearchPluginIface @@ -0,0 +1,6 @@ +#include "action-label.h" +#include "common-defines.h" +#include "plugin-iface.h" +#include "data-queue.h" +#include "search-plugin-iface.h" +#include "search-task-plugin-iface.h" diff --git a/libsearch/development-files/header-files/UkuiSearchTask b/libsearch/development-files/header-files/UkuiSearchTask new file mode 100644 index 0000000..d5751ba --- /dev/null +++ b/libsearch/development-files/header-files/UkuiSearchTask @@ -0,0 +1 @@ +#include "ukui-search-task.h" diff --git a/libsearch/index/ukui-search-qdbus.cpp b/libsearch/index/ukui-search-qdbus.cpp index ecb163d..54070b3 100644 --- a/libsearch/index/ukui-search-qdbus.cpp +++ b/libsearch/index/ukui-search-qdbus.cpp @@ -45,7 +45,7 @@ void UkuiSearchQDBus::setInotifyMaxUserWatches() { // this->tmpSystemQDBusInterface->call("setInotifyMaxUserWatchesStep3"); } -int UkuiSearchQDBus::addInotifyUserInstances(int addNum) +void UkuiSearchQDBus::addInotifyUserInstances(int addNum) { QDBusReply reply = tmpSystemQDBusInterface->call("AddInotifyMaxUserInstance", addNum); if(reply.isValid()) { diff --git a/libsearch/index/ukui-search-qdbus.h b/libsearch/index/ukui-search-qdbus.h index a258755..5934f54 100644 --- a/libsearch/index/ukui-search-qdbus.h +++ b/libsearch/index/ukui-search-qdbus.h @@ -28,7 +28,7 @@ public: UkuiSearchQDBus(); ~UkuiSearchQDBus(); void setInotifyMaxUserWatches(); - int addInotifyUserInstances(int addNum); + void addInotifyUserInstances(int addNum); private: QDBusInterface* tmpSystemQDBusInterface; }; diff --git a/libsearch/libsearch.pro b/libsearch/libsearch.pro index e88fd6b..ae5840a 100644 --- a/libsearch/libsearch.pro +++ b/libsearch/libsearch.pro @@ -1,14 +1,16 @@ QT += core xml widgets dbus concurrent -VERSION = 0.0.1 +VERSION = 1.0.0 DEFINES += VERSION='\\"$${VERSION}\\"' TARGET = ukui-search TEMPLATE = lib DEFINES += LIBSEARCH_LIBRARY +CONFIG += create_pc create_prl no_install_prl PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 gsettings-qt poppler-qt5 CONFIG += c++11 link_pkgconfig no_keywords lrelease +QMAKE_CXXFLAGS += -Werror=return-type -Werror=return-local-addr -Werror=uninitialized # The following define makes your compiler emit warnings if you use @@ -19,6 +21,7 @@ DEFINES += QT_DEPRECATED_WARNINGS PLUGIN_INSTALL_DIRS = $$[QT_INSTALL_LIBS]/ukui-search-plugins DEFINES += PLUGIN_INSTALL_DIRS='\\"$${PLUGIN_INSTALL_DIRS}\\"' +QMAKE_CXXFLAGS += -execution-charset:utf-8 # You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. @@ -66,10 +69,24 @@ INSTALLS += qm_files # Default rules for deployment. unix { target.path = $$[QT_INSTALL_LIBS] + QMAKE_PKGCONFIG_NAME = ukui-search + QMAKE_PKGCONFIG_DESCRIPTION = Ukui-search Header files + QMAKE_PKGCONFIG_VERSION = $$VERSION + QMAKE_PKGCONFIG_LIBDIR = $$target.path + QMAKE_PKGCONFIG_DESTDIR = pkgconfig + QMAKE_PKGCONFIG_INCDIR = /usr/include/ukui-search + QMAKE_PKGCONFIG_CFLAGS += -I/usr/include/ukui-search + QMAKE_PKGCONFIG_REQUIRES = Qt5Widgets glib-2.0 gio-2.0 gio-unix-2.0 poppler-qt5 gsettings-qt + INSTALLS += target header.path = /usr/include/ukui-search - header.files += *.h index/*.h appsearch/*.h settingsearch/*.h plugininterface/*.h websearch/*.h + header.files += *.h index/*.h appsearch/*.h settingsearch/*.h plugininterface/*.h websearch/*.h \ + searchinterface/ukui-search-task.h \ + searchinterface/search-controller.h \ + searchinterface/result-item.h + header.files += development-files/header-files/* + INSTALLS += header } INCLUDEPATH += $$PWD/../libchinese-segmentation diff --git a/libsearch/parser/binary-parser.cpp b/libsearch/parser/binary-parser.cpp index 43f8854..802622f 100644 --- a/libsearch/parser/binary-parser.cpp +++ b/libsearch/parser/binary-parser.cpp @@ -5085,6 +5085,7 @@ int KBinaryParser:: readSSTRecord(readDataParam &rdParam, ppsInfoType PPS_info, if(ulCount >= ulSize) return -1; + return 0; } int KBinaryParser::read8BiffRecord(uchar ucFlag, ulong ulOff, ulong &ulNext, readDataParam &rdParam, excelRecord &eR) {