let the kio access gui prefs (ie: duplicates)

This commit is contained in:
Jean-Francois Dockes
2011-03-03 10:27:28 +01:00
parent a2c8c547b3
commit 3bbcf6d54d
8 changed files with 17 additions and 16 deletions
+3 -2
View File
@@ -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:
+2 -1
View File
@@ -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)
+3 -6
View File
@@ -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))
+4 -4
View File
@@ -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<Rcl::SearchData> sdata(sd);
sdata->setStemlang("english");
RefCntr<Rcl::Query>query(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());