more on glimpse problem...

Pascal Pascal_kdevelop at yahoo.com
Tue Aug 21 17:07:08 BST 2001


Hi KDevelopers,

there are two problems with glimpse >4.12/4.13:

(1) It seems the output format of glimpse changed, so that searchToolGetTitle 
and URL fail... Examples:

/usr/local/qt/doc/html//index: 125
/usr/local/qt/doc/html//propertyindex: 10
/usr/local/qt/doc/html//titleindex: 10
/usr/local/qt/doc/html//whatsthis: 5

FILE ckdevelop.cpp:

The text we are looking for is now *left* of a column ':', and not right of 
space... (str.find is duplicated by the way)

QString CKDevelop::searchToolGetTitle(QString str){
  int pos = str.find(' ');	
  pos = str.find(' ',pos);
  int end_pos = str.findRev(':');
  return str.mid(pos,end_pos-pos);
}

QString CKDevelop::searchToolGetURL(QString str){
  int pos = str.find(' ');
  return str.left(pos);
}

(2) glimpse does not yield any hits when glimpseindex was called with both 
the -F and -X option... This is a bug in my opinion, and I've already 
reported that. The following may provide a workaround (not passing the file 
names on the command line, but indexing whole dirs instead.) However, I don't 
know whether this is compatible with old glimpse versions.

FILE setup/ccreatedocdatabasedlg.cpp

  if (useGlimpse->isChecked())
  {
//    *m_proc <<  "find "+ dirs +" -name '*.html' | glimpseindex " +
//                    size_str +" -F -X -H "+ locateLocal("appdata","");

    *m_proc <<  "glimpseindex " + size_str +" -X -H "+ 	
locateLocal("appdata","") + " " +dirs;	// <== fix

Hope this helps

Pascal


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list