Switch to unified view

a/src/qtgui/idxthread.cpp b/src/qtgui/idxthread.cpp
...
...
28
static QMutex curfile_mutex;
28
static QMutex curfile_mutex;
29
29
30
class IdxThread : public QThread , public DbIxStatusUpdater {
30
class IdxThread : public QThread , public DbIxStatusUpdater {
31
    virtual void run();
31
    virtual void run();
32
 public:
32
 public:
33
    virtual bool update(const string &fn) {
33
    virtual bool update() {
34
    QMutexLocker locker(&curfile_mutex);
34
    QMutexLocker locker(&curfile_mutex);
35
  m_curfile = fn;
35
  m_statusSnap = status;
36
    LOGDEB1(("IdxThread::update: indexing %s\n", m_curfile.c_str()));
36
    LOGDEB1(("IdxThread::update: indexing %s\n", m_statusSnap.fn.c_str()));
37
    if (stopindexing) {
37
    if (stopindexing) {
38
        stopindexing = 0;
38
        stopindexing = 0;
39
        return false;
39
        return false;
40
    }
40
    }
41
    return true;
41
    return true;
42
    }
42
    }
43
    ConfIndexer *indexer;
43
    ConfIndexer *indexer;
44
    string m_curfile;
44
    // Maintain a copy/snapshot of idx status
45
    DbIxStatus m_statusSnap;
45
    int loglevel;
46
    int loglevel;
46
};
47
};
47
48
48
int stopindexing;
49
int stopindexing;
49
int startindexing;
50
int startindexing;
...
...
95
    stopindexing = 1;
96
    stopindexing = 1;
96
    stopidxthread = 1;
97
    stopidxthread = 1;
97
    idxthread.wait();
98
    idxthread.wait();
98
}
99
}
99
100
100
std::string idxthread_currentfile()
101
DbIxStatus idxthread_idxStatus()
101
{
102
{
102
    QMutexLocker locker(&curfile_mutex);
103
    QMutexLocker locker(&curfile_mutex);
103
    return(idxthread.m_curfile);
104
    return(idxthread.m_statusSnap);
104
}
105
}