|
a/src/kde/kioslave/recoll/kio_recoll.cpp |
|
b/src/kde/kioslave/recoll/kio_recoll.cpp |
|
... |
|
... |
46 |
#include "kio_recoll.h"
|
46 |
#include "kio_recoll.h"
|
47 |
#include "docseqdb.h"
|
47 |
#include "docseqdb.h"
|
48 |
#include "readfile.h"
|
48 |
#include "readfile.h"
|
49 |
#include "smallut.h"
|
49 |
#include "smallut.h"
|
50 |
#include "textsplit.h"
|
50 |
#include "textsplit.h"
|
|
|
51 |
#include "guiutils.h"
|
51 |
|
52 |
|
52 |
using namespace KIO;
|
53 |
using namespace KIO;
|
53 |
|
54 |
|
54 |
RclConfig *RecollProtocol::o_rclconfig;
|
55 |
RclConfig *RecollProtocol::o_rclconfig;
|
55 |
|
56 |
|
|
... |
|
... |
70 |
// configuration building dialog for initial configuration? Or
|
71 |
// configuration building dialog for initial configuration? Or
|
71 |
// do we assume that the QT GUO is always used for this ?
|
72 |
// do we assume that the QT GUO is always used for this ?
|
72 |
m_reason = "No db directory in configuration ??";
|
73 |
m_reason = "No db directory in configuration ??";
|
73 |
return;
|
74 |
return;
|
74 |
}
|
75 |
}
|
|
|
76 |
rwSettings(false);
|
75 |
|
77 |
|
76 |
m_rcldb = new Rcl::Db(o_rclconfig);
|
78 |
m_rcldb = new Rcl::Db(o_rclconfig);
|
77 |
if (!m_rcldb) {
|
79 |
if (!m_rcldb) {
|
78 |
m_reason = "Could not build database object. (out of memory ?)";
|
80 |
m_reason = "Could not build database object. (out of memory ?)";
|
79 |
return;
|
81 |
return;
|
|
... |
|
... |
113 |
return false;
|
115 |
return false;
|
114 |
}
|
116 |
}
|
115 |
return true;
|
117 |
return true;
|
116 |
}
|
118 |
}
|
117 |
|
119 |
|
118 |
// Not sure this is ever used
|
120 |
// This is never called afaik
|
119 |
void RecollProtocol::mimetype(const KUrl &url)
|
121 |
void RecollProtocol::mimetype(const KUrl &url)
|
120 |
{
|
122 |
{
|
121 |
kDebug() << url << endl;
|
123 |
kDebug() << url << endl;
|
122 |
///////////////////////////////REMOVEME REMOVEME REMOVEME when sure !/////
|
|
|
123 |
abort();
|
|
|
124 |
////////////////////////////////////////////////////////////////////////
|
|
|
125 |
mimeType("text/html");
|
124 |
mimeType("text/html");
|
126 |
finished();
|
125 |
finished();
|
127 |
}
|
126 |
}
|
128 |
|
127 |
|
129 |
UrlIngester::UrlIngester(RecollProtocol *p, const KUrl& url)
|
128 |
UrlIngester::UrlIngester(RecollProtocol *p, const KUrl& url)
|
|
... |
|
... |
340 |
}
|
339 |
}
|
341 |
|
340 |
|
342 |
RefCntr<Rcl::SearchData> sdata(sd);
|
341 |
RefCntr<Rcl::SearchData> sdata(sd);
|
343 |
sdata->setStemlang("english");
|
342 |
sdata->setStemlang("english");
|
344 |
RefCntr<Rcl::Query>query(new Rcl::Query(m_rcldb));
|
343 |
RefCntr<Rcl::Query>query(new Rcl::Query(m_rcldb));
|
|
|
344 |
query->setCollapseDuplicates(prefs.collapseDuplicates);
|
345 |
if (!query->setQuery(sdata)) {
|
345 |
if (!query->setQuery(sdata)) {
|
346 |
m_reason = "Query execute failed. Invalid query or syntax error?";
|
346 |
m_reason = "Query execute failed. Invalid query or syntax error?";
|
347 |
error(KIO::ERR_SLAVE_DEFINED, m_reason.c_str());
|
347 |
error(KIO::ERR_SLAVE_DEFINED, m_reason.c_str());
|
348 |
return false;
|
348 |
return false;
|
349 |
}
|
349 |
}
|