author | cniehaus <cniehaus> | 2003-05-02 13:41:37 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-05-02 13:41:37 (UTC) |
commit | b40991b25dd22c55cc80a9a9c4ae0adec103d575 (patch) (side-by-side diff) | |
tree | a5d0ba564cf7809bdb603e0fcefac899f301c16c /noncore/apps/odict/dingwidget.cpp | |
parent | 6ba2bb2dde0c69ffeba860a9375bab82521e9304 (diff) | |
download | opie-b40991b25dd22c55cc80a9a9c4ae0adec103d575.zip opie-b40991b25dd22c55cc80a9a9c4ae0adec103d575.tar.gz opie-b40991b25dd22c55cc80a9a9c4ae0adec103d575.tar.bz2 |
bugfix
Diffstat (limited to 'noncore/apps/odict/dingwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/odict/dingwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp index 5c4b13b..abb5e75 100644 --- a/noncore/apps/odict/dingwidget.cpp +++ b/noncore/apps/odict/dingwidget.cpp @@ -19,39 +19,38 @@ #include <qfile.h> #include <qpe/config.h> #include <qhbox.h> #include <qlabel.h> #include <qpushbutton.h> #include <qlineedit.h> #include <qmainwindow.h> #include <qstring.h> #include <qtextstream.h> #include <qstringlist.h> #include <qregexp.h> #include <qtextbrowser.h> -#include <stdlib.h> // for getenv +//#include <stdlib.h> // for getenv DingWidget::DingWidget( ) { methodname = QString::null; trenner = QString::null; lines = 0L; } void DingWidget::loadDict( QString name ) { dictName = name; - QString opie_dir = getenv("OPIEDIR"); - Config cfg( "odict" ); + if ( !methodname ) return; cfg.setGroup( "Method_" + methodname ); QFile file( cfg.readEntry( "file" ) ); if( file.open( IO_ReadOnly ) ) { QTextStream stream( &file ); while ( !stream.eof() ) { lines.append( stream.readLine() ); } file.close(); } @@ -77,24 +76,25 @@ void DingWidget::setCompleteWord( bool cword ) { isCompleteWord = cword; } void DingWidget::setQueryWord( QString qword ) { queryword = qword; } void DingWidget::loadValues() { + if ( !methodname ) return; Config cfg( "odict" ); cfg.setGroup( "Method_" + methodname ); trenner = cfg.readEntry( "Seperator" ); } BroswerContent DingWidget::setText( QString word ) { queryword = word; return parseInfo(); } |