let the kio access gui prefs (ie: duplicates)
This commit is contained in:
parent
a2c8c547b3
commit
3bbcf6d54d
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -33,6 +33,8 @@ static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.40 2008-11-24 15:23:12 dockes Ex
|
||||
#include <qsettings.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
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.
|
||||
|
||||
@ -43,6 +43,9 @@
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include "dynconf.h"
|
||||
extern RclDynConf *g_dynconf;
|
||||
|
||||
#ifndef NO_NAMESPACES
|
||||
using std::string;
|
||||
using std::list;
|
||||
|
||||
@ -56,7 +56,6 @@ Rcl::Db *rcldb;
|
||||
Aspell *aspell;
|
||||
#endif
|
||||
|
||||
RclDynConf *g_dynconf;
|
||||
int recollNeedsExit;
|
||||
int startIndexingAfterConfig;
|
||||
RclMain *mainWindow;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user