Switch to unified view

a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp
...
...
767
}
767
}
768
768
769
// Start a db query and set the reslist docsource
769
// Start a db query and set the reslist docsource
770
void RclMain::startSearch(RefCntr<Rcl::SearchData> sdata)
770
void RclMain::startSearch(RefCntr<Rcl::SearchData> sdata)
771
{
771
{
772
    LOGDEB(("RclMain::startSearch. Indexing %s\n", m_idxproc?"on":"off"));
772
    LOGDEB(("RclMain::startSearch. Indexing %s Active %d\n", 
773
      m_idxproc?"on":"off", m_queryActive));
774
    if (m_queryActive) {
775
  LOGDEB(("startSearch: already active\n"));
776
  return;
777
    }
778
    m_queryActive = true;
773
    m_source = RefCntr<DocSequence>();
779
    m_source = RefCntr<DocSequence>();
774
780
775
    // The db may have been closed at the end of indexing
781
    // The db may have been closed at the end of indexing
776
    string reason;
782
    string reason;
777
    // If indexing is being performed, we reopen the db at each query.
783
    // If indexing is being performed, we reopen the db at each query.
778
    if (!maybeOpenDb(reason, m_idxproc != 0)) {
784
    if (!maybeOpenDb(reason, m_idxproc != 0)) {
779
    QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
785
    QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
786
  m_queryActive = false;
780
    return;
787
    return;
781
    }
788
    }
782
789
783
    Rcl::Query *query = new Rcl::Query(rcldb);
790
    Rcl::Query *query = new Rcl::Query(rcldb);
784
    query->setCollapseDuplicates(prefs.collapseDuplicates);
791
    query->setCollapseDuplicates(prefs.collapseDuplicates);
...
...
816
    int cnt;
823
    int cnt;
817
};
824
};
818
825
819
void RclMain::initiateQuery()
826
void RclMain::initiateQuery()
820
{
827
{
821
    if (m_queryActive || m_source.isNull())
828
    if (m_source.isNull())
822
    return;
829
    return;
823
    m_queryActive = true;
824
830
825
    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
831
    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
826
    QueryThread qthr(m_source);
832
    QueryThread qthr(m_source);
827
    qthr.start();
833
    qthr.start();
828
834