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.
|
- Extract the Recoll source.
|
||||||
|
|
||||||
- IF Recoll is not installed yet: configure recoll with --prefix=/usr
|
- IF Recoll is not installed yet: configure recoll with
|
||||||
(or wherever KDE lives), build and install Recoll.
|
--prefix=/usr --enable-pic (or wherever KDE lives), build and install
|
||||||
|
Recoll.
|
||||||
|
|
||||||
- In the Recoll source, go to kde/kioslave/recoll, then build and
|
- In the Recoll source, go to kde/kioslave/recoll, then build and
|
||||||
install the kio slave:
|
install the kio slave:
|
||||||
|
|||||||
@ -37,9 +37,10 @@ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}
|
|||||||
${rcltop}/rcldb
|
${rcltop}/rcldb
|
||||||
${rcltop}/unac
|
${rcltop}/unac
|
||||||
${rcltop}/utils
|
${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)
|
CHECK_LIBRARY_EXISTS(dl dlopen "" DLOPEN_IN_LIBDL)
|
||||||
IF(DLOPEN_IN_LIBDL)
|
IF(DLOPEN_IN_LIBDL)
|
||||||
|
|||||||
@ -144,7 +144,6 @@ static string welcomedata;
|
|||||||
|
|
||||||
void RecollProtocol::searchPage()
|
void RecollProtocol::searchPage()
|
||||||
{
|
{
|
||||||
kDebug();
|
|
||||||
mimeType("text/html");
|
mimeType("text/html");
|
||||||
if (welcomedata.empty()) {
|
if (welcomedata.empty()) {
|
||||||
QString location =
|
QString location =
|
||||||
@ -188,7 +187,6 @@ void RecollProtocol::searchPage()
|
|||||||
|
|
||||||
void RecollProtocol::queryDetails()
|
void RecollProtocol::queryDetails()
|
||||||
{
|
{
|
||||||
kDebug();
|
|
||||||
mimeType("text/html");
|
mimeType("text/html");
|
||||||
QByteArray array;
|
QByteArray array;
|
||||||
QTextStream os(&array, QIODevice::WriteOnly);
|
QTextStream os(&array, QIODevice::WriteOnly);
|
||||||
@ -206,7 +204,6 @@ void RecollProtocol::queryDetails()
|
|||||||
data(array);
|
data(array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class PlainToRichKio : public PlainToRich {
|
class PlainToRichKio : public PlainToRich {
|
||||||
public:
|
public:
|
||||||
PlainToRichKio(const string& nm)
|
PlainToRichKio(const string& nm)
|
||||||
@ -275,8 +272,8 @@ void RecollProtocol::showPreview(const Rcl::Doc& idoc)
|
|||||||
|
|
||||||
void RecollProtocol::htmlDoSearch(const QueryDesc& qd)
|
void RecollProtocol::htmlDoSearch(const QueryDesc& qd)
|
||||||
{
|
{
|
||||||
kDebug() << "q" << qd.query << "opt" << qd.opt << "page" << qd.page <<
|
kDebug() << "q" << qd.query << "option" << qd.opt << "page" << qd.page <<
|
||||||
"isdet" << qd.isDetReq;
|
"isdet" << qd.isDetReq << endl;
|
||||||
|
|
||||||
mimeType("text/html");
|
mimeType("text/html");
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,7 @@ using namespace std;
|
|||||||
#include "readfile.h"
|
#include "readfile.h"
|
||||||
#include "smallut.h"
|
#include "smallut.h"
|
||||||
#include "textsplit.h"
|
#include "textsplit.h"
|
||||||
|
#include "guiutils.h"
|
||||||
|
|
||||||
using namespace KIO;
|
using namespace KIO;
|
||||||
|
|
||||||
@ -72,6 +73,7 @@ RecollProtocol::RecollProtocol(const QByteArray &pool, const QByteArray &app)
|
|||||||
m_reason = "No db directory in configuration ??";
|
m_reason = "No db directory in configuration ??";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
rwSettings(false);
|
||||||
|
|
||||||
m_rcldb = new Rcl::Db(o_rclconfig);
|
m_rcldb = new Rcl::Db(o_rclconfig);
|
||||||
if (!m_rcldb) {
|
if (!m_rcldb) {
|
||||||
@ -115,13 +117,10 @@ bool RecollProtocol::maybeOpenDb(string &reason)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not sure this is ever used
|
// This is never called afaik
|
||||||
void RecollProtocol::mimetype(const KUrl &url)
|
void RecollProtocol::mimetype(const KUrl &url)
|
||||||
{
|
{
|
||||||
kDebug() << url << endl;
|
kDebug() << url << endl;
|
||||||
///////////////////////////////REMOVEME REMOVEME REMOVEME when sure !/////
|
|
||||||
abort();
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
mimeType("text/html");
|
mimeType("text/html");
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
@ -342,6 +341,7 @@ bool RecollProtocol::doSearch(const QueryDesc& qd)
|
|||||||
RefCntr<Rcl::SearchData> sdata(sd);
|
RefCntr<Rcl::SearchData> sdata(sd);
|
||||||
sdata->setStemlang("english");
|
sdata->setStemlang("english");
|
||||||
RefCntr<Rcl::Query>query(new Rcl::Query(m_rcldb));
|
RefCntr<Rcl::Query>query(new Rcl::Query(m_rcldb));
|
||||||
|
query->setCollapseDuplicates(prefs.collapseDuplicates);
|
||||||
if (!query->setQuery(sdata)) {
|
if (!query->setQuery(sdata)) {
|
||||||
m_reason = "Query execute failed. Invalid query or syntax error?";
|
m_reason = "Query execute failed. Invalid query or syntax error?";
|
||||||
error(KIO::ERR_SLAVE_DEFINED, m_reason.c_str());
|
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 <qsettings.h>
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
|
|
||||||
|
RclDynConf *g_dynconf;
|
||||||
|
|
||||||
// The table should not be necessary, but I found no css way to get
|
// 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
|
// qt 4.6 qtextedit to clear the margins after the float img without
|
||||||
// introducing blank space.
|
// introducing blank space.
|
||||||
|
|||||||
@ -43,6 +43,9 @@
|
|||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
|
|
||||||
|
#include "dynconf.h"
|
||||||
|
extern RclDynConf *g_dynconf;
|
||||||
|
|
||||||
#ifndef NO_NAMESPACES
|
#ifndef NO_NAMESPACES
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::list;
|
using std::list;
|
||||||
|
|||||||
@ -56,7 +56,6 @@ Rcl::Db *rcldb;
|
|||||||
Aspell *aspell;
|
Aspell *aspell;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RclDynConf *g_dynconf;
|
|
||||||
int recollNeedsExit;
|
int recollNeedsExit;
|
||||||
int startIndexingAfterConfig;
|
int startIndexingAfterConfig;
|
||||||
RclMain *mainWindow;
|
RclMain *mainWindow;
|
||||||
|
|||||||
@ -22,7 +22,6 @@
|
|||||||
#include "rclconfig.h"
|
#include "rclconfig.h"
|
||||||
#include "rcldb.h"
|
#include "rcldb.h"
|
||||||
#include "idxthread.h"
|
#include "idxthread.h"
|
||||||
#include "dynconf.h"
|
|
||||||
|
|
||||||
// Misc declarations in need of sharing between the UI files
|
// Misc declarations in need of sharing between the UI files
|
||||||
|
|
||||||
@ -36,7 +35,6 @@ extern RclConfig *rclconfig;
|
|||||||
extern Rcl::Db *rcldb;
|
extern Rcl::Db *rcldb;
|
||||||
extern int recollNeedsExit;
|
extern int recollNeedsExit;
|
||||||
extern int startIndexingAfterConfig; // 1st startup
|
extern int startIndexingAfterConfig; // 1st startup
|
||||||
extern RclDynConf *g_dynconf;
|
|
||||||
extern void startManual(const string& helpindex);
|
extern void startManual(const string& helpindex);
|
||||||
|
|
||||||
#ifdef RCL_USE_ASPELL
|
#ifdef RCL_USE_ASPELL
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user