"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "qtgui/reslist.cpp" between
recoll-1.27.11.tar.gz and recoll-1.27.12.tar.gz

About: Recoll is a personal full text search tool based on Xapian as back-end (with Qt GUI).

reslist.cpp  (recoll-1.27.11):reslist.cpp  (recoll-1.27.12)
skipping to change at line 976 skipping to change at line 976
// baseUrl because we receive links like baseUrl+P1 instead. // baseUrl because we receive links like baseUrl+P1 instead.
LOGDEB1("ResList::onLinkClicked: [" << strurl << "] prefix " << LOGDEB1("ResList::onLinkClicked: [" << strurl << "] prefix " <<
m_pager->linkPrefix() << "\n"); m_pager->linkPrefix() << "\n");
if (m_pager->linkPrefix().size() > 0 && if (m_pager->linkPrefix().size() > 0 &&
(strurl.size() <= m_pager->linkPrefix().size() || (strurl.size() <= m_pager->linkPrefix().size() ||
!beginswith(strurl, m_pager->linkPrefix()))) { !beginswith(strurl, m_pager->linkPrefix()))) {
return; return;
} }
strurl = strurl.substr(m_pager->linkPrefix().size()); strurl = strurl.substr(m_pager->linkPrefix().size());
// The content of our URLs is always a single letter possibly
// followed by an integer value (document number).
if (strurl.size() == 0) { if (strurl.size() == 0) {
return; return;
} }
int docnum{-1}; int docnum{-1};
bool havedoc{false}; bool havedoc{false};
Rcl::Doc doc; Rcl::Doc doc;
if (strurl.size() > 1) { if (strurl.size() > 1) {
// Expecting integer after the letter, and nothing else // If an integer follows interpret as doc number
const char *bptr = strurl.c_str() + 1; const char *bptr = strurl.c_str() + 1;
char *eptr; char *eptr;
docnum = strtol(bptr, &eptr, 10) - 1; docnum = strtol(bptr, &eptr, 10) - 1;
if (eptr == bptr || *eptr != 0) {
// No digits or non-digit characters following digits, bad link.
return;
}
if (docnum >= 0) { if (docnum >= 0) {
if (getDoc(docnum, doc)) { if (getDoc(docnum, doc)) {
havedoc = true; havedoc = true;
} else { } else {
LOGERR("ResList::onLinkClicked: can't get doc for "<< LOGERR("ResList::onLinkClicked: can't get doc for "<<
docnum << "\n"); docnum << "\n");
return;
} }
} }
} }
int what = strurl[0]; int what = strurl[0];
switch (what) { switch (what) {
// Open abstract/snippets window // Open abstract/snippets window
case 'A': case 'A':
{ {
 End of changes. 4 change blocks. 
8 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)