From e3fa5685865712ca930d9124b974506766e7b11e Mon Sep 17 00:00:00 2001 From: cniehaus Date: Sat, 11 Jan 2003 18:28:09 +0000 Subject: check if the user want to serach casesensitive or not --- 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 @@ -114,7 +114,7 @@ void DingWidget::loadValues() BroswerContent DingWidget::parseInfo() { - QStringList search = lines.grep( queryword ); + QStringList search = lines.grep( queryword , isCaseSensitive ); QString current; QString left; @@ -126,6 +126,7 @@ BroswerContent DingWidget::parseInfo() QString html_table_right = ""; QRegExp reg_div( trenner ); QRegExp reg_word( queryword ); + reg_word.setCaseSensitive( isCaseSensitive ); QStringList toplist, bottomlist; QString substitute = ""+queryword+""; @@ -163,7 +164,7 @@ BroswerContent DingWidget::parseInfo() 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; diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 549c40a..42604ee 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp @@ -94,7 +94,7 @@ void ODict::saveConfig() void ODict::slotDisplayAbout() { - QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030108" ) ); + QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030111" ) ); } void ODict::slotStartQuery() @@ -109,16 +109,14 @@ void ODict::slotStartQuery() //X QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") ); //X else //X { + + if ( casesens ) qDebug( "casesens = TRUE" ); + else qDebug( "casesens = FALSE" ); ding->setCaseSensitive( casesens ); ding->setCompleteWord( completewords ); ding->setDict( activated_name ); - qDebug( " activated_name ist :" ); - qDebug( activated_name ); - - qDebug( " loadedDict() ist :" ); - qDebug( ding->loadedDict() ); if ( activated_name != ding->loadedDict() ) { qDebug( "ComboBox geändert" ); @@ -132,9 +130,7 @@ void ODict::slotStartQuery() browser_bottom->setText( test.bottom ); qDebug( "Text sollte gesetzt sein..." ); - //X } - } -- cgit v0.9.0.2