summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2003-05-10 20:58:31 (UTC)
committer cniehaus <cniehaus>2003-05-10 20:58:31 (UTC)
commitcd5ea84b4061c1d3b8401252fd2c36efade02c95 (patch) (unidiff)
treec97d2f5ed8a1fed0c2aec3aafdf621e996719663
parent1bff948326aa752c3f4aceac4083717f8c2066e8 (diff)
downloadopie-cd5ea84b4061c1d3b8401252fd2c36efade02c95.zip
opie-cd5ea84b4061c1d3b8401252fd2c36efade02c95.tar.gz
opie-cd5ea84b4061c1d3b8401252fd2c36efade02c95.tar.bz2
fix a stupid bug
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp7
-rw-r--r--noncore/apps/odict/dingwidget.h3
-rw-r--r--noncore/apps/odict/odict.cpp6
3 files changed, 7 insertions, 9 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index 55a716d..c804385 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -34,7 +34,6 @@ void DingWidget::loadDict( QString name )
34{ 34{
35 lines.clear(); //as we will load a new list we have to 35 lines.clear(); //as we will load a new list we have to
36 //remove the old one 36 //remove the old one
37 qDebug( "DingWidget::loadDict( ... )" );
38 37
39 Config cfg( "odict" ); 38 Config cfg( "odict" );
40 cfg.setGroup( "Method_" + name ); 39 cfg.setGroup( "Method_" + name );
@@ -49,6 +48,9 @@ void DingWidget::loadDict( QString name )
49 } 48 }
50 file.close(); 49 file.close();
51 } 50 }
51
52 setDict( name );
53
52 loadValues(); 54 loadValues();
53} 55}
54 56
@@ -79,6 +81,7 @@ void DingWidget::loadValues()
79 Config cfg( "odict" ); 81 Config cfg( "odict" );
80 cfg.setGroup( "Method_" + methodname ); 82 cfg.setGroup( "Method_" + methodname );
81 trenner = cfg.readEntry( "Seperator" ); 83 trenner = cfg.readEntry( "Seperator" );
84
82 lang1_name = cfg.readEntry( "Lang1" ); 85 lang1_name = cfg.readEntry( "Lang1" );
83 lang2_name = cfg.readEntry( "Lang2" ); 86 lang2_name = cfg.readEntry( "Lang2" );
84} 87}
@@ -116,7 +119,7 @@ BroswerContent DingWidget::parseInfo()
116 left = left + " --> " + right; 119 left = left + " --> " + right;
117 toplist.append( left ); 120 toplist.append( left );
118 } 121 }
119 else 122 else if( right.contains( queryword , isCaseSensitive ) )
120 { 123 {
121 right.replace( queryword, substitute ); 124 right.replace( queryword, substitute );
122 right = right + " --> " + left; 125 right = right + " --> " + left;
diff --git a/noncore/apps/odict/dingwidget.h b/noncore/apps/odict/dingwidget.h
index dbb55e2..9163a43 100644
--- a/noncore/apps/odict/dingwidget.h
+++ b/noncore/apps/odict/dingwidget.h
@@ -24,7 +24,6 @@ class DingWidget
24 BroswerContent setText( QString ); 24 BroswerContent setText( QString );
25 QStringList lines; 25 QStringList lines;
26 void setCaseSensitive( bool ); 26 void setCaseSensitive( bool );
27 void setCompleteWord( bool );
28 void loadDict( QString ); 27 void loadDict( QString );
29 QString loadedDict() const; 28 QString loadedDict() const;
30 void setQueryWord( QString ); 29 void setQueryWord( QString );
@@ -35,11 +34,11 @@ class DingWidget
35 lang2_name; 34 lang2_name;
36 35
37 bool isCaseSensitive; 36 bool isCaseSensitive;
37
38 private: 38 private:
39 BroswerContent parseInfo(); 39 BroswerContent parseInfo();
40 40
41 BroswerContent s_strings; 41 BroswerContent s_strings;
42 bool isCompleteWord;
43 42
44 QString dictName; 43 QString dictName;
45 44
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index c1de6ac..2028701 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -61,7 +61,6 @@ ODict::ODict() : QMainWindow()
61 browser_bottom = new QTextBrowser( vbox ); 61 browser_bottom = new QTextBrowser( vbox );
62 62
63 ding = new DingWidget(); 63 ding = new DingWidget();
64 ding->loadValues();
65 64
66 loadConfig(); 65 loadConfig();
67 setCentralWidget( vbox ); 66 setCentralWidget( vbox );
@@ -108,6 +107,7 @@ void ODict::loadConfig()
108 107
109 lookupLanguageNames( lastname ); 108 lookupLanguageNames( lastname );
110 ding->loadDict( lastname ); 109 ding->loadDict( lastname );
110 ding->loadValues();
111 111
112 query_co->setCurrentItem( e ); 112 query_co->setCurrentItem( e );
113 top_name->setText( top_name_content ); 113 top_name->setText( top_name_content );
@@ -199,10 +199,6 @@ void ODict::slotMethodChanged( const QString& methodnumber )
199{ 199{
200 activated_name = methodnumber; 200 activated_name = methodnumber;
201 201
202 qDebug( "activated_name in slotMethodChanged() ist:" );
203 qDebug( activated_name );
204 qDebug( ding->loadedDict() );
205
206 if ( activated_name != ding->loadedDict() ) 202 if ( activated_name != ding->loadedDict() )
207 { 203 {
208 ding->loadDict(activated_name); 204 ding->loadDict(activated_name);