Switch to unified view

a/src/qtgui/idxthread.cpp b/src/qtgui/idxthread.cpp
...
...
22
#include <qmutex.h>
22
#include <qmutex.h>
23
23
24
#include "indexer.h"
24
#include "indexer.h"
25
#include "debuglog.h"
25
#include "debuglog.h"
26
#include "idxthread.h"
26
#include "idxthread.h"
27
#include "smallut.h"
28
#include "rclinit.h"
27
29
28
static QMutex curfile_mutex;
30
static QMutex curfile_mutex;
29
31
30
class IdxThread : public QThread , public DbIxStatusUpdater {
32
class IdxThread : public QThread , public DbIxStatusUpdater {
31
    virtual void run();
33
    virtual void run();
...
...
54
static int stopidxthread;
56
static int stopidxthread;
55
57
56
void IdxThread::run()
58
void IdxThread::run()
57
{
59
{
58
    DebugLog::getdbl()->setloglevel(loglevel);
60
    DebugLog::getdbl()->setloglevel(loglevel);
61
    recoll_threadinit();
59
    for (;;) {
62
    for (;;) {
60
    if (stopidxthread) {
63
    if (stopidxthread) {
61
        delete indexer;
64
        deleteZ(indexer);
62
        return;
65
        return;
63
    }
66
    }
64
    if (startindexing) {
67
    if (startindexing) {
65
        startindexing = 0;
68
        startindexing = 0;
66
        indexingdone = 0;
69
        indexingdone = 0;
...
...
83
void start_idxthread(const RclConfig& cnf)
86
void start_idxthread(const RclConfig& cnf)
84
{
87
{
85
    // We have to make a copy of the config (setKeydir changes it during 
88
    // We have to make a copy of the config (setKeydir changes it during 
86
    // indexation)
89
    // indexation)
87
    RclConfig *myconf = new RclConfig(cnf);
90
    RclConfig *myconf = new RclConfig(cnf);
88
    ConfIndexer *ix = new ConfIndexer(myconf, &idxthread);
91
    idxthread.indexer = new ConfIndexer(myconf, &idxthread);
89
    idxthread.indexer = ix;
90
    idxthread.loglevel = DebugLog::getdbl()->getlevel();
92
    idxthread.loglevel = DebugLog::getdbl()->getlevel();
91
    idxthread.start();
93
    idxthread.start();
92
}
94
}
93
95
94
void stop_idxthread()
96
void stop_idxthread()