log statement cleanup while looking for sthing else...

This commit is contained in:
Jean-Francois Dockes 2017-01-16 13:40:44 +01:00
parent 2594b71ae8
commit 139e1c567c
3 changed files with 72 additions and 56 deletions

View File

@ -554,7 +554,7 @@ void RclMain::initDbOpen()
void RclMain::setStemLang(QAction *id) void RclMain::setStemLang(QAction *id)
{ {
LOGDEB("RclMain::setStemLang(" << (id) << ")\n" ); LOGDEB("RclMain::setStemLang(" << id << ")\n");
// Check that the menu entry is for a stemming language change // Check that the menu entry is for a stemming language change
// (might also be "show prefs" etc. // (might also be "show prefs" etc.
bool isLangId = false; bool isLangId = false;
@ -584,7 +584,8 @@ void RclMain::setStemLang(QAction *id)
lang = id->text(); lang = id->text();
} }
prefs.queryStemLang = lang; prefs.queryStemLang = lang;
LOGDEB("RclMain::setStemLang(" << (id) << "): lang [" << ((const char *)prefs.queryStemLang.toUtf8()) << "]\n" ); LOGDEB("RclMain::setStemLang(" << id << "): lang [" <<
qs2utf8s(prefs.queryStemLang) << "]\n");
rwSettings(true); rwSettings(true);
emit stemLangChanged(lang); emit stemLangChanged(lang);
} }
@ -592,7 +593,7 @@ void RclMain::setStemLang(QAction *id)
// Set the checked stemming language item before showing the prefs menu // Set the checked stemming language item before showing the prefs menu
void RclMain::setStemLang(const QString& lang) void RclMain::setStemLang(const QString& lang)
{ {
LOGDEB("RclMain::setStemLang(" << ((const char *)lang.toUtf8()) << ")\n" ); LOGDEB("RclMain::setStemLang(" << qs2utf8s(lang) << ")\n");
QAction *id; QAction *id;
if (lang == "") { if (lang == "") {
id = m_idNoStem; id = m_idNoStem;
@ -626,7 +627,7 @@ void RclMain::showTrayMessage(const QString& text)
void RclMain::closeEvent(QCloseEvent *ev) void RclMain::closeEvent(QCloseEvent *ev)
{ {
LOGDEB("RclMain::closeEvent\n" ); LOGDEB("RclMain::closeEvent\n");
if (prefs.closeToTray && m_trayicon && m_trayicon->isVisible()) { if (prefs.closeToTray && m_trayicon && m_trayicon->isVisible()) {
hide(); hide();
ev->ignore(); ev->ignore();
@ -637,7 +638,7 @@ void RclMain::closeEvent(QCloseEvent *ev)
void RclMain::fileExit() void RclMain::fileExit()
{ {
LOGDEB("RclMain: fileExit\n" ); LOGDEB("RclMain: fileExit\n");
// Don't save geometry if we're currently fullscreened // Don't save geometry if we're currently fullscreened
if (!isFullScreen()) { if (!isFullScreen()) {
prefs.mainwidth = width(); prefs.mainwidth = width();
@ -665,9 +666,10 @@ void RclMain::fileExit()
// Start a db query and set the reslist docsource // 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" ); LOGDEB("RclMain::startSearch. Indexing " << (m_idxproc?"on":"off") <<
" Active " << m_queryActive << "\n");
if (m_queryActive) { if (m_queryActive) {
LOGDEB("startSearch: already active\n" ); LOGDEB("startSearch: already active\n");
return; return;
} }
m_queryActive = true; m_queryActive = true;
@ -794,7 +796,7 @@ void RclMain::onSortCtlChanged()
if (m_sortspecnochange) if (m_sortspecnochange)
return; return;
LOGDEB("RclMain::onSortCtlChanged()\n" ); LOGDEB("RclMain::onSortCtlChanged()\n");
m_sortspec.reset(); m_sortspec.reset();
if (actionSortByDateAsc->isChecked()) { if (actionSortByDateAsc->isChecked()) {
m_sortspec.field = "mtime"; m_sortspec.field = "mtime";
@ -820,7 +822,7 @@ void RclMain::onSortCtlChanged()
void RclMain::onSortDataChanged(DocSeqSortSpec spec) void RclMain::onSortDataChanged(DocSeqSortSpec spec)
{ {
LOGDEB("RclMain::onSortDataChanged\n" ); LOGDEB("RclMain::onSortDataChanged\n");
m_sortspecnochange = true; m_sortspecnochange = true;
if (spec.field.compare("mtime")) { if (spec.field.compare("mtime")) {
actionSortByDateDesc->setChecked(false); actionSortByDateDesc->setChecked(false);
@ -843,7 +845,7 @@ void RclMain::onSortDataChanged(DocSeqSortSpec spec)
void RclMain::on_actionShowResultsAsTable_toggled(bool on) void RclMain::on_actionShowResultsAsTable_toggled(bool on)
{ {
LOGDEB("RclMain::on_actionShowResultsAsTable_toggled(" << (int(on)) << ")\n" ); LOGDEB("RclMain::on_actionShowResultsAsTable_toggled(" << on << ")\n");
prefs.showResultsAsTable = on; prefs.showResultsAsTable = on;
displayingTable = on; displayingTable = on;
restable->setVisible(on); restable->setVisible(on);
@ -852,8 +854,9 @@ void RclMain::on_actionShowResultsAsTable_toggled(bool on)
static QShortcut tablefocseq(QKeySequence("Ctrl+r"), this); static QShortcut tablefocseq(QKeySequence("Ctrl+r"), this);
if (!on) { if (!on) {
int docnum = restable->getDetailDocNumOrTopRow(); int docnum = restable->getDetailDocNumOrTopRow();
if (docnum >= 0) if (docnum >= 0) {
reslist->resultPageFor(docnum); reslist->resultPageFor(docnum);
}
disconnect(&tablefocseq, SIGNAL(activated()), disconnect(&tablefocseq, SIGNAL(activated()),
restable, SLOT(takeFocus())); restable, SLOT(takeFocus()));
sSearch->takeFocus(); sSearch->takeFocus();
@ -872,7 +875,7 @@ void RclMain::on_actionShowResultsAsTable_toggled(bool on)
void RclMain::on_actionSortByDateAsc_toggled(bool on) void RclMain::on_actionSortByDateAsc_toggled(bool on)
{ {
LOGDEB("RclMain::on_actionSortByDateAsc_toggled(" << (int(on)) << ")\n" ); LOGDEB("RclMain::on_actionSortByDateAsc_toggled(" << on << ")\n");
if (on) { if (on) {
if (actionSortByDateDesc->isChecked()) { if (actionSortByDateDesc->isChecked()) {
actionSortByDateDesc->setChecked(false); actionSortByDateDesc->setChecked(false);
@ -885,7 +888,7 @@ void RclMain::on_actionSortByDateAsc_toggled(bool on)
void RclMain::on_actionSortByDateDesc_toggled(bool on) void RclMain::on_actionSortByDateDesc_toggled(bool on)
{ {
LOGDEB("RclMain::on_actionSortByDateDesc_toggled(" << (int(on)) << ")\n" ); LOGDEB("RclMain::on_actionSortByDateDesc_toggled(" << on << ")\n");
if (on) { if (on) {
if (actionSortByDateAsc->isChecked()) { if (actionSortByDateAsc->isChecked()) {
actionSortByDateAsc->setChecked(false); actionSortByDateAsc->setChecked(false);
@ -915,7 +918,7 @@ void RclMain::saveDocToFile(Rcl::Doc doc)
void RclMain::showSubDocs(Rcl::Doc doc) void RclMain::showSubDocs(Rcl::Doc doc)
{ {
LOGDEB("RclMain::showSubDocs\n" ); LOGDEB("RclMain::showSubDocs\n");
string reason; string reason;
if (!maybeOpenDb(reason)) { if (!maybeOpenDb(reason)) {
QMessageBox::critical(0, "Recoll", QString(reason.c_str())); QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
@ -944,14 +947,14 @@ void RclMain::showSubDocs(Rcl::Doc doc)
// significant terms, and add them to the simple search entry. // significant terms, and add them to the simple search entry.
void RclMain::docExpand(Rcl::Doc doc) void RclMain::docExpand(Rcl::Doc doc)
{ {
LOGDEB("RclMain::docExpand()\n" ); LOGDEB("RclMain::docExpand()\n");
if (!rcldb) if (!rcldb)
return; return;
list<string> terms; list<string> terms;
terms = m_source->expand(doc); terms = m_source->expand(doc);
if (terms.empty()) { if (terms.empty()) {
LOGDEB("RclMain::docExpand: no terms\n" ); LOGDEB("RclMain::docExpand: no terms\n");
return; return;
} }
// Do we keep the original query. I think we'd better not. // Do we keep the original query. I think we'd better not.
@ -970,7 +973,7 @@ void RclMain::docExpand(Rcl::Doc doc)
void RclMain::showDocHistory() void RclMain::showDocHistory()
{ {
LOGDEB("RclMain::showDocHistory\n" ); LOGDEB("RclMain::showDocHistory\n");
emit searchReset(); emit searchReset();
m_source = std::shared_ptr<DocSequence>(); m_source = std::shared_ptr<DocSequence>();
curPreview = 0; curPreview = 0;
@ -1026,7 +1029,7 @@ void RclMain::setUIPrefs()
{ {
if (!uiprefs) if (!uiprefs)
return; return;
LOGDEB("Recollmain::setUIPrefs\n" ); LOGDEB("Recollmain::setUIPrefs\n");
reslist->setFont(); reslist->setFont();
sSearch->setPrefs(); sSearch->setPrefs();
enbSynAction->setDisabled(prefs.synFile.isEmpty()); enbSynAction->setDisabled(prefs.synFile.isEmpty());
@ -1064,7 +1067,7 @@ void RclMain::catgFilter(QAction *act)
// User pressed a filter button: set filter params in reslist // User pressed a filter button: set filter params in reslist
void RclMain::catgFilter(int id) void RclMain::catgFilter(int id)
{ {
LOGDEB("RclMain::catgFilter: id " << (id) << "\n" ); LOGDEB("RclMain::catgFilter: id " << id << "\n");
if (id < 0 || id >= int(m_catgbutvec.size())) if (id < 0 || id >= int(m_catgbutvec.size()))
return; return;

View File

@ -259,15 +259,15 @@ string QtGuiResListPager::iconUrl(RclConfig *config, Rcl::Doc& doc)
ConfIndexer::docsToPaths(docs, paths); ConfIndexer::docsToPaths(docs, paths);
if (!paths.empty()) { if (!paths.empty()) {
string path; string path;
LOGDEB0("ResList::iconUrl: source path [" << (paths[0]) << "]\n" ); LOGDEB2("ResList::iconUrl: source path [" << paths[0] << "]\n");
if (thumbPathForUrl(cstr_fileu + paths[0], 128, path)) { if (thumbPathForUrl(cstr_fileu + paths[0], 128, path)) {
LOGDEB0("ResList::iconUrl: icon path [" << (path) << "]\n" ); LOGDEB2("ResList::iconUrl: icon path [" << path << "]\n");
return cstr_fileu + path; return cstr_fileu + path;
} else { } else {
LOGDEB0("ResList::iconUrl: no icon: path [" << (path) << "]\n" ); LOGDEB2("ResList::iconUrl: no icon: path [" << path << "]\n");
} }
} else { } else {
LOGDEB("ResList::iconUrl: docsToPaths failed\n" ); LOGDEB("ResList::iconUrl: docsToPaths failed\n");
} }
} }
return ResListPager::iconUrl(config, doc); return ResListPager::iconUrl(config, doc);
@ -283,7 +283,8 @@ public:
string s1, s2; string s1, s2;
stringsToString<vector<string> >(m_hdata->groups[idx], s1); stringsToString<vector<string> >(m_hdata->groups[idx], s1);
stringsToString<vector<string> >(m_hdata->ugroups[m_hdata->grpsugidx[idx]], s2); stringsToString<vector<string> >(m_hdata->ugroups[m_hdata->grpsugidx[idx]], s2);
LOGDEB("Reslist startmatch: group " << (s1) << " user group " << (s2) << "\n" ); LOGDEB2("Reslist startmatch: group " << s1 << " user group " <<
s2 << "\n");
} }
return string("<span class='rclmatch' style='") return string("<span class='rclmatch' style='")
@ -732,7 +733,7 @@ void ResList::resultPageFor(int docnum)
void ResList::append(const QString &text) void ResList::append(const QString &text)
{ {
LOGDEB2("QtGuiReslistPager::appendQString : " << ((const char*)text.toUtf8()) << "\n" ); LOGDEB2("QtGuiReslistPager::appendQString : " << qs2utf8s(text) << "\n");
#ifdef RESLIST_TEXTBROWSER #ifdef RESLIST_TEXTBROWSER
QTextBrowser::append(text); QTextBrowser::append(text);
#else #else
@ -750,7 +751,9 @@ void ResList::displayPage()
setHtml(m_text); setHtml(m_text);
#endif #endif
LOGDEB0("ResList::displayPg: hasNext " << (m_pager->hasPrev()) << " atBot " << (scrollIsAtBottom()) << " hasPrev " << (m_pager->hasNext()) << " at Top " << (scrollIsAtTop()) << " \n" ); LOGDEB0("ResList::displayPg: hasNext " << m_pager->hasNext() <<
" atBot " << scrollIsAtBottom() << " hasPrev " <<
m_pager->hasPrev() << " at Top " << scrollIsAtTop() << " \n");
setupArrows(); setupArrows();
// Possibly color paragraph of current preview if any // Possibly color paragraph of current preview if any

View File

@ -274,7 +274,7 @@ RecollModel::RecollModel(const QStringList fields, QObject *parent)
int RecollModel::rowCount(const QModelIndex&) const int RecollModel::rowCount(const QModelIndex&) const
{ {
LOGDEB2("RecollModel::rowCount\n" ); LOGDEB2("RecollModel::rowCount\n");
if (!m_source) if (!m_source)
return 0; return 0;
return m_source->getResCnt(); return m_source->getResCnt();
@ -282,20 +282,20 @@ int RecollModel::rowCount(const QModelIndex&) const
int RecollModel::columnCount(const QModelIndex&) const int RecollModel::columnCount(const QModelIndex&) const
{ {
LOGDEB2("RecollModel::columnCount\n" ); LOGDEB2("RecollModel::columnCount\n");
return m_fields.size(); return m_fields.size();
} }
void RecollModel::readDocSource() void RecollModel::readDocSource()
{ {
LOGDEB("RecollModel::readDocSource()\n" ); LOGDEB("RecollModel::readDocSource()\n");
beginResetModel(); beginResetModel();
endResetModel(); endResetModel();
} }
void RecollModel::setDocSource(std::shared_ptr<DocSequence> nsource) void RecollModel::setDocSource(std::shared_ptr<DocSequence> nsource)
{ {
LOGDEB("RecollModel::setDocSource\n" ); LOGDEB("RecollModel::setDocSource\n");
if (!nsource) { if (!nsource) {
m_source = std::shared_ptr<DocSequence>(); m_source = std::shared_ptr<DocSequence>();
} else { } else {
@ -320,7 +320,7 @@ void RecollModel::deleteColumn(int col)
void RecollModel::addColumn(int col, const string& field) void RecollModel::addColumn(int col, const string& field)
{ {
LOGDEB("AddColumn: col " << (col) << " fld [" << (field) << "]\n" ); LOGDEB("AddColumn: col " << col << " fld [" << field << "]\n");
if (col >= 0 && col < int(m_fields.size())) { if (col >= 0 && col < int(m_fields.size())) {
col++; col++;
vector<string>::iterator it = m_fields.begin(); vector<string>::iterator it = m_fields.begin();
@ -338,7 +338,9 @@ void RecollModel::addColumn(int col, const string& field)
QVariant RecollModel::headerData(int idx, Qt::Orientation orientation, QVariant RecollModel::headerData(int idx, Qt::Orientation orientation,
int role) const int role) const
{ {
LOGDEB2("RecollModel::headerData: idx " << (idx) << " orientation " << (orientation == Qt::Vertical ? "vertical":"horizontal") << " role " << (role) << "\n" ); LOGDEB2("RecollModel::headerData: idx " << idx << " orientation " <<
(orientation == Qt::Vertical ? "vertical":"horizontal") <<
" role " << role << "\n");
if (orientation == Qt::Vertical && role == Qt::DisplayRole) { if (orientation == Qt::Vertical && role == Qt::DisplayRole) {
return idx; return idx;
} }
@ -356,7 +358,8 @@ QVariant RecollModel::headerData(int idx, Qt::Orientation orientation,
QVariant RecollModel::data(const QModelIndex& index, int role) const QVariant RecollModel::data(const QModelIndex& index, int role) const
{ {
LOGDEB2("RecollModel::data: row " << (index.row()) << " col " << (index.column()) << " role " << (role) << "\n" ); LOGDEB2("RecollModel::data: row " << index.row() << " col " <<
index.column() << " role " << role << "\n");
if (!m_source || role != Qt::DisplayRole || !index.isValid() || if (!m_source || role != Qt::DisplayRole || !index.isValid() ||
index.column() >= int(m_fields.size())) { index.column() >= int(m_fields.size())) {
return QVariant(); return QVariant();
@ -409,9 +412,10 @@ void RecollModel::saveAsCSV(FILE *fp)
// This gets called when the column headers are clicked // This gets called when the column headers are clicked
void RecollModel::sort(int column, Qt::SortOrder order) void RecollModel::sort(int column, Qt::SortOrder order)
{ {
if (m_ignoreSort) if (m_ignoreSort) {
return; return;
LOGDEB("RecollModel::sort(" << (column) << ", " << (int(order)) << ")\n" ); }
LOGDEB("RecollModel::sort(" << column << ", " << order << ")\n");
DocSeqSortSpec spec; DocSeqSortSpec spec;
if (column >= 0 && column < int(m_fields.size())) { if (column >= 0 && column < int(m_fields.size())) {
@ -524,8 +528,8 @@ void ResTable::init()
QKeySequence seq("Esc"); QKeySequence seq("Esc");
QShortcut *sc = new QShortcut(seq, this); QShortcut *sc = new QShortcut(seq, this);
connect(sc, SIGNAL (activated()), connect(sc, SIGNAL(activated()),
tableView->selectionModel(), SLOT (clear())); tableView->selectionModel(), SLOT(clear()));
connect(tableView->selectionModel(), connect(tableView->selectionModel(),
SIGNAL(currentChanged(const QModelIndex&, const QModelIndex &)), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex &)),
this, SLOT(onTableView_currentChanged(const QModelIndex&))); this, SLOT(onTableView_currentChanged(const QModelIndex&)));
@ -593,7 +597,7 @@ int ResTable::getDetailDocNumOrTopRow()
void ResTable::makeRowVisible(int row) void ResTable::makeRowVisible(int row)
{ {
LOGDEB("ResTable::showRow(" << (row) << ")\n" ); LOGDEB("ResTable::showRow(" << row << ")\n");
QModelIndex modelIndex = m_model->index(row, 0); QModelIndex modelIndex = m_model->index(row, 0);
tableView->scrollTo(modelIndex, QAbstractItemView::PositionAtTop); tableView->scrollTo(modelIndex, QAbstractItemView::PositionAtTop);
tableView->selectionModel()->clear(); tableView->selectionModel()->clear();
@ -612,7 +616,7 @@ void ResTable::saveColState()
QHeaderView *header = tableView->horizontalHeader(); QHeaderView *header = tableView->horizontalHeader();
const vector<string>& vf = m_model->getFields(); const vector<string>& vf = m_model->getFields();
if (!header) { if (!header) {
LOGERR("ResTable::saveColState: no table header ??\n" ); LOGERR("ResTable::saveColState: no table header ??\n");
return; return;
} }
@ -623,7 +627,7 @@ void ResTable::saveColState()
for (int vi = 0; vi < header->count(); vi++) { for (int vi = 0; vi < header->count(); vi++) {
int li = header->logicalIndex(vi); int li = header->logicalIndex(vi);
if (li < 0 || li >= int(vf.size())) { if (li < 0 || li >= int(vf.size())) {
LOGERR("saveColState: logical index beyond list size!\n" ); LOGERR("saveColState: logical index beyond list size!\n");
continue; continue;
} }
newfields.push_back(QString::fromUtf8(vf[li].c_str())); newfields.push_back(QString::fromUtf8(vf[li].c_str()));
@ -635,7 +639,8 @@ void ResTable::saveColState()
void ResTable::onTableView_currentChanged(const QModelIndex& index) void ResTable::onTableView_currentChanged(const QModelIndex& index)
{ {
LOGDEB2("ResTable::onTableView_currentChanged(" << (index.row()) << ", " << (index.column()) << ")\n" ); LOGDEB2("ResTable::onTableView_currentChanged(" << index.row() << ", " <<
index.column() << ")\n");
if (!m_model || !m_model->getDocSource()) if (!m_model || !m_model->getDocSource())
return; return;
@ -653,20 +658,21 @@ void ResTable::onTableView_currentChanged(const QModelIndex& index)
void ResTable::on_tableView_entered(const QModelIndex& index) void ResTable::on_tableView_entered(const QModelIndex& index)
{ {
LOGDEB2("ResTable::on_tableView_entered(" << (index.row()) << ", " << (index.column()) << ")\n" ); LOGDEB2("ResTable::on_tableView_entered(" << index.row() << ", " <<
index.column() << ")\n");
if (!tableView->selectionModel()->hasSelection()) if (!tableView->selectionModel()->hasSelection())
onTableView_currentChanged(index); onTableView_currentChanged(index);
} }
void ResTable::takeFocus() void ResTable::takeFocus()
{ {
// LOGDEB("resTable: take focus\n" ); // LOGDEB("resTable: take focus\n");
tableView->setFocus(Qt::ShortcutFocusReason); tableView->setFocus(Qt::ShortcutFocusReason);
} }
void ResTable::setDocSource(std::shared_ptr<DocSequence> nsource) void ResTable::setDocSource(std::shared_ptr<DocSequence> nsource)
{ {
LOGDEB("ResTable::setDocSource\n" ); LOGDEB("ResTable::setDocSource\n");
if (m_model) if (m_model)
m_model->setDocSource(nsource); m_model->setDocSource(nsource);
if (m_pager) if (m_pager)
@ -678,13 +684,13 @@ void ResTable::setDocSource(std::shared_ptr<DocSequence> nsource)
void ResTable::resetSource() void ResTable::resetSource()
{ {
LOGDEB("ResTable::resetSource\n" ); LOGDEB("ResTable::resetSource\n");
setDocSource(std::shared_ptr<DocSequence>()); setDocSource(std::shared_ptr<DocSequence>());
} }
void ResTable::saveAsCSV() void ResTable::saveAsCSV()
{ {
LOGDEB("ResTable::saveAsCSV\n" ); LOGDEB("ResTable::saveAsCSV\n");
if (!m_model) if (!m_model)
return; return;
QString s = QString s =
@ -708,7 +714,8 @@ void ResTable::saveAsCSV()
// This is called when the sort order is changed from another widget // This is called when the sort order is changed from another widget
void ResTable::onSortDataChanged(DocSeqSortSpec spec) void ResTable::onSortDataChanged(DocSeqSortSpec spec)
{ {
LOGDEB("ResTable::onSortDataChanged: [" << (spec.field) << "] desc " << (int(spec.desc)) << "\n" ); LOGDEB("ResTable::onSortDataChanged: [" << spec.field << "] desc " <<
spec.desc << "\n");
QHeaderView *header = tableView->horizontalHeader(); QHeaderView *header = tableView->horizontalHeader();
if (!header || !m_model) if (!header || !m_model)
return; return;
@ -732,7 +739,7 @@ void ResTable::onSortDataChanged(DocSeqSortSpec spec)
void ResTable::resetSort() void ResTable::resetSort()
{ {
LOGDEB("ResTable::resetSort()\n" ); LOGDEB("ResTable::resetSort()\n");
QHeaderView *header = tableView->horizontalHeader(); QHeaderView *header = tableView->horizontalHeader();
if (header) if (header)
header->setSortIndicator(-1, Qt::AscendingOrder); header->setSortIndicator(-1, Qt::AscendingOrder);
@ -743,7 +750,7 @@ void ResTable::resetSort()
void ResTable::readDocSource(bool resetPos) void ResTable::readDocSource(bool resetPos)
{ {
LOGDEB("ResTable::readDocSource(" << (int(resetPos)) << ")\n" ); LOGDEB("ResTable::readDocSource(" << resetPos << ")\n");
if (resetPos) if (resetPos)
tableView->verticalScrollBar()->setSliderPosition(0); tableView->verticalScrollBar()->setSliderPosition(0);
@ -759,7 +766,7 @@ void ResTable::linkWasClicked(const QUrl &url)
} }
QString s = url.toString(); QString s = url.toString();
const char *ascurl = s.toUtf8(); const char *ascurl = s.toUtf8();
LOGDEB("ResTable::linkWasClicked: [" << (ascurl) << "]\n" ); LOGDEB("ResTable::linkWasClicked: [" << ascurl << "]\n");
int i = atoi(ascurl+1) -1; int i = atoi(ascurl+1) -1;
int what = ascurl[0]; int what = ascurl[0];
@ -819,7 +826,7 @@ void ResTable::linkWasClicked(const QUrl &url)
break; break;
default: default:
LOGERR("ResTable::linkWasClicked: bad link [" << (ascurl) << "]\n" ); LOGERR("ResTable::linkWasClicked: bad link [" << ascurl << "]\n");
break;// ?? break;// ??
} }
} }
@ -842,7 +849,8 @@ void ResTable::onDoubleClick(const QModelIndex& index)
void ResTable::createPopupMenu(const QPoint& pos) void ResTable::createPopupMenu(const QPoint& pos)
{ {
LOGDEB("ResTable::createPopupMenu: m_detaildocnum " << (m_detaildocnum) << "\n" ); LOGDEB("ResTable::createPopupMenu: m_detaildocnum " << m_detaildocnum <<
"\n");
if (m_detaildocnum >= 0 && m_model) { if (m_detaildocnum >= 0 && m_model) {
int opts = m_ismainres? ResultPopup::isMain : 0; int opts = m_ismainres? ResultPopup::isMain : 0;
@ -973,7 +981,8 @@ void ResTable::menuShowSubDocs()
void ResTable::createHeaderPopupMenu(const QPoint& pos) void ResTable::createHeaderPopupMenu(const QPoint& pos)
{ {
LOGDEB("ResTable::createHeaderPopupMenu(" << (pos.x()) << ", " << (pos.y()) << ")\n" ); LOGDEB("ResTable::createHeaderPopupMenu(" << pos.x() << ", " <<
pos.y() << ")\n");
QHeaderView *header = tableView->horizontalHeader(); QHeaderView *header = tableView->horizontalHeader();
if (!header || !m_model) if (!header || !m_model)
return; return;
@ -1019,7 +1028,8 @@ void ResTable::addColumn()
if (!m_model) if (!m_model)
return; return;
QAction *action = (QAction *)sender(); QAction *action = (QAction *)sender();
LOGDEB("addColumn: text " << (qs2utf8s(action->text())) << ", data " << (qs2utf8s(action->data().toString())) << "\n" ); LOGDEB("addColumn: text " << qs2utf8s(action->text()) << ", data " <<
qs2utf8s(action->data().toString()) << "\n");
m_model->addColumn(m_popcolumn, qs2utf8s(action->data().toString())); m_model->addColumn(m_popcolumn, qs2utf8s(action->data().toString()));
} }