summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index ef36ee5..3eb1e45 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -30,24 +30,25 @@ DingWidget::DingWidget( )
30void DingWidget::loadDict( QString name ) 30void DingWidget::loadDict( QString name )
31{ 31{
32 lines.clear(); //as we will load a new list we have to 32 lines.clear(); //as we will load a new list we have to
33 //remove the old one 33 //remove the old one
34 34
35 Config cfg( "odict" ); 35 Config cfg( "odict" );
36 cfg.setGroup( "Method_" + name ); 36 cfg.setGroup( "Method_" + name );
37 QFile file( cfg.readEntry( "file" ) ); 37 QFile file( cfg.readEntry( "file" ) );
38 38
39 if( file.open( IO_ReadOnly ) ) 39 if( file.open( IO_ReadOnly ) )
40 { 40 {
41 QTextStream stream( &file ); 41 QTextStream stream( &file );
42 stream.setEncoding(QTextStream::UnicodeUTF8);
42 while ( !stream.eof() ) 43 while ( !stream.eof() )
43 { 44 {
44 lines.append( stream.readLine() ); 45 lines.append( stream.readLine() );
45 } 46 }
46 file.close(); 47 file.close();
47 } 48 }
48 49
49 setDict( name ); 50 setDict( name );
50 51
51 loadValues(); 52 loadValues();
52} 53}
53 54