summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/dingwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict/dingwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index 7abad22..5b5d731 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -111,24 +111,25 @@ void DingWidget::loadValues()
cfg.setGroup( "Method_"+methodname );
//trenner = cfg.readEntry( "Seperator" );
}
BroswerContent DingWidget::parseInfo()
{
- QStringList search = lines.grep( queryword );
+ QStringList search = lines.grep( queryword , isCaseSensitive );
QString current;
QString left;
QString right;
QString html_header = "<html><table>";
QString html_footer = "</table></html>";
QString html_table_left = "<tr><td width='50'>";
QString html_table_sep = "</td><td>";
QString html_table_right = "</td></tr>";
QRegExp reg_div( trenner );
QRegExp reg_word( queryword );
+ reg_word.setCaseSensitive( isCaseSensitive );
QStringList toplist, bottomlist;
QString substitute = "<strong>"+queryword+"</strong>";
/* Dieser Block ist von Patrik. Ich versuche einen neuen
* Ansatz. Zum einen ist HTML scheiße an dieser Stelle und
* zum andern funktioniert der Code nicht so wie er sollte.
@@ -160,13 +161,13 @@ BroswerContent DingWidget::parseInfo()
{
current = *it;
left = current.left( current.find( trenner ) );
right = current.right( current.length() - current.find(trenner) -2 );
- if ( left.contains( queryword ) )
+ if ( left.contains( queryword , isCaseSensitive ) )
{
left.replace( queryword, substitute );
left = left + "-->" + right;
toplist.append( left );
}
else