summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/dingwidget.cpp
Unidiff
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()
111 cfg.setGroup( "Method_"+methodname ); 111 cfg.setGroup( "Method_"+methodname );
112 //trenner = cfg.readEntry( "Seperator" ); 112 //trenner = cfg.readEntry( "Seperator" );
113} 113}
114 114
115BroswerContent DingWidget::parseInfo() 115BroswerContent DingWidget::parseInfo()
116{ 116{
117 QStringList search = lines.grep( queryword ); 117 QStringList search = lines.grep( queryword , isCaseSensitive );
118 118
119 QString current; 119 QString current;
120 QString left; 120 QString left;
121 QString right; 121 QString right;
122 QString html_header = "<html><table>"; 122 QString html_header = "<html><table>";
123 QString html_footer = "</table></html>"; 123 QString html_footer = "</table></html>";
124 QString html_table_left = "<tr><td width='50'>"; 124 QString html_table_left = "<tr><td width='50'>";
125 QString html_table_sep = "</td><td>"; 125 QString html_table_sep = "</td><td>";
126 QString html_table_right = "</td></tr>"; 126 QString html_table_right = "</td></tr>";
127 QRegExp reg_div( trenner ); 127 QRegExp reg_div( trenner );
128 QRegExp reg_word( queryword ); 128 QRegExp reg_word( queryword );
129 reg_word.setCaseSensitive( isCaseSensitive );
129 QStringList toplist, bottomlist; 130 QStringList toplist, bottomlist;
130 QString substitute = "<strong>"+queryword+"</strong>"; 131 QString substitute = "<strong>"+queryword+"</strong>";
131 132
132 /* Dieser Block ist von Patrik. Ich versuche einen neuen 133 /* Dieser Block ist von Patrik. Ich versuche einen neuen
133 * Ansatz. Zum einen ist HTML scheiße an dieser Stelle und 134 * Ansatz. Zum einen ist HTML scheiße an dieser Stelle und
134 * zum andern funktioniert der Code nicht so wie er sollte. 135 * zum andern funktioniert der Code nicht so wie er sollte.
@@ -160,13 +161,13 @@ BroswerContent DingWidget::parseInfo()
160 { 161 {
161 current = *it; 162 current = *it;
162 left = current.left( current.find( trenner ) ); 163 left = current.left( current.find( trenner ) );
163 164
164 right = current.right( current.length() - current.find(trenner) -2 ); 165 right = current.right( current.length() - current.find(trenner) -2 );
165 166
166 if ( left.contains( queryword ) ) 167 if ( left.contains( queryword , isCaseSensitive ) )
167 { 168 {
168 left.replace( queryword, substitute ); 169 left.replace( queryword, substitute );
169 left = left + "-->" + right; 170 left = left + "-->" + right;
170 toplist.append( left ); 171 toplist.append( left );
171 } 172 }
172 else 173 else