summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2003-01-12 16:16:13 (UTC)
committer cniehaus <cniehaus>2003-01-12 16:16:13 (UTC)
commitaa4f80fdc2d78bfe1c1d4cb8ec1d852115d00fc7 (patch) (unidiff)
treed102e440196aea471b3ed8d0357934a1a9f2e385
parent6e7d82135cdab0190739d2ddf84cd2211d18d00b (diff)
downloadopie-aa4f80fdc2d78bfe1c1d4cb8ec1d852115d00fc7.zip
opie-aa4f80fdc2d78bfe1c1d4cb8ec1d852115d00fc7.tar.gz
opie-aa4f80fdc2d78bfe1c1d4cb8ec1d852115d00fc7.tar.bz2
Make search for only complete words working. Removing qDebug-lines. Fix a
bug (the seperator has not been loaded).
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp28
-rw-r--r--noncore/apps/odict/dingwidget.h2
-rw-r--r--noncore/apps/odict/odict.cpp6
3 files changed, 13 insertions, 23 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index 5b5d731..cfef84d 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -36,13 +36,4 @@ DingWidget::DingWidget( )
36 methodname = QString::null; 36 methodname = QString::null;
37 trenner = "::";//QString::null; 37 trenner = QString::null;
38 lines = 0L; 38 lines = 0L;
39 loadValues();
40
41 //X qDebug( topbrowser );
42 //X qDebug( top );
43//X
44 //X topbrowser = "blahbalh";
45 //X
46 //X qDebug( topbrowser );
47 //X qDebug( top );
48} 39}
@@ -70,2 +61,3 @@ void DingWidget::loadDict( QString name )
70 qDebug( "loadedDict(...) ist beended" ); 61 qDebug( "loadedDict(...) ist beended" );
62 loadValues();
71} 63}
@@ -110,4 +102,4 @@ void DingWidget::loadValues()
110 Config cfg( "odict" ); 102 Config cfg( "odict" );
111 cfg.setGroup( "Method_"+methodname ); 103 cfg.setGroup( "Method_" + methodname );
112 //trenner = cfg.readEntry( "Seperator" ); 104 trenner = cfg.readEntry( "Seperator" );
113} 105}
@@ -116,2 +108,3 @@ BroswerContent DingWidget::parseInfo()
116{ 108{
109 if ( isCompleteWord ) queryword = " " + queryword + " ";
117 QStringList search = lines.grep( queryword , isCaseSensitive ); 110 QStringList search = lines.grep( queryword , isCaseSensitive );
@@ -121,7 +114,2 @@ BroswerContent DingWidget::parseInfo()
121 QString right; 114 QString right;
122 QString html_header = "<html><table>";
123 QString html_footer = "</table></html>";
124 QString html_table_left = "<tr><td width='50'>";
125 QString html_table_sep = "</td><td>";
126 QString html_table_right = "</td></tr>";
127 QRegExp reg_div( trenner ); 115 QRegExp reg_div( trenner );
@@ -136,2 +124,8 @@ BroswerContent DingWidget::parseInfo()
136 QString substitute = "<a href=''>"+queryword+"</a>"; 124 QString substitute = "<a href=''>"+queryword+"</a>";
125
126 QString html_header = "<html><table>";
127 QString html_footer = "</table></html>";
128 QString html_table_left = "<tr><td width='50'>";
129 QString html_table_sep = "</td><td>";
130 QString html_table_right = "</td></tr>";
137 131
diff --git a/noncore/apps/odict/dingwidget.h b/noncore/apps/odict/dingwidget.h
index ba37009..74f40c9 100644
--- a/noncore/apps/odict/dingwidget.h
+++ b/noncore/apps/odict/dingwidget.h
@@ -31,2 +31,3 @@ class DingWidget
31 void setDict( QString ); 31 void setDict( QString );
32 void loadValues();
32 33
@@ -42,3 +43,2 @@ class DingWidget
42 QString search_word; 43 QString search_word;
43 void loadValues();
44 QString queryword; 44 QString queryword;
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 42604ee..78c3f90 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -59,2 +59,3 @@ ODict::ODict() : QMainWindow()
59 ding = new DingWidget(); 59 ding = new DingWidget();
60 ding->loadValues();
60 61
@@ -112,5 +113,2 @@ void ODict::slotStartQuery()
112 113
113 if ( casesens ) qDebug( "casesens = TRUE" );
114 else qDebug( "casesens = FALSE" );
115
116 ding->setCaseSensitive( casesens ); 114 ding->setCaseSensitive( casesens );
@@ -121,6 +119,4 @@ void ODict::slotStartQuery()
121 { 119 {
122 qDebug( "ComboBox geändert" );
123 ding->loadDict(activated_name); 120 ding->loadDict(activated_name);
124 } 121 }
125 else qDebug( "ComboBox war GLEICH" );
126 122