added code to specifically index/search file names
This commit is contained in:
+61
-54
@@ -24,7 +24,7 @@
|
||||
</property>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout13</cstring>
|
||||
<cstring>layout12</cstring>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
@@ -32,18 +32,12 @@
|
||||
</property>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout15</cstring>
|
||||
<cstring>layout11</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel2</cstring>
|
||||
@@ -54,12 +48,54 @@
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout14</cstring>
|
||||
<cstring>layout10</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>orWordsTL</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Any of these words</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="2" column="2">
|
||||
<property name="name">
|
||||
<cstring>orWordsLE</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="4" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel1_2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>File name</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="4" column="2">
|
||||
<property name="name">
|
||||
<cstring>fileNameLE</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>noWordsTL</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>None of these words</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="3" column="2">
|
||||
<property name="name">
|
||||
<cstring>noWordsLE</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>andWordsTL</cstring>
|
||||
@@ -74,7 +110,7 @@
|
||||
<string>All these words</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
|
||||
<widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>andWordsLE</cstring>
|
||||
</property>
|
||||
@@ -93,40 +129,11 @@
|
||||
<string>This exact phrase</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="1" column="2" rowspan="1" colspan="2">
|
||||
<widget class="QLineEdit" row="1" column="2">
|
||||
<property name="name">
|
||||
<cstring>phraseLE</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>orWordsTL</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Any of these words</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="2" column="2" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>orWordsLE</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="0" rowspan="1" colspan="3">
|
||||
<property name="name">
|
||||
<cstring>noWordsTL</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>None of these words</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="3" column="3">
|
||||
<property name="name">
|
||||
<cstring>noWordsLE</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</hbox>
|
||||
@@ -353,20 +360,6 @@
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="Line">
|
||||
<property name="name">
|
||||
<cstring>line1</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout25</cstring>
|
||||
@@ -398,6 +391,20 @@
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<widget class="Line">
|
||||
<property name="name">
|
||||
<cstring>line1</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
|
||||
@@ -131,6 +131,7 @@ void advsearch::searchPB_clicked()
|
||||
mydata.phrase = string((const char*)(phraseLE->text().utf8()));
|
||||
mydata.orwords = string((const char*)(orWordsLE->text().utf8()));
|
||||
mydata.nowords = string((const char*)(noWordsLE->text().utf8()));
|
||||
mydata.filename = string((const char*)(fileNameLE->text().utf8()));
|
||||
if (restrictFtCB->isOn() && noFiltypsLB->count() > 0) {
|
||||
for (unsigned int i = 0; i < yesFiltypsLB->count(); i++) {
|
||||
QCString ctext = yesFiltypsLB->item(i)->text().utf8();
|
||||
|
||||
@@ -75,6 +75,23 @@
|
||||
<string>If this is set, each returned document will contain all the terms in the query. Else documents will be ordered by relevance, but may not contain all the terms.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>isFNameCB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&File name</string>
|
||||
</property>
|
||||
<property name="accel">
|
||||
<string>Alt+F</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Search is on file names only, and may use wildcards.</string>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>If this is set, the search will only be performed on file names. Wildcards ? and * can be used and will be matched as in a shell command line.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit">
|
||||
<property name="name">
|
||||
<cstring>queryText</cstring>
|
||||
|
||||
@@ -44,9 +44,11 @@ void SSearchBase::startSimpleSearch()
|
||||
LOGDEB(("SSearchBase::startSimpleSearch\n"));
|
||||
|
||||
Rcl::AdvSearchData sdata;
|
||||
|
||||
QCString u8 = queryText->text().utf8();
|
||||
if (allTermsCB->isChecked())
|
||||
|
||||
if (isFNameCB->isChecked())
|
||||
sdata.filename = u8;
|
||||
else if (allTermsCB->isChecked())
|
||||
sdata.allwords = u8;
|
||||
else
|
||||
sdata.orwords = u8;
|
||||
|
||||
Reference in New Issue
Block a user