mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix for ticket #124
Search don't work with utf8 chars. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4574 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ac6f4539e9
commit
154d315c92
@ -557,7 +557,7 @@ void SearchDialog::initSearchResult(const std::string& txt,qulonglong searchId)
|
||||
QString sid_hexa = QString::number(searchId,16) ;
|
||||
|
||||
QTreeWidgetItem *item2 = new QTreeWidgetItem();
|
||||
item2->setText(SS_TEXT_COL, QString::fromStdString(txt));
|
||||
item2->setText(SS_TEXT_COL, QString::fromUtf8(txt.c_str()));
|
||||
item2->setText(SS_COUNT_COL, QString::number(0));
|
||||
item2->setText(SS_SEARCH_ID_COL, sid_hexa);
|
||||
|
||||
@ -601,7 +601,7 @@ void SearchDialog::searchKeywords()
|
||||
|
||||
void SearchDialog::searchKeywords(const QString& keywords)
|
||||
{
|
||||
std::string txt = keywords.toStdString();
|
||||
std::string txt = keywords.toUtf8().constData();
|
||||
|
||||
if(txt.length() < 3)
|
||||
return ;
|
||||
@ -612,7 +612,7 @@ void SearchDialog::searchKeywords(const QString& keywords)
|
||||
std::list<std::string> words;
|
||||
QStringListIterator qWordsIter(qWords);
|
||||
while (qWordsIter.hasNext())
|
||||
words.push_back(qWordsIter.next().toStdString());
|
||||
words.push_back(qWordsIter.next().toUtf8().constData());
|
||||
|
||||
int n = words.size() ;
|
||||
|
||||
|
@ -158,7 +158,7 @@ Expression* ExpressionWidget::getRsExpression()
|
||||
QString txt = exprParamElem->getStrSearchValue();
|
||||
QStringList words = txt.split(" ", QString::SkipEmptyParts);
|
||||
for (int i = 0; i < words.size(); ++i)
|
||||
wordList.push_back(words.at(i).toStdString());
|
||||
wordList.push_back(words.at(i).toUtf8().constData());
|
||||
} else if (inRangedConfig){
|
||||
// correct for reversed ranges to be nice to the user
|
||||
lowVal = exprParamElem->getIntLowValue();
|
||||
|
Loading…
Reference in New Issue
Block a user