diff --git a/src/kde/kioslave/recoll/00README.txt b/src/kde/kioslave/recoll/00README.txt index 1b6db01a..bf865839 100644 --- a/src/kde/kioslave/recoll/00README.txt +++ b/src/kde/kioslave/recoll/00README.txt @@ -47,8 +47,9 @@ Recipe: - Extract the Recoll source. - - IF Recoll is not installed yet: configure recoll with --prefix=/usr - (or wherever KDE lives), build and install Recoll. + - IF Recoll is not installed yet: configure recoll with + --prefix=/usr --enable-pic (or wherever KDE lives), build and install + Recoll. - In the Recoll source, go to kde/kioslave/recoll, then build and install the kio slave: diff --git a/src/kde/kioslave/recoll/CMakeLists.txt b/src/kde/kioslave/recoll/CMakeLists.txt index e09bef17..30899d85 100644 --- a/src/kde/kioslave/recoll/CMakeLists.txt +++ b/src/kde/kioslave/recoll/CMakeLists.txt @@ -37,9 +37,10 @@ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${rcltop}/rcldb ${rcltop}/unac ${rcltop}/utils + ${rcltop}/qtgui ) -set(kio_recoll_SRCS kio_recoll.cpp htmlif.cpp dirif.cpp) +set(kio_recoll_SRCS kio_recoll.cpp htmlif.cpp dirif.cpp ${rcltop}/qtgui/guiutils.cpp) CHECK_LIBRARY_EXISTS(dl dlopen "" DLOPEN_IN_LIBDL) IF(DLOPEN_IN_LIBDL) diff --git a/src/kde/kioslave/recoll/htmlif.cpp b/src/kde/kioslave/recoll/htmlif.cpp index 2fac88d9..6cf0449a 100644 --- a/src/kde/kioslave/recoll/htmlif.cpp +++ b/src/kde/kioslave/recoll/htmlif.cpp @@ -144,7 +144,6 @@ static string welcomedata; void RecollProtocol::searchPage() { - kDebug(); mimeType("text/html"); if (welcomedata.empty()) { QString location = @@ -188,7 +187,6 @@ void RecollProtocol::searchPage() void RecollProtocol::queryDetails() { - kDebug(); mimeType("text/html"); QByteArray array; QTextStream os(&array, QIODevice::WriteOnly); @@ -206,7 +204,6 @@ void RecollProtocol::queryDetails() data(array); } - class PlainToRichKio : public PlainToRich { public: PlainToRichKio(const string& nm) @@ -275,9 +272,9 @@ void RecollProtocol::showPreview(const Rcl::Doc& idoc) void RecollProtocol::htmlDoSearch(const QueryDesc& qd) { - kDebug() << "q" << qd.query << "opt" << qd.opt << "page" << qd.page << - "isdet" << qd.isDetReq; - + kDebug() << "q" << qd.query << "option" << qd.opt << "page" << qd.page << + "isdet" << qd.isDetReq << endl; + mimeType("text/html"); if (!syncSearch(qd)) diff --git a/src/kde/kioslave/recoll/kio_recoll.cpp b/src/kde/kioslave/recoll/kio_recoll.cpp index 32568c86..c1a83169 100644 --- a/src/kde/kioslave/recoll/kio_recoll.cpp +++ b/src/kde/kioslave/recoll/kio_recoll.cpp @@ -48,6 +48,7 @@ using namespace std; #include "readfile.h" #include "smallut.h" #include "textsplit.h" +#include "guiutils.h" using namespace KIO; @@ -72,6 +73,7 @@ RecollProtocol::RecollProtocol(const QByteArray &pool, const QByteArray &app) m_reason = "No db directory in configuration ??"; return; } + rwSettings(false); m_rcldb = new Rcl::Db(o_rclconfig); if (!m_rcldb) { @@ -115,13 +117,10 @@ bool RecollProtocol::maybeOpenDb(string &reason) return true; } -// Not sure this is ever used +// This is never called afaik void RecollProtocol::mimetype(const KUrl &url) { kDebug() << url << endl; - ///////////////////////////////REMOVEME REMOVEME REMOVEME when sure !///// - abort(); - //////////////////////////////////////////////////////////////////////// mimeType("text/html"); finished(); } @@ -342,6 +341,7 @@ bool RecollProtocol::doSearch(const QueryDesc& qd) RefCntr sdata(sd); sdata->setStemlang("english"); RefCntrquery(new Rcl::Query(m_rcldb)); + query->setCollapseDuplicates(prefs.collapseDuplicates); if (!query->setQuery(sdata)) { m_reason = "Query execute failed. Invalid query or syntax error?"; error(KIO::ERR_SLAVE_DEFINED, m_reason.c_str()); diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index a9a8454f..ecd4058a 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -33,6 +33,8 @@ static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.40 2008-11-24 15:23:12 dockes Ex #include #include +RclDynConf *g_dynconf; + // The table should not be necessary, but I found no css way to get // qt 4.6 qtextedit to clear the margins after the float img without // introducing blank space. diff --git a/src/qtgui/guiutils.h b/src/qtgui/guiutils.h index d059e991..d047042c 100644 --- a/src/qtgui/guiutils.h +++ b/src/qtgui/guiutils.h @@ -43,6 +43,9 @@ #include #include +#include "dynconf.h" +extern RclDynConf *g_dynconf; + #ifndef NO_NAMESPACES using std::string; using std::list; diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index e588c182..f68ab929 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -56,7 +56,6 @@ Rcl::Db *rcldb; Aspell *aspell; #endif -RclDynConf *g_dynconf; int recollNeedsExit; int startIndexingAfterConfig; RclMain *mainWindow; diff --git a/src/qtgui/recoll.h b/src/qtgui/recoll.h index 3a75d88b..a705c1bc 100644 --- a/src/qtgui/recoll.h +++ b/src/qtgui/recoll.h @@ -22,7 +22,6 @@ #include "rclconfig.h" #include "rcldb.h" #include "idxthread.h" -#include "dynconf.h" // Misc declarations in need of sharing between the UI files @@ -36,7 +35,6 @@ extern RclConfig *rclconfig; extern Rcl::Db *rcldb; extern int recollNeedsExit; extern int startIndexingAfterConfig; // 1st startup -extern RclDynConf *g_dynconf; extern void startManual(const string& helpindex); #ifdef RCL_USE_ASPELL