got rid of the STD_SHARED_XX std/tr1 defines
This commit is contained in:
parent
eb6465a619
commit
c1d06dd450
65 changed files with 219 additions and 257 deletions
|
@ -1,10 +1,3 @@
|
|||
#define UNORDERED_MAP_INCLUDE <unordered_map>
|
||||
#define UNORDERED_SET_INCLUDE <unordered_set>
|
||||
#define STD_UNORDERED_MAP std::unordered_map
|
||||
#define STD_UNORDERED_SET std::unordered_set
|
||||
#define MEMORY_INCLUDE <memory>
|
||||
#define STD_SHARED_PTR std::shared_ptr
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "safewindows.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <set>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
#include UNORDERED_SET_INCLUDE
|
||||
#include <unordered_set>
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
@ -378,10 +378,10 @@ class RclConfig {
|
|||
static string o_localecharset;
|
||||
// Limiting set of mime types to be processed. Normally empty.
|
||||
ParamStale m_rmtstate;
|
||||
STD_UNORDERED_SET<string> m_restrictMTypes;
|
||||
std::unordered_set<string> m_restrictMTypes;
|
||||
// Exclusion set of mime types. Normally empty
|
||||
ParamStale m_xmtstate;
|
||||
STD_UNORDERED_SET<string> m_excludeMTypes;
|
||||
std::unordered_set<string> m_excludeMTypes;
|
||||
|
||||
vector<pair<int, int> > m_thrConf;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "smallut.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include UNORDERED_MAP_INCLUDE
|
||||
#include <unordered_map>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
}
|
||||
bool ok;
|
||||
// Term to group num
|
||||
STD_UNORDERED_MAP<string, unsigned int> terms;
|
||||
std::unordered_map<string, unsigned int> terms;
|
||||
// Group num to group
|
||||
vector<vector<string> > groups;
|
||||
};
|
||||
|
@ -170,7 +170,7 @@ vector<string> SynGroups::getgroup(const string& term)
|
|||
if (!ok())
|
||||
return ret;
|
||||
|
||||
STD_UNORDERED_MAP<string, unsigned int>::const_iterator it1 =
|
||||
std::unordered_map<string, unsigned int>::const_iterator it1 =
|
||||
m->terms.find(term);
|
||||
if (it1 == m->terms.end()) {
|
||||
LOGDEB1("SynGroups::getgroup: [" << (term) << "] not found in direct map\n" );
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include UNORDERED_SET_INCLUDE
|
||||
#include <unordered_set>
|
||||
|
||||
#include "textsplit.h"
|
||||
#include "log.h"
|
||||
|
@ -62,9 +62,9 @@ static int charclasses[charclasses_size];
|
|||
// management of Unicode properties, but seems to do the job well
|
||||
// enough in most common cases
|
||||
static vector<unsigned int> vpuncblocks;
|
||||
static STD_UNORDERED_SET<unsigned int> spunc;
|
||||
static STD_UNORDERED_SET<unsigned int> visiblewhite;
|
||||
static STD_UNORDERED_SET<unsigned int> sskip;
|
||||
static std::unordered_set<unsigned int> spunc;
|
||||
static std::unordered_set<unsigned int> visiblewhite;
|
||||
static std::unordered_set<unsigned int> sskip;
|
||||
|
||||
class CharClassInit {
|
||||
public:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef TEST_SUBTREELIST
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "cstr.h"
|
||||
#include "rcldb.h"
|
||||
|
@ -38,7 +38,7 @@ bool subtreelist(RclConfig *config, const string& top,
|
|||
}
|
||||
|
||||
Rcl::SearchData *sd = new Rcl::SearchData(Rcl::SCLT_OR, cstr_null);
|
||||
STD_SHARED_PTR<Rcl::SearchData> rq(sd);
|
||||
std::shared_ptr<Rcl::SearchData> rq(sd);
|
||||
|
||||
sd->addClause(new Rcl::SearchDataClausePath(top, false));
|
||||
|
||||
|
|
|
@ -332,8 +332,8 @@ bool RecollProtocol::doSearch(const QueryDesc& qd)
|
|||
return false;
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> sdata(sd);
|
||||
STD_SHARED_PTR<Rcl::Query>query(new Rcl::Query(m_rcldb));
|
||||
std::shared_ptr<Rcl::SearchData> sdata(sd);
|
||||
std::shared_ptr<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?";
|
||||
|
@ -342,12 +342,12 @@ bool RecollProtocol::doSearch(const QueryDesc& qd)
|
|||
}
|
||||
|
||||
DocSequenceDb *src =
|
||||
new DocSequenceDb(STD_SHARED_PTR<Rcl::Query>(query), "Query results", sdata);
|
||||
new DocSequenceDb(std::shared_ptr<Rcl::Query>(query), "Query results", sdata);
|
||||
if (src == 0) {
|
||||
error(KIO::ERR_SLAVE_DEFINED, "Can't build result sequence");
|
||||
return false;
|
||||
}
|
||||
m_source = STD_SHARED_PTR<DocSequence>(src);
|
||||
m_source = std::shared_ptr<DocSequence>(src);
|
||||
// Reset pager in all cases. Costs nothing, stays at page -1 initially
|
||||
// htmldosearch will fetch the first page if needed.
|
||||
m_pager.setDocSource(m_source);
|
||||
|
|
|
@ -32,7 +32,7 @@ using std::string;
|
|||
#include "rcldb.h"
|
||||
#include "reslistpager.h"
|
||||
#include "docseq.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
class RecollProtocol;
|
||||
|
||||
|
@ -181,7 +181,7 @@ class RecollProtocol : public KIO::SlaveBase {
|
|||
// (one slave several konqueror windows) would be to have a small
|
||||
// cache of recent searches kept open.
|
||||
RecollKioPager m_pager;
|
||||
STD_SHARED_PTR<DocSequence> m_source;
|
||||
std::shared_ptr<DocSequence> m_source;
|
||||
// Note: page here is not used, current page always comes from m_pager.
|
||||
QueryDesc m_query;
|
||||
};
|
||||
|
|
|
@ -336,8 +336,8 @@ bool RecollProtocol::doSearch(const QueryDesc& qd)
|
|||
return false;
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> sdata(sd);
|
||||
STD_SHARED_PTR<Rcl::Query>query(new Rcl::Query(m_rcldb));
|
||||
std::shared_ptr<Rcl::SearchData> sdata(sd);
|
||||
std::shared_ptr<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?";
|
||||
|
@ -346,12 +346,12 @@ bool RecollProtocol::doSearch(const QueryDesc& qd)
|
|||
}
|
||||
|
||||
DocSequenceDb *src =
|
||||
new DocSequenceDb(STD_SHARED_PTR<Rcl::Query>(query), "Query results", sdata);
|
||||
new DocSequenceDb(std::shared_ptr<Rcl::Query>(query), "Query results", sdata);
|
||||
if (src == 0) {
|
||||
error(KIO::ERR_SLAVE_DEFINED, u8s2qs("Can't build result sequence"));
|
||||
return false;
|
||||
}
|
||||
m_source = STD_SHARED_PTR<DocSequence>(src);
|
||||
m_source = std::shared_ptr<DocSequence>(src);
|
||||
// Reset pager in all cases. Costs nothing, stays at page -1 initially
|
||||
// htmldosearch will fetch the first page if needed.
|
||||
m_pager.setDocSource(m_source);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "rcldb.h"
|
||||
#include "docseq.h"
|
||||
#include "reslistpager.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
class RecollProtocol;
|
||||
|
||||
|
@ -191,7 +191,7 @@ private:
|
|||
// (one slave several konqueror windows) would be to have a small
|
||||
// cache of recent searches kept open.
|
||||
RecollKioPager m_pager;
|
||||
STD_SHARED_PTR<DocSequence> m_source;
|
||||
std::shared_ptr<DocSequence> m_source;
|
||||
// Note: page here is not used, current page always comes from m_pager.
|
||||
QueryDesc m_query;
|
||||
};
|
||||
|
|
|
@ -131,7 +131,7 @@ PHP_METHOD(Query, query)
|
|||
RETURN_BOOL(false);
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> rq(sd);
|
||||
std::shared_ptr<Rcl::SearchData> rq(sd);
|
||||
Rcl::Query *pRclQuery = new Rcl::Query(pRclDb);
|
||||
pRclQuery->setQuery(rq);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static RclConfig *rclconfig;
|
|||
typedef struct {
|
||||
PyObject_HEAD
|
||||
/* Type-specific fields go here. */
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd;
|
||||
std::shared_ptr<Rcl::SearchData> sd;
|
||||
} recoll_SearchDataObject;
|
||||
|
||||
static void
|
||||
|
@ -108,7 +108,7 @@ SearchData_init(recoll_SearchDataObject *self, PyObject *args, PyObject *kwargs)
|
|||
} else {
|
||||
stemlang = "english";
|
||||
}
|
||||
self->sd = STD_SHARED_PTR<Rcl::SearchData>(new Rcl::SearchData(tp, stemlang));
|
||||
self->sd = std::shared_ptr<Rcl::SearchData>(new Rcl::SearchData(tp, stemlang));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -953,7 +953,7 @@ Query_execute(recoll_QueryObject* self, PyObject *args, PyObject *kwargs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> rq(sd);
|
||||
std::shared_ptr<Rcl::SearchData> rq(sd);
|
||||
self->query->setSortBy(*self->sortfield, self->ascending);
|
||||
self->query->setQuery(rq);
|
||||
int cnt = self->query->getResCnt();
|
||||
|
@ -1221,7 +1221,7 @@ Query_highlight(recoll_QueryObject* self, PyObject *args, PyObject *kwargs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
|
||||
std::shared_ptr<Rcl::SearchData> sd = self->query->getSD();
|
||||
if (!sd) {
|
||||
PyErr_SetString(PyExc_ValueError, "Query not initialized");
|
||||
return 0;
|
||||
|
@ -1272,7 +1272,7 @@ Query_makedocabstract(recoll_QueryObject* self, PyObject *args,PyObject *kwargs)
|
|||
PyErr_SetString(PyExc_AttributeError, "query");
|
||||
return 0;
|
||||
}
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
|
||||
std::shared_ptr<Rcl::SearchData> sd = self->query->getSD();
|
||||
if (!sd) {
|
||||
PyErr_SetString(PyExc_ValueError, "Query not initialized");
|
||||
return 0;
|
||||
|
@ -1328,7 +1328,7 @@ Query_getxquery(recoll_QueryObject* self, PyObject *, PyObject *)
|
|||
PyErr_SetString(PyExc_AttributeError, "query");
|
||||
return 0;
|
||||
}
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
|
||||
std::shared_ptr<Rcl::SearchData> sd = self->query->getSD();
|
||||
if (!sd) {
|
||||
PyErr_SetString(PyExc_ValueError, "Query not initialized");
|
||||
return 0;
|
||||
|
@ -1356,7 +1356,7 @@ Query_getgroups(recoll_QueryObject* self, PyObject *, PyObject *)
|
|||
PyErr_SetString(PyExc_AttributeError, "query");
|
||||
return 0;
|
||||
}
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
|
||||
std::shared_ptr<Rcl::SearchData> sd = self->query->getSD();
|
||||
if (!sd) {
|
||||
PyErr_SetString(PyExc_ValueError, "Query not initialized");
|
||||
return 0;
|
||||
|
|
|
@ -360,7 +360,7 @@ using namespace Rcl;
|
|||
void AdvSearch::runSearch()
|
||||
{
|
||||
string stemLang = prefs.stemlang();
|
||||
STD_SHARED_PTR<SearchData> sdata(new SearchData(conjunctCMB->currentIndex() == 0 ?
|
||||
std::shared_ptr<SearchData> sdata(new SearchData(conjunctCMB->currentIndex() == 0 ?
|
||||
SCLT_AND : SCLT_OR, stemLang));
|
||||
bool hasclause = false;
|
||||
|
||||
|
@ -427,7 +427,7 @@ void AdvSearch::runSearch()
|
|||
if (sdata->getTp() == SCLT_AND) {
|
||||
sdata->addClause(pathclause);
|
||||
} else {
|
||||
STD_SHARED_PTR<SearchData>
|
||||
std::shared_ptr<SearchData>
|
||||
nsdata(new SearchData(SCLT_AND, stemLang));
|
||||
nsdata->addClause(new Rcl::SearchDataClauseSub(sdata));
|
||||
nsdata->addClause(pathclause);
|
||||
|
@ -462,7 +462,7 @@ void AdvSearch::runSearch()
|
|||
|
||||
// Set up fields from existing search data, which must be compatible
|
||||
// with what we can do...
|
||||
void AdvSearch::fromSearch(STD_SHARED_PTR<SearchData> sdata)
|
||||
void AdvSearch::fromSearch(std::shared_ptr<SearchData> sdata)
|
||||
{
|
||||
if (sdata->m_tp == SCLT_OR)
|
||||
conjunctCMB->setCurrentIndex(1);
|
||||
|
@ -560,7 +560,7 @@ void AdvSearch::slotHistoryNext()
|
|||
{
|
||||
if (g_advshistory == 0)
|
||||
return;
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd = g_advshistory->getnewer();
|
||||
std::shared_ptr<Rcl::SearchData> sd = g_advshistory->getnewer();
|
||||
if (!sd)
|
||||
return;
|
||||
fromSearch(sd);
|
||||
|
@ -570,7 +570,7 @@ void AdvSearch::slotHistoryPrev()
|
|||
{
|
||||
if (g_advshistory == 0)
|
||||
return;
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd = g_advshistory->getolder();
|
||||
std::shared_ptr<Rcl::SearchData> sd = g_advshistory->getolder();
|
||||
if (!sd)
|
||||
return;
|
||||
fromSearch(sd);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "searchclause_w.h"
|
||||
#include "recoll.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "searchdata.h"
|
||||
#include "advshist.h"
|
||||
|
||||
|
@ -56,7 +56,7 @@ public slots:
|
|||
virtual void restrictFtCB_toggled(bool);
|
||||
virtual void restrictCtCB_toggled(bool);
|
||||
virtual void runSearch();
|
||||
virtual void fromSearch(STD_SHARED_PTR<Rcl::SearchData> sdata);
|
||||
virtual void fromSearch(std::shared_ptr<Rcl::SearchData> sdata);
|
||||
virtual void browsePB_clicked();
|
||||
virtual void saveFileTypes();
|
||||
virtual void delClause();
|
||||
|
@ -66,7 +66,7 @@ public slots:
|
|||
virtual void slotHistoryPrev();
|
||||
|
||||
signals:
|
||||
void startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool);
|
||||
void startSearch(std::shared_ptr<Rcl::SearchData>, bool);
|
||||
|
||||
private:
|
||||
virtual void init();
|
||||
|
|
|
@ -33,38 +33,38 @@ AdvSearchHist::AdvSearchHist()
|
|||
|
||||
AdvSearchHist::~AdvSearchHist()
|
||||
{
|
||||
for (vector<STD_SHARED_PTR<SearchData> >::iterator it = m_entries.begin();
|
||||
for (vector<std::shared_ptr<SearchData> >::iterator it = m_entries.begin();
|
||||
it != m_entries.end(); it++) {
|
||||
it->reset();
|
||||
}
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> AdvSearchHist::getnewest()
|
||||
std::shared_ptr<Rcl::SearchData> AdvSearchHist::getnewest()
|
||||
{
|
||||
if (m_entries.empty())
|
||||
return STD_SHARED_PTR<Rcl::SearchData>();
|
||||
return std::shared_ptr<Rcl::SearchData>();
|
||||
|
||||
return m_entries[0];
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> AdvSearchHist::getolder()
|
||||
std::shared_ptr<Rcl::SearchData> AdvSearchHist::getolder()
|
||||
{
|
||||
m_current++;
|
||||
if (m_current >= int(m_entries.size())) {
|
||||
m_current--;
|
||||
return STD_SHARED_PTR<Rcl::SearchData>();
|
||||
return std::shared_ptr<Rcl::SearchData>();
|
||||
}
|
||||
return m_entries[m_current];
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> AdvSearchHist::getnewer()
|
||||
std::shared_ptr<Rcl::SearchData> AdvSearchHist::getnewer()
|
||||
{
|
||||
if (m_current == -1 || m_current == 0 || m_entries.empty())
|
||||
return STD_SHARED_PTR<Rcl::SearchData>();
|
||||
return std::shared_ptr<Rcl::SearchData>();
|
||||
return m_entries[--m_current];
|
||||
}
|
||||
|
||||
bool AdvSearchHist::push(STD_SHARED_PTR<SearchData> sd)
|
||||
bool AdvSearchHist::push(std::shared_ptr<SearchData> sd)
|
||||
{
|
||||
m_entries.insert(m_entries.begin(), sd);
|
||||
if (m_current != -1)
|
||||
|
@ -83,7 +83,7 @@ bool AdvSearchHist::read()
|
|||
|
||||
for (list<string>::const_iterator it = lxml.begin(); it != lxml.end();
|
||||
it++) {
|
||||
STD_SHARED_PTR<SearchData> sd = xmlToSearchData(*it);
|
||||
std::shared_ptr<SearchData> sd = xmlToSearchData(*it);
|
||||
if (sd)
|
||||
m_entries.push_back(sd);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "recoll.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "searchdata.h"
|
||||
|
||||
/** Advanced search history.
|
||||
|
@ -44,14 +44,14 @@ public:
|
|||
~AdvSearchHist();
|
||||
|
||||
// Add entry
|
||||
bool push(STD_SHARED_PTR<Rcl::SearchData>);
|
||||
bool push(std::shared_ptr<Rcl::SearchData>);
|
||||
|
||||
// Get latest. does not change state
|
||||
STD_SHARED_PTR<Rcl::SearchData> getnewest();
|
||||
std::shared_ptr<Rcl::SearchData> getnewest();
|
||||
|
||||
// Cursor
|
||||
STD_SHARED_PTR<Rcl::SearchData> getolder();
|
||||
STD_SHARED_PTR<Rcl::SearchData> getnewer();
|
||||
std::shared_ptr<Rcl::SearchData> getolder();
|
||||
std::shared_ptr<Rcl::SearchData> getnewer();
|
||||
|
||||
void clear();
|
||||
|
||||
|
@ -59,7 +59,7 @@ private:
|
|||
bool read();
|
||||
|
||||
int m_current;
|
||||
std::vector<STD_SHARED_PTR<Rcl::SearchData> > m_entries;
|
||||
std::vector<std::shared_ptr<Rcl::SearchData> > m_entries;
|
||||
};
|
||||
|
||||
#endif // _ADVSHIST_H_INCLUDED_
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <qstring.h>
|
||||
#include <qwidget.h>
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
class QHBoxLayout;
|
||||
class QLineEdit;
|
||||
|
@ -65,7 +65,7 @@ namespace confgui {
|
|||
virtual bool set(const std::string& val) = 0;
|
||||
virtual bool get(std::string& val) = 0;
|
||||
};
|
||||
typedef STD_SHARED_PTR<ConfLinkRep> ConfLink;
|
||||
typedef std::shared_ptr<ConfLinkRep> ConfLink;
|
||||
|
||||
// Useful to store/manage data which has no direct representation in
|
||||
// the config, ie list of subkey directories
|
||||
|
|
|
@ -156,7 +156,7 @@ QString PlainToRichQtPreview::curAnchorName() const
|
|||
|
||||
|
||||
ToRichThread::ToRichThread(const string &i, const HighlightData& hd,
|
||||
STD_SHARED_PTR<PlainToRichQtPreview> ptr,
|
||||
std::shared_ptr<PlainToRichQtPreview> ptr,
|
||||
QStringList& qrichlist,
|
||||
QObject *parent)
|
||||
: QThread(parent), m_input(i), m_hdata(hd), m_ptr(ptr), m_output(qrichlist)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include <QThread>
|
||||
#include <QStringList>
|
||||
|
@ -58,7 +58,7 @@ class ToRichThread : public QThread {
|
|||
|
||||
public:
|
||||
ToRichThread(const string &i, const HighlightData& hd,
|
||||
STD_SHARED_PTR<PlainToRichQtPreview> ptr,
|
||||
std::shared_ptr<PlainToRichQtPreview> ptr,
|
||||
QStringList& qrichlst, // Output
|
||||
QObject *parent = 0);
|
||||
virtual void run();
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
private:
|
||||
const string &m_input;
|
||||
const HighlightData &m_hdata;
|
||||
STD_SHARED_PTR<PlainToRichQtPreview> m_ptr;
|
||||
std::shared_ptr<PlainToRichQtPreview> m_ptr;
|
||||
QStringList &m_output;
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include <QComboBox>
|
||||
#include <qvariant.h>
|
||||
|
@ -73,7 +73,7 @@ protected:
|
|||
|
||||
private:
|
||||
Preview *m_preview;
|
||||
STD_SHARED_PTR<PlainToRichQtPreview> m_plaintorich;
|
||||
std::shared_ptr<PlainToRichQtPreview> m_plaintorich;
|
||||
|
||||
bool m_dspflds;
|
||||
string m_url; // filename for this tab
|
||||
|
|
|
@ -57,7 +57,7 @@ void RclMain::saveLastQuery()
|
|||
xml = sSearch->asXML();
|
||||
} else {
|
||||
if (g_advshistory) {
|
||||
STD_SHARED_PTR<Rcl::SearchData> sd;
|
||||
std::shared_ptr<Rcl::SearchData> sd;
|
||||
sd = g_advshistory->getnewest();
|
||||
if (sd) {
|
||||
xml = sd->asXML();
|
||||
|
@ -116,7 +116,7 @@ void RclMain::loadSavedQuery()
|
|||
}
|
||||
|
||||
// Try to parse as SearchData
|
||||
STD_SHARED_PTR<SearchData> sd = xmlToSearchData(xml);
|
||||
std::shared_ptr<SearchData> sd = xmlToSearchData(xml);
|
||||
if (sd) {
|
||||
showAdvSearchDialog();
|
||||
asearchform->fromSearch(sd);
|
||||
|
|
|
@ -66,9 +66,9 @@ void RclMain::viewUrl()
|
|||
// StartNativeViewer needs a db source to call getEnclosing() on.
|
||||
Rcl::Query *query = new Rcl::Query(rcldb);
|
||||
DocSequenceDb *src =
|
||||
new DocSequenceDb(STD_SHARED_PTR<Rcl::Query>(query), "",
|
||||
STD_SHARED_PTR<Rcl::SearchData>(new Rcl::SearchData));
|
||||
m_source = STD_SHARED_PTR<DocSequence>(src);
|
||||
new DocSequenceDb(std::shared_ptr<Rcl::Query>(query), "",
|
||||
std::shared_ptr<Rcl::SearchData>(new Rcl::SearchData));
|
||||
m_source = std::shared_ptr<DocSequence>(src);
|
||||
|
||||
|
||||
// Start a native viewer if the mimetype has one defined, else a
|
||||
|
|
|
@ -49,8 +49,8 @@ void RclMain::showAdvSearchDialog()
|
|||
this, SLOT (fileExit()));
|
||||
|
||||
connect(asearchform,
|
||||
SIGNAL(startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool)),
|
||||
this, SLOT(startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool)));
|
||||
SIGNAL(startSearch(std::shared_ptr<Rcl::SearchData>, bool)),
|
||||
this, SLOT(startSearch(std::shared_ptr<Rcl::SearchData>, bool)));
|
||||
asearchform->show();
|
||||
} else {
|
||||
// Close and reopen, in hope that makes us visible...
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "autoconfig.h"
|
||||
|
||||
#include <utility>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
|
@ -68,20 +68,6 @@
|
|||
#include "rclhelp.h"
|
||||
#include "moc_rclmain_w.cpp"
|
||||
|
||||
/* Qt5 moc expands macros when defining signals. The SIGNAL() macro is
|
||||
a stringification, so it does not expand macros. We have signals
|
||||
where one of the types is a #define (for the variations on
|
||||
std::shared_ptr). In qt5, the connection does not work because the
|
||||
signal string is different between the definition and the connect
|
||||
call, because of the different macro expansion. We have to use
|
||||
another level of macro in Qt5 to force macro expansion, but not in
|
||||
Qt4, so we both define the XSIGNAL and XSLOT macros here, and have
|
||||
ifdefs in the code. What a mess... */
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#define XSIGNAL(X) SIGNAL(X)
|
||||
#define XSLOT(X) SLOT(X)
|
||||
#endif
|
||||
|
||||
using std::pair;
|
||||
|
||||
QString g_stringAllStem, g_stringNoStem;
|
||||
|
@ -307,15 +293,9 @@ void RclMain::init()
|
|||
connect(&m_watcher, SIGNAL(fileChanged(QString)),
|
||||
this, SLOT(updateIdxStatus()));
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
connect(sSearch,
|
||||
XSIGNAL(startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool)),
|
||||
this, XSLOT(startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool)));
|
||||
#else
|
||||
connect(sSearch,
|
||||
SIGNAL(startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool)),
|
||||
this, SLOT(startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool)));
|
||||
#endif
|
||||
SIGNAL(startSearch(std::shared_ptr<Rcl::SearchData>, bool)),
|
||||
this, SLOT(startSearch(std::shared_ptr<Rcl::SearchData>, bool)));
|
||||
connect(sSearch, SIGNAL(clearSearch()),
|
||||
this, SLOT(resetSearch()));
|
||||
connect(preferencesMenu, SIGNAL(triggered(QAction*)),
|
||||
|
@ -383,14 +363,8 @@ void RclMain::init()
|
|||
restable->setRclMain(this, true);
|
||||
connect(actionSaveResultsAsCSV, SIGNAL(triggered()),
|
||||
restable, SLOT(saveAsCSV()));
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
connect(this, XSIGNAL(docSourceChanged(STD_SHARED_PTR<DocSequence>)),
|
||||
restable, XSLOT(setDocSource(STD_SHARED_PTR<DocSequence>)));
|
||||
#else
|
||||
connect(this, SIGNAL(docSourceChanged(STD_SHARED_PTR<DocSequence>)),
|
||||
restable, SLOT(setDocSource(STD_SHARED_PTR<DocSequence>)));
|
||||
#endif
|
||||
|
||||
connect(this, SIGNAL(docSourceChanged(std::shared_ptr<DocSequence>)),
|
||||
restable, SLOT(setDocSource(std::shared_ptr<DocSequence>)));
|
||||
connect(this, SIGNAL(searchReset()),
|
||||
restable, SLOT(resetSource()));
|
||||
connect(this, SIGNAL(resultsReady()),
|
||||
|
@ -419,13 +393,8 @@ void RclMain::init()
|
|||
this, SLOT(showSnippets(Rcl::Doc)));
|
||||
|
||||
reslist->setRclMain(this, true);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
connect(this, XSIGNAL(docSourceChanged(STD_SHARED_PTR<DocSequence>)),
|
||||
reslist, XSLOT(setDocSource(STD_SHARED_PTR<DocSequence>)));
|
||||
#else
|
||||
connect(this, SIGNAL(docSourceChanged(STD_SHARED_PTR<DocSequence>)),
|
||||
reslist, SLOT(setDocSource(STD_SHARED_PTR<DocSequence>)));
|
||||
#endif
|
||||
connect(this, SIGNAL(docSourceChanged(std::shared_ptr<DocSequence>)),
|
||||
reslist, SLOT(setDocSource(std::shared_ptr<DocSequence>)));
|
||||
connect(firstPageAction, SIGNAL(triggered()),
|
||||
reslist, SLOT(resultPageFirst()));
|
||||
connect(prevPageAction, SIGNAL(triggered()),
|
||||
|
@ -694,7 +663,7 @@ void RclMain::fileExit()
|
|||
}
|
||||
|
||||
// Start a db query and set the reslist docsource
|
||||
void RclMain::startSearch(STD_SHARED_PTR<Rcl::SearchData> sdata, bool issimple)
|
||||
void RclMain::startSearch(std::shared_ptr<Rcl::SearchData> sdata, bool issimple)
|
||||
{
|
||||
LOGDEB("RclMain::startSearch. Indexing " << (m_idxproc?"on":"off") << " Active " << (m_queryActive) << "\n" );
|
||||
if (m_queryActive) {
|
||||
|
@ -703,7 +672,7 @@ void RclMain::startSearch(STD_SHARED_PTR<Rcl::SearchData> sdata, bool issimple)
|
|||
}
|
||||
m_queryActive = true;
|
||||
restable->setEnabled(false);
|
||||
m_source = STD_SHARED_PTR<DocSequence>();
|
||||
m_source = std::shared_ptr<DocSequence>();
|
||||
|
||||
m_searchIsSimple = issimple;
|
||||
|
||||
|
@ -733,11 +702,11 @@ void RclMain::startSearch(STD_SHARED_PTR<Rcl::SearchData> sdata, bool issimple)
|
|||
|
||||
curPreview = 0;
|
||||
DocSequenceDb *src =
|
||||
new DocSequenceDb(STD_SHARED_PTR<Rcl::Query>(query),
|
||||
new DocSequenceDb(std::shared_ptr<Rcl::Query>(query),
|
||||
string(tr("Query results").toUtf8()), sdata);
|
||||
src->setAbstractParams(prefs.queryBuildAbstract,
|
||||
prefs.queryReplaceAbstract);
|
||||
m_source = STD_SHARED_PTR<DocSequence>(src);
|
||||
m_source = std::shared_ptr<DocSequence>(src);
|
||||
m_source->setSortSpec(m_sortspec);
|
||||
m_source->setFiltSpec(m_filtspec);
|
||||
|
||||
|
@ -747,9 +716,9 @@ void RclMain::startSearch(STD_SHARED_PTR<Rcl::SearchData> sdata, bool issimple)
|
|||
}
|
||||
|
||||
class QueryThread : public QThread {
|
||||
STD_SHARED_PTR<DocSequence> m_source;
|
||||
std::shared_ptr<DocSequence> m_source;
|
||||
public:
|
||||
QueryThread(STD_SHARED_PTR<DocSequence> source)
|
||||
QueryThread(std::shared_ptr<DocSequence> source)
|
||||
: m_source(source)
|
||||
{
|
||||
}
|
||||
|
@ -961,8 +930,8 @@ void RclMain::showSubDocs(Rcl::Doc doc)
|
|||
new DocSequenceDocs(rcldb, docs,
|
||||
qs2utf8s(tr("Sub-documents and attachments")));
|
||||
src->setDescription(qs2utf8s(tr("Sub-documents and attachments")));
|
||||
STD_SHARED_PTR<DocSequence>
|
||||
source(new DocSource(theconfig, STD_SHARED_PTR<DocSequence>(src)));
|
||||
std::shared_ptr<DocSequence>
|
||||
source(new DocSource(theconfig, std::shared_ptr<DocSequence>(src)));
|
||||
|
||||
ResTable *res = new ResTable();
|
||||
res->setRclMain(this, false);
|
||||
|
@ -1003,7 +972,7 @@ void RclMain::showDocHistory()
|
|||
{
|
||||
LOGDEB("RclMain::showDocHistory\n" );
|
||||
emit searchReset();
|
||||
m_source = STD_SHARED_PTR<DocSequence>();
|
||||
m_source = std::shared_ptr<DocSequence>();
|
||||
curPreview = 0;
|
||||
|
||||
string reason;
|
||||
|
@ -1012,8 +981,8 @@ void RclMain::showDocHistory()
|
|||
return;
|
||||
}
|
||||
// Construct a bogus SearchData structure
|
||||
STD_SHARED_PTR<Rcl::SearchData>searchdata =
|
||||
STD_SHARED_PTR<Rcl::SearchData>(new Rcl::SearchData(Rcl::SCLT_AND, cstr_null));
|
||||
std::shared_ptr<Rcl::SearchData>searchdata =
|
||||
std::shared_ptr<Rcl::SearchData>(new Rcl::SearchData(Rcl::SCLT_AND, cstr_null));
|
||||
searchdata->setDescription((const char *)tr("History data").toUtf8());
|
||||
|
||||
|
||||
|
@ -1022,8 +991,8 @@ void RclMain::showDocHistory()
|
|||
new DocSequenceHistory(rcldb, g_dynconf,
|
||||
string(tr("Document history").toUtf8()));
|
||||
src->setDescription((const char *)tr("History data").toUtf8());
|
||||
DocSource *source = new DocSource(theconfig, STD_SHARED_PTR<DocSequence>(src));
|
||||
m_source = STD_SHARED_PTR<DocSequence>(source);
|
||||
DocSource *source = new DocSource(theconfig, std::shared_ptr<DocSequence>(src));
|
||||
m_source = std::shared_ptr<DocSequence>(source);
|
||||
m_source->setSortSpec(m_sortspec);
|
||||
m_source->setFiltSpec(m_filtspec);
|
||||
emit docSourceChanged(m_source);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "rcldb.h"
|
||||
#include "searchdata.h"
|
||||
#include "spell_w.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "pathut.h"
|
||||
#include "guiutils.h"
|
||||
|
||||
|
@ -123,7 +123,7 @@ public slots:
|
|||
virtual void toggleIndexing();
|
||||
virtual void rebuildIndex();
|
||||
virtual void specialIndex();
|
||||
virtual void startSearch(STD_SHARED_PTR<Rcl::SearchData> sdata,
|
||||
virtual void startSearch(std::shared_ptr<Rcl::SearchData> sdata,
|
||||
bool issimple);
|
||||
virtual void previewClosed(Preview *w);
|
||||
virtual void showAdvSearchDialog();
|
||||
|
@ -189,7 +189,7 @@ private slots:
|
|||
virtual void updateIdxStatus();
|
||||
virtual void onWebcacheDestroyed(QObject *);
|
||||
signals:
|
||||
void docSourceChanged(STD_SHARED_PTR<DocSequence>);
|
||||
void docSourceChanged(std::shared_ptr<DocSequence>);
|
||||
void stemLangChanged(const QString& lang);
|
||||
void sortDataChanged(DocSeqSortSpec);
|
||||
void resultsReady();
|
||||
|
@ -233,7 +233,7 @@ private:
|
|||
DocSeqFiltSpec m_filtspec;
|
||||
bool m_sortspecnochange;
|
||||
DocSeqSortSpec m_sortspec;
|
||||
STD_SHARED_PTR<DocSequence> m_source;
|
||||
std::shared_ptr<DocSequence> m_source;
|
||||
IndexerState m_indexerState;
|
||||
bool m_queryActive;
|
||||
bool m_firstIndexing;
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "pathut.h"
|
||||
#include "mimehandler.h"
|
||||
#include "plaintorich.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "internfile.h"
|
||||
#include "indexer.h"
|
||||
#include "snippets_w.h"
|
||||
|
@ -421,10 +421,10 @@ int ResList::newListId()
|
|||
|
||||
extern "C" int XFlush(void *);
|
||||
|
||||
void ResList::setDocSource(STD_SHARED_PTR<DocSequence> nsource)
|
||||
void ResList::setDocSource(std::shared_ptr<DocSequence> nsource)
|
||||
{
|
||||
LOGDEB("ResList::setDocSource()\n" );
|
||||
m_source = STD_SHARED_PTR<DocSequence>(new DocSource(theconfig, nsource));
|
||||
m_source = std::shared_ptr<DocSequence>(new DocSource(theconfig, nsource));
|
||||
}
|
||||
|
||||
// A query was executed, or the filtering/sorting parameters changed,
|
||||
|
@ -447,7 +447,7 @@ void ResList::readDocSource()
|
|||
void ResList::resetList()
|
||||
{
|
||||
LOGDEB("ResList::resetList()\n" );
|
||||
setDocSource(STD_SHARED_PTR<DocSequence>());
|
||||
setDocSource(std::shared_ptr<DocSequence>());
|
||||
resetView();
|
||||
}
|
||||
|
||||
|
@ -900,7 +900,7 @@ void ResList::linkWasClicked(const QUrl &url)
|
|||
LOGERR("ResList::linkWasClicked: can't get doc for " << (i) << "\n" );
|
||||
return;
|
||||
}
|
||||
emit editRequested(ResultPopup::getParent(STD_SHARED_PTR<DocSequence>(),
|
||||
emit editRequested(ResultPopup::getParent(std::shared_ptr<DocSequence>(),
|
||||
doc));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "docseq.h"
|
||||
#include "sortseq.h"
|
||||
#include "filtseq.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "rcldoc.h"
|
||||
#include "reslistpager.h"
|
||||
|
||||
|
@ -66,7 +66,7 @@ class ResList : public RESLIST_PARENTCLASS
|
|||
void setRclMain(RclMain *m, bool ismain);
|
||||
|
||||
public slots:
|
||||
virtual void setDocSource(STD_SHARED_PTR<DocSequence> nsource);
|
||||
virtual void setDocSource(std::shared_ptr<DocSequence> nsource);
|
||||
virtual void resetList(); // Erase current list
|
||||
virtual void resPageUpOrBack(); // Page up pressed
|
||||
virtual void resPageDownOrNext(); // Page down pressed
|
||||
|
@ -118,7 +118,7 @@ class ResList : public RESLIST_PARENTCLASS
|
|||
|
||||
private:
|
||||
QtGuiResListPager *m_pager;
|
||||
STD_SHARED_PTR<DocSequence> m_source;
|
||||
std::shared_ptr<DocSequence> m_source;
|
||||
int m_popDoc; // Docnum for the popup menu.
|
||||
int m_curPvDoc;// Docnum for current preview
|
||||
int m_lstClckMod; // Last click modifier.
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
namespace ResultPopup {
|
||||
|
||||
QMenu *create(QWidget *me, int opts, STD_SHARED_PTR<DocSequence> source, Rcl::Doc& doc)
|
||||
QMenu *create(QWidget *me, int opts, std::shared_ptr<DocSequence> source, Rcl::Doc& doc)
|
||||
{
|
||||
QMenu *popup = new QMenu(me);
|
||||
|
||||
|
@ -134,7 +134,7 @@ QMenu *create(QWidget *me, int opts, STD_SHARED_PTR<DocSequence> source, Rcl::Do
|
|||
return popup;
|
||||
}
|
||||
|
||||
Rcl::Doc getParent(STD_SHARED_PTR<DocSequence> source, Rcl::Doc& doc)
|
||||
Rcl::Doc getParent(std::shared_ptr<DocSequence> source, Rcl::Doc& doc)
|
||||
{
|
||||
Rcl::Doc pdoc;
|
||||
if (!source || !source->getEnclosing(doc, pdoc)) {
|
||||
|
|
|
@ -22,9 +22,9 @@ namespace ResultPopup {
|
|||
enum Options {showExpand = 0x1, showSubs = 0x2, isMain = 0x3,
|
||||
showSaveOne = 0x4, showSaveSel = 0x8};
|
||||
extern QMenu *create(QWidget *me, int opts,
|
||||
STD_SHARED_PTR<DocSequence> source,
|
||||
std::shared_ptr<DocSequence> source,
|
||||
Rcl::Doc& doc);
|
||||
extern Rcl::Doc getParent(STD_SHARED_PTR<DocSequence> source,
|
||||
extern Rcl::Doc getParent(std::shared_ptr<DocSequence> source,
|
||||
Rcl::Doc& doc);
|
||||
extern void copyFN(const Rcl::Doc &doc);
|
||||
extern void copyURL(const Rcl::Doc &doc);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <QMessageBox>
|
||||
|
||||
#include "recoll.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "docseq.h"
|
||||
#include "log.h"
|
||||
#include "restable.h"
|
||||
|
@ -290,13 +290,13 @@ void RecollModel::readDocSource()
|
|||
endResetModel();
|
||||
}
|
||||
|
||||
void RecollModel::setDocSource(STD_SHARED_PTR<DocSequence> nsource)
|
||||
void RecollModel::setDocSource(std::shared_ptr<DocSequence> nsource)
|
||||
{
|
||||
LOGDEB("RecollModel::setDocSource\n" );
|
||||
if (!nsource) {
|
||||
m_source = STD_SHARED_PTR<DocSequence>();
|
||||
m_source = std::shared_ptr<DocSequence>();
|
||||
} else {
|
||||
m_source = STD_SHARED_PTR<DocSequence>(new DocSource(theconfig, nsource));
|
||||
m_source = std::shared_ptr<DocSequence>(new DocSource(theconfig, nsource));
|
||||
m_hdata.clear();
|
||||
m_source->getTerms(m_hdata);
|
||||
}
|
||||
|
@ -661,7 +661,7 @@ void ResTable::takeFocus()
|
|||
tableView->setFocus(Qt::ShortcutFocusReason);
|
||||
}
|
||||
|
||||
void ResTable::setDocSource(STD_SHARED_PTR<DocSequence> nsource)
|
||||
void ResTable::setDocSource(std::shared_ptr<DocSequence> nsource)
|
||||
{
|
||||
LOGDEB("ResTable::setDocSource\n" );
|
||||
if (m_model)
|
||||
|
@ -676,7 +676,7 @@ void ResTable::setDocSource(STD_SHARED_PTR<DocSequence> nsource)
|
|||
void ResTable::resetSource()
|
||||
{
|
||||
LOGDEB("ResTable::resetSource\n" );
|
||||
setDocSource(STD_SHARED_PTR<DocSequence>());
|
||||
setDocSource(std::shared_ptr<DocSequence>());
|
||||
}
|
||||
|
||||
void ResTable::saveAsCSV()
|
||||
|
@ -777,7 +777,7 @@ void ResTable::linkWasClicked(const QUrl &url)
|
|||
// Open parent folder
|
||||
case 'F':
|
||||
{
|
||||
emit editRequested(ResultPopup::getParent(STD_SHARED_PTR<DocSequence>(),
|
||||
emit editRequested(ResultPopup::getParent(std::shared_ptr<DocSequence>(),
|
||||
m_detaildoc));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "ui_restable.h"
|
||||
#include "docseq.h"
|
||||
|
@ -51,8 +51,8 @@ public:
|
|||
virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
// Specific methods
|
||||
virtual void readDocSource();
|
||||
virtual void setDocSource(STD_SHARED_PTR<DocSequence> nsource);
|
||||
virtual STD_SHARED_PTR<DocSequence> getDocSource() {return m_source;}
|
||||
virtual void setDocSource(std::shared_ptr<DocSequence> nsource);
|
||||
virtual std::shared_ptr<DocSequence> getDocSource() {return m_source;}
|
||||
virtual void deleteColumn(int);
|
||||
virtual const std::vector<std::string>& getFields() {return m_fields;}
|
||||
virtual const std::map<std::string, QString>& getAllFields()
|
||||
|
@ -73,7 +73,7 @@ signals:
|
|||
void sortDataChanged(DocSeqSortSpec);
|
||||
|
||||
private:
|
||||
mutable STD_SHARED_PTR<DocSequence> m_source;
|
||||
mutable std::shared_ptr<DocSequence> m_source;
|
||||
std::vector<std::string> m_fields;
|
||||
std::vector<FieldGetter*> m_getters;
|
||||
static std::map<std::string, QString> o_displayableFields;
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
public slots:
|
||||
virtual void onTableView_currentChanged(const QModelIndex&);
|
||||
virtual void on_tableView_entered(const QModelIndex& index);
|
||||
virtual void setDocSource(STD_SHARED_PTR<DocSequence> nsource);
|
||||
virtual void setDocSource(std::shared_ptr<DocSequence> nsource);
|
||||
virtual void saveColState();
|
||||
virtual void resetSource();
|
||||
virtual void readDocSource(bool resetPos = true);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
@ -33,7 +33,7 @@ class SnippetsW : public QWidget, public Ui::Snippets
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SnippetsW(Rcl::Doc doc, STD_SHARED_PTR<DocSequence> source, QWidget* parent = 0)
|
||||
SnippetsW(Rcl::Doc doc, std::shared_ptr<DocSequence> source, QWidget* parent = 0)
|
||||
: QWidget(parent), m_doc(doc), m_source(source)
|
||||
{
|
||||
setupUi((QDialog*)this);
|
||||
|
@ -52,7 +52,7 @@ signals:
|
|||
private:
|
||||
void init();
|
||||
Rcl::Doc m_doc;
|
||||
STD_SHARED_PTR<DocSequence> m_source;
|
||||
std::shared_ptr<DocSequence> m_source;
|
||||
};
|
||||
|
||||
#endif /* _SNIPPETS_W_H_INCLUDED_ */
|
||||
|
|
|
@ -362,7 +362,7 @@ void SpellW::showStats()
|
|||
string reason;
|
||||
string q = string("mime:") + *it;
|
||||
Rcl::SearchData *sd = wasaStringToRcl(theconfig, "", q, reason);
|
||||
STD_SHARED_PTR<Rcl::SearchData> rq(sd);
|
||||
std::shared_ptr<Rcl::SearchData> rq(sd);
|
||||
Rcl::Query query(rcldb);
|
||||
if (!query.setQuery(rq)) {
|
||||
LOGERR("Query setup failed: " << (query.getReason()) << "" );
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <sstream>
|
||||
#include <set>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qinputdialog.h>
|
||||
|
@ -309,7 +309,7 @@ bool SSearch::startSimpleSearch(const string& u8, int maxexp)
|
|||
m_xml = xml.str();
|
||||
LOGDEB("SSearch::startSimpleSearch:xml:[" << (m_xml) << "]\n" );
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> rsdata(sdata);
|
||||
std::shared_ptr<Rcl::SearchData> rsdata(sdata);
|
||||
emit startSearch(rsdata, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class QTimer;
|
|||
|
||||
#include "recoll.h"
|
||||
#include "searchdata.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "ui_ssearchb.h"
|
||||
|
||||
|
@ -73,7 +73,7 @@ public slots:
|
|||
virtual void takeFocus();
|
||||
|
||||
signals:
|
||||
void startSearch(STD_SHARED_PTR<Rcl::SearchData>, bool);
|
||||
void startSearch(std::shared_ptr<Rcl::SearchData>, bool);
|
||||
void clearSearch();
|
||||
private:
|
||||
bool m_escape;
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include MEMORY_INCLUDE
|
||||
#include UNORDERED_MAP_INCLUDE
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define USING_STD_REGEX
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
class WebcacheModelInternal {
|
||||
public:
|
||||
STD_SHARED_PTR<BeagleQueueCache> cache;
|
||||
std::shared_ptr<BeagleQueueCache> cache;
|
||||
vector<CEnt> all;
|
||||
vector<CEnt> disp;
|
||||
};
|
||||
|
@ -81,7 +81,7 @@ WebcacheModel::~WebcacheModel()
|
|||
void WebcacheModel::reload()
|
||||
{
|
||||
m->cache =
|
||||
STD_SHARED_PTR<BeagleQueueCache>(new BeagleQueueCache(theconfig));
|
||||
std::shared_ptr<BeagleQueueCache>(new BeagleQueueCache(theconfig));
|
||||
m->all.clear();
|
||||
m->disp.clear();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "ui_webcache.h"
|
||||
|
||||
|
|
|
@ -60,12 +60,12 @@
|
|||
* </SD>
|
||||
*/
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "searchdata.h"
|
||||
|
||||
// Parsing XML from advanced search history or saved advanced search to to
|
||||
// SearchData structure:
|
||||
STD_SHARED_PTR<Rcl::SearchData> xmlToSearchData(const string& xml);
|
||||
std::shared_ptr<Rcl::SearchData> xmlToSearchData(const string& xml);
|
||||
|
||||
// Parsing XML from saved simple search to ssearch parameters
|
||||
struct SSearchDef {
|
||||
|
|
|
@ -82,7 +82,7 @@ bool DocSource::buildStack()
|
|||
} else {
|
||||
if (m_fspec.isNotNull()) {
|
||||
m_seq =
|
||||
STD_SHARED_PTR<DocSequence>(new DocSeqFiltered(m_config, m_seq, m_fspec));
|
||||
std::shared_ptr<DocSequence>(new DocSeqFiltered(m_config, m_seq, m_fspec));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ bool DocSource::buildStack()
|
|||
}
|
||||
} else {
|
||||
if (m_sspec.isNotNull()) {
|
||||
m_seq = STD_SHARED_PTR<DocSequence>(new DocSeqSorted(m_seq, m_sspec));
|
||||
m_seq = std::shared_ptr<DocSequence>(new DocSeqSorted(m_seq, m_sspec));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -155,7 +155,7 @@ class DocSequence {
|
|||
virtual bool canSort() {return false;}
|
||||
virtual bool setFiltSpec(const DocSeqFiltSpec &) {return false;}
|
||||
virtual bool setSortSpec(const DocSeqSortSpec &) {return false;}
|
||||
virtual STD_SHARED_PTR<DocSequence> getSourceSeq() {return STD_SHARED_PTR<DocSequence>();}
|
||||
virtual std::shared_ptr<DocSequence> getSourceSeq() {return std::shared_ptr<DocSequence>();}
|
||||
|
||||
static void set_translations(const std::string& sort, const std::string& filt)
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ protected:
|
|||
*/
|
||||
class DocSeqModifier : public DocSequence {
|
||||
public:
|
||||
DocSeqModifier(STD_SHARED_PTR<DocSequence> iseq)
|
||||
DocSeqModifier(std::shared_ptr<DocSequence> iseq)
|
||||
: DocSequence(""), m_seq(iseq)
|
||||
{}
|
||||
virtual ~DocSeqModifier() {}
|
||||
|
@ -241,7 +241,7 @@ public:
|
|||
{
|
||||
return m_seq->title();
|
||||
}
|
||||
virtual STD_SHARED_PTR<DocSequence> getSourceSeq()
|
||||
virtual std::shared_ptr<DocSequence> getSourceSeq()
|
||||
{
|
||||
return m_seq;
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ protected:
|
|||
return m_seq->getDb();
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<DocSequence> m_seq;
|
||||
std::shared_ptr<DocSequence> m_seq;
|
||||
};
|
||||
|
||||
class RclConfig;
|
||||
|
@ -263,7 +263,7 @@ class RclConfig;
|
|||
// sorting and filtering in ways depending on the base seqs capabilities
|
||||
class DocSource : public DocSeqModifier {
|
||||
public:
|
||||
DocSource(RclConfig *config, STD_SHARED_PTR<DocSequence> iseq)
|
||||
DocSource(RclConfig *config, std::shared_ptr<DocSequence> iseq)
|
||||
: DocSeqModifier(iseq), m_config(config)
|
||||
{}
|
||||
virtual bool canFilter() {return true;}
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
using std::list;
|
||||
|
||||
DocSequenceDb::DocSequenceDb(STD_SHARED_PTR<Rcl::Query> q, const string &t,
|
||||
STD_SHARED_PTR<Rcl::SearchData> sdata)
|
||||
DocSequenceDb::DocSequenceDb(std::shared_ptr<Rcl::Query> q, const string &t,
|
||||
std::shared_ptr<Rcl::SearchData> sdata)
|
||||
: DocSequence(t), m_q(q), m_sdata(sdata), m_fsdata(sdata),
|
||||
m_rescnt(-1),
|
||||
m_queryBuildAbstract(true),
|
||||
|
@ -164,7 +164,7 @@ bool DocSequenceDb::setFiltSpec(const DocSeqFiltSpec &fs)
|
|||
std::unique_lock<std::mutex> locker(o_dblock);
|
||||
if (fs.isNotNull()) {
|
||||
// We build a search spec by adding a filtering layer to the base one.
|
||||
m_fsdata = STD_SHARED_PTR<Rcl::SearchData>(
|
||||
m_fsdata = std::shared_ptr<Rcl::SearchData>(
|
||||
new Rcl::SearchData(Rcl::SCLT_AND, m_sdata->getStemLang()));
|
||||
Rcl::SearchDataClauseSub *cl =
|
||||
new Rcl::SearchDataClauseSub(m_sdata);
|
||||
|
@ -188,7 +188,7 @@ bool DocSequenceDb::setFiltSpec(const DocSeqFiltSpec &fs)
|
|||
if (sd) {
|
||||
Rcl::SearchDataClauseSub *cl1 =
|
||||
new Rcl::SearchDataClauseSub(
|
||||
STD_SHARED_PTR<Rcl::SearchData>(sd));
|
||||
std::shared_ptr<Rcl::SearchData>(sd));
|
||||
m_fsdata->addClause(cl1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef _DOCSEQDB_H_INCLUDED_
|
||||
#define _DOCSEQDB_H_INCLUDED_
|
||||
#include "docseq.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "searchdata.h"
|
||||
#include "rclquery.h"
|
||||
|
@ -25,8 +25,8 @@
|
|||
/** A DocSequence from a Db query */
|
||||
class DocSequenceDb : public DocSequence {
|
||||
public:
|
||||
DocSequenceDb(STD_SHARED_PTR<Rcl::Query> q, const string &t,
|
||||
STD_SHARED_PTR<Rcl::SearchData> sdata);
|
||||
DocSequenceDb(std::shared_ptr<Rcl::Query> q, const string &t,
|
||||
std::shared_ptr<Rcl::SearchData> sdata);
|
||||
virtual ~DocSequenceDb() {}
|
||||
virtual bool getDoc(int num, Rcl::Doc &doc, string * = 0);
|
||||
virtual int getResCnt();
|
||||
|
@ -60,9 +60,9 @@ class DocSequenceDb : public DocSequence {
|
|||
protected:
|
||||
virtual Rcl::Db *getDb();
|
||||
private:
|
||||
STD_SHARED_PTR<Rcl::Query> m_q;
|
||||
STD_SHARED_PTR<Rcl::SearchData> m_sdata;
|
||||
STD_SHARED_PTR<Rcl::SearchData> m_fsdata; // Filtered
|
||||
std::shared_ptr<Rcl::Query> m_q;
|
||||
std::shared_ptr<Rcl::SearchData> m_sdata;
|
||||
std::shared_ptr<Rcl::SearchData> m_fsdata; // Filtered
|
||||
int m_rescnt;
|
||||
bool m_queryBuildAbstract;
|
||||
bool m_queryReplaceAbstract;
|
||||
|
|
|
@ -46,7 +46,7 @@ static bool filter(const DocSeqFiltSpec& fs, const Rcl::Doc *x)
|
|||
return false;
|
||||
}
|
||||
|
||||
DocSeqFiltered::DocSeqFiltered(RclConfig *conf, STD_SHARED_PTR<DocSequence> iseq,
|
||||
DocSeqFiltered::DocSeqFiltered(RclConfig *conf, std::shared_ptr<DocSequence> iseq,
|
||||
DocSeqFiltSpec &filtspec)
|
||||
: DocSeqModifier(iseq), m_config(conf)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "docseq.h"
|
||||
|
||||
|
@ -32,7 +32,7 @@ class RclConfig;
|
|||
*/
|
||||
class DocSeqFiltered : public DocSeqModifier {
|
||||
public:
|
||||
DocSeqFiltered(RclConfig *conf, STD_SHARED_PTR<DocSequence> iseq,
|
||||
DocSeqFiltered(RclConfig *conf, std::shared_ptr<DocSequence> iseq,
|
||||
DocSeqFiltSpec &filtspec);
|
||||
virtual ~DocSeqFiltered() {}
|
||||
virtual bool canFilter() {return true;}
|
||||
|
|
|
@ -342,7 +342,7 @@ endopts:
|
|||
return 1;
|
||||
}
|
||||
|
||||
STD_SHARED_PTR<Rcl::SearchData> rq(sd);
|
||||
std::shared_ptr<Rcl::SearchData> rq(sd);
|
||||
Rcl::Query query(&rcldb);
|
||||
if (op_flags & OPT_S) {
|
||||
query.setSortBy(sortfield, (op_flags & OPT_D) ? false : true);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "autoconfig.h"
|
||||
|
||||
#include <vector>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "docseq.h"
|
||||
#include "hldata.h"
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
{
|
||||
m_hiliter = ptr;
|
||||
}
|
||||
void setDocSource(STD_SHARED_PTR<DocSequence> src, int winfirst = -1)
|
||||
void setDocSource(std::shared_ptr<DocSequence> src, int winfirst = -1)
|
||||
{
|
||||
m_pagesize = m_newpagesize;
|
||||
m_winfirst = winfirst;
|
||||
|
@ -129,7 +129,7 @@ private:
|
|||
int m_winfirst;
|
||||
bool m_hasNext;
|
||||
PlainToRich *m_hiliter;
|
||||
STD_SHARED_PTR<DocSequence> m_docSource;
|
||||
std::shared_ptr<DocSequence> m_docSource;
|
||||
std::vector<ResListEntry> m_respage;
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "docseq.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
class DocSeqSorted : public DocSeqModifier {
|
||||
public:
|
||||
DocSeqSorted(STD_SHARED_PTR<DocSequence> iseq, DocSeqSortSpec &sortspec)
|
||||
DocSeqSorted(std::shared_ptr<DocSequence> iseq, DocSeqSortSpec &sortspec)
|
||||
: DocSeqModifier(iseq)
|
||||
{
|
||||
setSortSpec(sortspec);
|
||||
|
|
|
@ -65,7 +65,7 @@ static void addSubQuery(WasaParserDriver *d,
|
|||
{
|
||||
if (sd && sq)
|
||||
sd->addClause(
|
||||
new Rcl::SearchDataClauseSub(STD_SHARED_PTR<Rcl::SearchData>(sq)));
|
||||
new Rcl::SearchDataClauseSub(std::shared_ptr<Rcl::SearchData>(sq)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "log.h"
|
||||
#include "utf8iter.h"
|
||||
|
@ -57,9 +57,9 @@ bool createExpansionDbs(Xapian::WritableDatabase& wdb,
|
|||
vector<XapWritableComputableSynFamMember> stemdbs;
|
||||
// Note: tried to make this to work with stack-allocated objects, couldn't.
|
||||
// Looks like a bug in copy constructors somewhere, can't guess where
|
||||
vector<STD_SHARED_PTR<SynTermTransStem> > stemmers;
|
||||
vector<std::shared_ptr<SynTermTransStem> > stemmers;
|
||||
for (unsigned int i = 0; i < langs.size(); i++) {
|
||||
stemmers.push_back(STD_SHARED_PTR<SynTermTransStem>
|
||||
stemmers.push_back(std::shared_ptr<SynTermTransStem>
|
||||
(new SynTermTransStem(langs[i])));
|
||||
stemdbs.push_back(
|
||||
XapWritableComputableSynFamMember(wdb, synFamStem, langs[i],
|
||||
|
|
|
@ -357,7 +357,7 @@ int Query::Native::makeAbstract(Xapian::docid docid,
|
|||
map<unsigned int, string> sparseDoc;
|
||||
// Also remember apart the search term positions so that we can list
|
||||
// them with their snippets.
|
||||
STD_UNORDERED_SET<unsigned int> searchTermPositions;
|
||||
std::unordered_set<unsigned int> searchTermPositions;
|
||||
|
||||
// Remember max position. Used to stop walking positions lists while
|
||||
// populating the adjacent slots.
|
||||
|
|
|
@ -572,7 +572,7 @@ bool Db::Native::addOrUpdateWrite(const string& udi, const string& uniterm,
|
|||
Chrono chron;
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
#endif
|
||||
STD_SHARED_PTR<Xapian::Document> doc_cleaner(newdocument_ptr);
|
||||
std::shared_ptr<Xapian::Document> doc_cleaner(newdocument_ptr);
|
||||
|
||||
// Check file system full every mbyte of indexed text. It's a bit wasteful
|
||||
// to do this after having prepared the document, but it needs to be in
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "cstr.h"
|
||||
#include "rcldoc.h"
|
||||
|
|
|
@ -70,7 +70,7 @@ bool Db::docDups(const Doc& idoc, vector<Doc>& odocs)
|
|||
MD5HexPrint(digest, md5);
|
||||
|
||||
SearchData *sdp = new SearchData();
|
||||
STD_SHARED_PTR<SearchData> sd(sdp);
|
||||
std::shared_ptr<SearchData> sd(sdp);
|
||||
SearchDataClauseSimple *sdc =
|
||||
new SearchDataClauseSimple(SCLT_AND, md5, "rclmd5");
|
||||
sdc->addModifier(SearchDataClause::SDCM_CASESENS);
|
||||
|
|
|
@ -173,7 +173,7 @@ void Query::setSortBy(const string& fld, bool ascending) {
|
|||
#define ISNULL(X) !(X)
|
||||
|
||||
// Prepare query out of user search data
|
||||
bool Query::setQuery(STD_SHARED_PTR<SearchData> sdata)
|
||||
bool Query::setQuery(std::shared_ptr<SearchData> sdata)
|
||||
{
|
||||
LOGDEB("Query::setQuery:\n" );
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "searchdata.h"
|
||||
|
||||
#ifndef NO_NAMESPACES
|
||||
|
@ -92,7 +92,7 @@ class Query {
|
|||
* be called repeatedly on the same object which gets reinitialized each
|
||||
* time.
|
||||
*/
|
||||
bool setQuery(STD_SHARED_PTR<SearchData> q);
|
||||
bool setQuery(std::shared_ptr<SearchData> q);
|
||||
|
||||
/** Get results count for current query */
|
||||
int getResCnt();
|
||||
|
@ -117,7 +117,7 @@ class Query {
|
|||
int getFirstMatchPage(const Doc &doc, std::string& term);
|
||||
|
||||
/** Retrieve a reference to the searchData we are using */
|
||||
STD_SHARED_PTR<SearchData> getSD()
|
||||
std::shared_ptr<SearchData> getSD()
|
||||
{
|
||||
return m_sd;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ private:
|
|||
bool m_sortAscending;
|
||||
bool m_collapseDuplicates;
|
||||
int m_resCnt;
|
||||
STD_SHARED_PTR<SearchData> m_sd;
|
||||
std::shared_ptr<SearchData> m_sd;
|
||||
int m_snipMaxPosWalk;
|
||||
|
||||
/* Copyconst and assignement private and forbidden */
|
||||
|
|
|
@ -185,11 +185,11 @@ bool Db::termMatch(int typ_sens, const string &lang, const string &_term,
|
|||
XapComputableSynFamMember synac(xrdb, synFamDiCa, "all", &unacfoldtrans);
|
||||
|
||||
if (matchtyp == ET_WILD || matchtyp == ET_REGEXP) {
|
||||
STD_SHARED_PTR<StrMatcher> matcher;
|
||||
std::shared_ptr<StrMatcher> matcher;
|
||||
if (matchtyp == ET_WILD) {
|
||||
matcher = STD_SHARED_PTR<StrMatcher>(new StrWildMatcher(term));
|
||||
matcher = std::shared_ptr<StrMatcher>(new StrWildMatcher(term));
|
||||
} else {
|
||||
matcher = STD_SHARED_PTR<StrMatcher>(new StrRegexpMatcher(term));
|
||||
matcher = std::shared_ptr<StrMatcher>(new StrRegexpMatcher(term));
|
||||
}
|
||||
if (!diac_sensitive || !case_sensitive) {
|
||||
// Perform case/diac expansion on the exp as appropriate and
|
||||
|
@ -355,15 +355,15 @@ bool Db::idxTermMatch(int typ_sens, const string &lang, const string &root,
|
|||
}
|
||||
res.prefix = prefix;
|
||||
|
||||
STD_SHARED_PTR<StrMatcher> matcher;
|
||||
std::shared_ptr<StrMatcher> matcher;
|
||||
if (typ == ET_REGEXP) {
|
||||
matcher = STD_SHARED_PTR<StrMatcher>(new StrRegexpMatcher(root));
|
||||
matcher = std::shared_ptr<StrMatcher>(new StrRegexpMatcher(root));
|
||||
if (!matcher->ok()) {
|
||||
LOGERR("termMatch: regcomp failed: " << (matcher->getreason()));
|
||||
return false;
|
||||
}
|
||||
} else if (typ == ET_WILD) {
|
||||
matcher = STD_SHARED_PTR<StrMatcher>(new StrWildMatcher(root));
|
||||
matcher = std::shared_ptr<StrMatcher>(new StrWildMatcher(root));
|
||||
}
|
||||
|
||||
// Find the initial section before any special char
|
||||
|
|
|
@ -162,7 +162,7 @@ bool SearchData::maybeAddAutoPhrase(Rcl::Db& db, double freqThreshold)
|
|||
// an actual user-entered phrase
|
||||
slack += 1 + nwords / 3;
|
||||
|
||||
m_autophrase = STD_SHARED_PTR<SearchDataClauseDist>(
|
||||
m_autophrase = std::shared_ptr<SearchDataClauseDist>(
|
||||
new SearchDataClauseDist(SCLT_PHRASE, swords, slack, field));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <ostream>
|
||||
|
||||
#include "rcldb.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
#include "smallut.h"
|
||||
#include "cstr.h"
|
||||
#include "hldata.h"
|
||||
|
@ -178,7 +178,7 @@ private:
|
|||
std::vector<std::string> m_nfiletypes;
|
||||
// Autophrase if set. Can't be part of the normal chain because
|
||||
// it uses OP_AND_MAYBE
|
||||
STD_SHARED_PTR<SearchDataClauseDist> m_autophrase;
|
||||
std::shared_ptr<SearchDataClauseDist> m_autophrase;
|
||||
|
||||
// Special stuff produced by input which looks like a clause but means
|
||||
// something else (date and size specs)
|
||||
|
@ -493,7 +493,7 @@ private:
|
|||
/** Subquery */
|
||||
class SearchDataClauseSub : public SearchDataClause {
|
||||
public:
|
||||
SearchDataClauseSub(STD_SHARED_PTR<SearchData> sub)
|
||||
SearchDataClauseSub(std::shared_ptr<SearchData> sub)
|
||||
: SearchDataClause(SCLT_SUB), m_sub(sub)
|
||||
{
|
||||
}
|
||||
|
@ -509,13 +509,13 @@ public:
|
|||
{
|
||||
m_sub.get()->getTerms(hldata);
|
||||
}
|
||||
virtual STD_SHARED_PTR<SearchData> getSub() {
|
||||
virtual std::shared_ptr<SearchData> getSub() {
|
||||
return m_sub;
|
||||
}
|
||||
virtual void dump(ostream& o) const;
|
||||
|
||||
protected:
|
||||
STD_SHARED_PTR<SearchData> m_sub;
|
||||
std::shared_ptr<SearchData> m_sub;
|
||||
};
|
||||
|
||||
} // Namespace Rcl
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "log.h"
|
||||
#include "cstr.h"
|
||||
|
@ -183,9 +183,9 @@ bool XapComputableSynFamMember::synKeyExpand(StrMatcher* inexp,
|
|||
LOGDEB("XapCompSynFam::synKeyExpand: [" << (inexp->exp()) << "]\n" );
|
||||
|
||||
// If set, compute filtering term (e.g.: only case-folded)
|
||||
STD_SHARED_PTR<StrMatcher> filter_exp;
|
||||
std::shared_ptr<StrMatcher> filter_exp;
|
||||
if (filtertrans) {
|
||||
filter_exp = STD_SHARED_PTR<StrMatcher>(inexp->clone());
|
||||
filter_exp = std::shared_ptr<StrMatcher>(inexp->clone());
|
||||
filter_exp->setExp((*filtertrans)(inexp->exp()));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <zlib.h>
|
||||
|
||||
#include "chrono.h"
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
|
@ -1353,8 +1353,8 @@ static bool inflateToDynBuf(void* inp, UINT inlen, void **outpp, UINT *outlenp)
|
|||
}
|
||||
|
||||
// Copy all entries from occ to ncc. Both are already open.
|
||||
static bool copyall(STD_SHARED_PTR<CirCache> occ,
|
||||
STD_SHARED_PTR<CirCache> ncc, int& nentries,
|
||||
static bool copyall(std::shared_ptr<CirCache> occ,
|
||||
std::shared_ptr<CirCache> ncc, int& nentries,
|
||||
ostringstream& msg)
|
||||
{
|
||||
bool eof = false;
|
||||
|
@ -1399,7 +1399,7 @@ int CirCache::append(const string ddir, const string& sdir, string *reason)
|
|||
{
|
||||
ostringstream msg;
|
||||
// Open source file
|
||||
STD_SHARED_PTR<CirCache> occ(new CirCache(sdir));
|
||||
std::shared_ptr<CirCache> occ(new CirCache(sdir));
|
||||
if (!occ->open(CirCache::CC_OPREAD)) {
|
||||
if (reason) {
|
||||
msg << "Open failed in " << sdir << " : " <<
|
||||
|
@ -1409,7 +1409,7 @@ int CirCache::append(const string ddir, const string& sdir, string *reason)
|
|||
return -1;
|
||||
}
|
||||
// Open dest file
|
||||
STD_SHARED_PTR<CirCache> ncc(new CirCache(ddir));
|
||||
std::shared_ptr<CirCache> ncc(new CirCache(ddir));
|
||||
if (!ncc->open(CirCache::CC_OPWRITE)) {
|
||||
if (reason) {
|
||||
msg << "Open failed in " << ddir << " : " <<
|
||||
|
@ -1444,7 +1444,7 @@ int CirCache::append(const string ddir, const string& sdir, string *reason)
|
|||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
#include "circache.h"
|
||||
#include "fileudi.h"
|
||||
|
|
|
@ -77,10 +77,10 @@ public:
|
|||
string m_stderrFile;
|
||||
// Pipe for data going to the command
|
||||
int m_pipein[2];
|
||||
STD_SHARED_PTR<NetconCli> m_tocmd;
|
||||
std::shared_ptr<NetconCli> m_tocmd;
|
||||
// Pipe for data coming out
|
||||
int m_pipeout[2];
|
||||
STD_SHARED_PTR<NetconCli> m_fromcmd;
|
||||
std::shared_ptr<NetconCli> m_fromcmd;
|
||||
// Subprocess id
|
||||
pid_t m_pid;
|
||||
// Saved sigmask
|
||||
|
@ -642,14 +642,14 @@ int ExecCmd::startExec(const string& cmd, const vector<string>& args,
|
|||
m->m_pipein[0] = -1;
|
||||
NetconCli *iclicon = new NetconCli();
|
||||
iclicon->setconn(m->m_pipein[1]);
|
||||
m->m_tocmd = STD_SHARED_PTR<NetconCli>(iclicon);
|
||||
m->m_tocmd = std::shared_ptr<NetconCli>(iclicon);
|
||||
}
|
||||
if (has_output) {
|
||||
close(m->m_pipeout[1]);
|
||||
m->m_pipeout[1] = -1;
|
||||
NetconCli *oclicon = new NetconCli();
|
||||
oclicon->setconn(m->m_pipeout[0]);
|
||||
m->m_fromcmd = STD_SHARED_PTR<NetconCli>(oclicon);
|
||||
m->m_fromcmd = std::shared_ptr<NetconCli>(oclicon);
|
||||
}
|
||||
|
||||
/* Don't want to undo what we just did ! */
|
||||
|
@ -757,7 +757,7 @@ int ExecCmd::doexec(const string& cmd, const vector<string>& args,
|
|||
LOGERR("ExecCmd::doexec: no connection from command\n");
|
||||
return -1;
|
||||
}
|
||||
oclicon->setcallback(STD_SHARED_PTR<NetconWorker>
|
||||
oclicon->setcallback(std::shared_ptr<NetconWorker>
|
||||
(new ExecReader(output, m->m_advise)));
|
||||
myloop.addselcon(m->m_fromcmd, Netcon::NETCONPOLL_READ);
|
||||
// Give up ownership
|
||||
|
@ -770,7 +770,7 @@ int ExecCmd::doexec(const string& cmd, const vector<string>& args,
|
|||
LOGERR("ExecCmd::doexec: no connection from command\n");
|
||||
return -1;
|
||||
}
|
||||
iclicon->setcallback(STD_SHARED_PTR<NetconWorker>
|
||||
iclicon->setcallback(std::shared_ptr<NetconWorker>
|
||||
(new ExecWriter(input, m->m_provide, m)));
|
||||
myloop.addselcon(m->m_tocmd, Netcon::NETCONPOLL_WRITE);
|
||||
// Give up ownership
|
||||
|
|
|
@ -1208,8 +1208,8 @@ int trycli(char *host, char *serv)
|
|||
}
|
||||
}
|
||||
#else
|
||||
STD_SHARED_PTR<NetconWorker> worker =
|
||||
STD_SHARED_PTR<NetconWorker>(new CliNetconWorker());
|
||||
std::shared_ptr<NetconWorker> worker =
|
||||
std::shared_ptr<NetconWorker>(new CliNetconWorker());
|
||||
clicon->setcallback(worker);
|
||||
SelectLoop myloop;
|
||||
myloop.addselcon(con, Netcon::NETCONPOLL_WRITE);
|
||||
|
@ -1274,8 +1274,8 @@ protected:
|
|||
if (con == 0) {
|
||||
return -1;
|
||||
}
|
||||
STD_SHARED_PTR<NetconWorker> worker =
|
||||
STD_SHARED_PTR<NetconWorker>(new ServNetconWorker());
|
||||
std::shared_ptr<NetconWorker> worker =
|
||||
std::shared_ptr<NetconWorker>(new ServNetconWorker());
|
||||
con->setcallback(worker);
|
||||
m_loop.addselcon(NetconP(con), NETCONPOLL_READ);
|
||||
return 1;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
/// A set of classes to manage client-server communication over a
|
||||
/// connection-oriented network, or a pipe.
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
/// Base class for all network endpoints:
|
||||
class Netcon;
|
||||
typedef STD_SHARED_PTR<Netcon> NetconP;
|
||||
typedef std::shared_ptr<Netcon> NetconP;
|
||||
class SelectLoop;
|
||||
|
||||
class Netcon {
|
||||
|
@ -246,7 +246,7 @@ public:
|
|||
virtual int getline(char *buf, int cnt, int timeo = -1);
|
||||
/// Set handler to be called when the connection is placed in the
|
||||
/// selectloop and an event occurs.
|
||||
virtual void setcallback(STD_SHARED_PTR<NetconWorker> user) {
|
||||
virtual void setcallback(std::shared_ptr<NetconWorker> user) {
|
||||
m_user = user;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ private:
|
|||
char *m_bufbase; // Pointer to current 1st byte of useful data
|
||||
int m_bufbytes; // Bytes of data.
|
||||
int m_bufsize; // Total buffer size
|
||||
STD_SHARED_PTR<NetconWorker> m_user;
|
||||
std::shared_ptr<NetconWorker> m_user;
|
||||
virtual int cando(Netcon::Event reason); // Selectloop slot
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include MEMORY_INCLUDE
|
||||
#include <memory>
|
||||
|
||||
|
||||
extern void rclutil_init_mt();
|
||||
|
@ -70,7 +70,7 @@ private:
|
|||
bool m_noremove;
|
||||
};
|
||||
|
||||
typedef STD_SHARED_PTR<TempFileInternal> TempFile;
|
||||
typedef std::shared_ptr<TempFileInternal> TempFile;
|
||||
|
||||
/// Temporary directory class. Recursively deleted by destructor.
|
||||
class TempDir {
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include UNORDERED_MAP_INCLUDE
|
||||
#include UNORDERED_SET_INCLUDE
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "smallut.h"
|
||||
|
||||
|
@ -323,8 +323,8 @@ template bool stringToStrings<vector<string> >(const string&,
|
|||
vector<string>&, const string&);
|
||||
template bool stringToStrings<set<string> >(const string&,
|
||||
set<string>&, const string&);
|
||||
template bool stringToStrings<STD_UNORDERED_SET<string> >
|
||||
(const string&, STD_UNORDERED_SET<string>&, const string&);
|
||||
template bool stringToStrings<std::unordered_set<string> >
|
||||
(const string&, std::unordered_set<string>&, const string&);
|
||||
|
||||
template <class T> void stringsToString(const T& tokens, string& s)
|
||||
{
|
||||
|
@ -1195,14 +1195,14 @@ static const string cstr_cp1252("CP1252");
|
|||
|
||||
string langtocode(const string& lang)
|
||||
{
|
||||
static STD_UNORDERED_MAP<string, string> lang_to_code;
|
||||
static std::unordered_map<string, string> lang_to_code;
|
||||
if (lang_to_code.empty()) {
|
||||
for (unsigned int i = 0;
|
||||
i < sizeof(vlang_to_code) / sizeof(char *); i += 2) {
|
||||
lang_to_code[vlang_to_code[i]] = vlang_to_code[i + 1];
|
||||
}
|
||||
}
|
||||
STD_UNORDERED_MAP<string, string>::const_iterator it =
|
||||
std::unordered_map<string, string>::const_iterator it =
|
||||
lang_to_code.find(lang);
|
||||
|
||||
// Use cp1252 by default...
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include UNORDERED_MAP_INCLUDE
|
||||
#include <unordered_map>
|
||||
|
||||
#include "log.h"
|
||||
#include "safesysstat.h"
|
||||
|
@ -108,12 +108,12 @@ static string argvToCmdLine(const string& cmd, const vector<string>& args)
|
|||
}
|
||||
|
||||
// Merge the father environment with the variable specified in m_env
|
||||
static char *mergeEnvironment(const STD_UNORDERED_MAP<string, string>& addenv)
|
||||
static char *mergeEnvironment(const std::unordered_map<string, string>& addenv)
|
||||
{
|
||||
// Parse existing environment.
|
||||
char *envir = GetEnvironmentStrings();
|
||||
char *cp0 = envir;
|
||||
STD_UNORDERED_MAP<string, string> envirmap;
|
||||
std::unordered_map<string, string> envirmap;
|
||||
|
||||
string name, value;
|
||||
for (char *cp1 = cp0;;cp1++) {
|
||||
|
@ -277,7 +277,7 @@ public:
|
|||
reset();
|
||||
}
|
||||
|
||||
STD_UNORDERED_MAP<string, string> m_env;
|
||||
std::unordered_map<string, string> m_env;
|
||||
ExecCmdAdvise *m_advise;
|
||||
ExecCmdProvide *m_provide;
|
||||
int m_timeoutMs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue