|
a/src/qtgui/ssearch_w.cpp |
|
b/src/qtgui/ssearch_w.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: ssearch_w.cpp,v 1.15 2006-12-08 07:11:17 dockes Exp $ (C) 2006 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: ssearch_w.cpp,v 1.16 2006-12-14 13:53:43 dockes Exp $ (C) 2006 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
63 |
clearqPB->setEnabled(false);
|
63 |
clearqPB->setEnabled(false);
|
64 |
emit clearSearch();
|
64 |
emit clearSearch();
|
65 |
} else {
|
65 |
} else {
|
66 |
searchPB->setEnabled(true);
|
66 |
searchPB->setEnabled(true);
|
67 |
clearqPB->setEnabled(true);
|
67 |
clearqPB->setEnabled(true);
|
68 |
string u8 = (const char *)queryText->currentText().utf8();
|
|
|
69 |
if (prefs.autoSearchOnWS && !u8.empty() && u8[u8.length()-1] == ' ')
|
|
|
70 |
startSimpleSearch();
|
|
|
71 |
}
|
68 |
}
|
72 |
}
|
69 |
}
|
73 |
|
70 |
|
74 |
void SSearch::startSimpleSearch()
|
71 |
void SSearch::startSimpleSearch()
|
75 |
{
|
72 |
{
|
|
... |
|
... |
225 |
LOGDEB(("Escape space\n"));
|
222 |
LOGDEB(("Escape space\n"));
|
226 |
ke->accept();
|
223 |
ke->accept();
|
227 |
completion();
|
224 |
completion();
|
228 |
m_escape = false;
|
225 |
m_escape = false;
|
229 |
return true;
|
226 |
return true;
|
230 |
} else {
|
227 |
} else if (ke->key() == Qt::Key_Space) {
|
231 |
m_escape = false;
|
228 |
if (prefs.autoSearchOnWS)
|
|
|
229 |
startSimpleSearch();
|
232 |
}
|
230 |
}
|
|
|
231 |
m_escape = false;
|
233 |
}
|
232 |
}
|
234 |
return QWidget::eventFilter(target, event);
|
233 |
return QWidget::eventFilter(target, event);
|
235 |
}
|
234 |
}
|
236 |
|
|
|
237 |
|
|
|