summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/dingwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict/dingwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp7
1 files changed, 5 insertions, 2 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
@@ -33,9 +33,8 @@ DingWidget::DingWidget( )
void DingWidget::loadDict( QString name )
{
lines.clear(); //as we will load a new list we have to
//remove the old one
- qDebug( "DingWidget::loadDict( ... )" );
Config cfg( "odict" );
cfg.setGroup( "Method_" + name );
QFile file( cfg.readEntry( "file" ) );
@@ -48,8 +47,11 @@ void DingWidget::loadDict( QString name )
lines.append( stream.readLine() );
}
file.close();
}
+
+ setDict( name );
+
loadValues();
}
QString DingWidget::loadedDict() const
@@ -78,8 +80,9 @@ void DingWidget::loadValues()
if ( !methodname ) return;
Config cfg( "odict" );
cfg.setGroup( "Method_" + methodname );
trenner = cfg.readEntry( "Seperator" );
+
lang1_name = cfg.readEntry( "Lang1" );
lang2_name = cfg.readEntry( "Lang2" );
}
@@ -115,9 +118,9 @@ BroswerContent DingWidget::parseInfo()
left.replace( queryword, substitute );
left = left + " --> " + right;
toplist.append( left );
}
- else
+ else if( right.contains( queryword , isCaseSensitive ) )
{
right.replace( queryword, substitute );
right = right + " --> " + left;
bottomlist.append( right );