very small effort to look like xesam simple query
This commit is contained in:
parent
33a7a320fa
commit
5aaa3032d9
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: wasastringtoquery.cpp,v 1.5 2007-02-12 18:16:08 dockes Exp $ (C) 2006 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: wasastringtoquery.cpp,v 1.6 2007-11-16 12:21:46 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -111,7 +111,7 @@ void WasaQuery::describe(string &desc) const
|
|||||||
* parenthesis increases the index, but we're not interested in all
|
* parenthesis increases the index, but we're not interested in all
|
||||||
*/
|
*/
|
||||||
static const char * parserExpr =
|
static const char * parserExpr =
|
||||||
"([oO][rR])[[:space:]]*" //1 OR is a special word
|
"([oO][rR]|\\|\\|)[[:space:]]*" //1 OR,or,||
|
||||||
"|"
|
"|"
|
||||||
"(" //2
|
"(" //2
|
||||||
"([+-])?" //3 Force or exclude indicator
|
"([+-])?" //3 Force or exclude indicator
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: wasatorcl.cpp,v 1.11 2007-10-25 07:27:30 dockes Exp $ (C) 2006 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: wasatorcl.cpp,v 1.12 2007-11-16 12:21:46 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -68,7 +68,11 @@ Rcl::SearchData *wasaQueryToRcl(WasaQuery *wasa)
|
|||||||
sdata->addFiletype((*it)->m_value);
|
sdata->addFiletype((*it)->m_value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!stringicmp("rclcat", (*it)->m_fieldspec)) {
|
|
||||||
|
// Xesam uses "type", we also support "rclcat", for broad
|
||||||
|
// categories like "audio", "presentation", etc.
|
||||||
|
if (!stringicmp("rclcat", (*it)->m_fieldspec) ||
|
||||||
|
!stringicmp("type", (*it)->m_fieldspec)) {
|
||||||
RclConfig *conf = RclConfig::getMainConfig();
|
RclConfig *conf = RclConfig::getMainConfig();
|
||||||
list<string> mtypes;
|
list<string> mtypes;
|
||||||
if (conf && conf->getMimeCatTypes((*it)->m_value, mtypes)) {
|
if (conf && conf->getMimeCatTypes((*it)->m_value, mtypes)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user