author | llornkcor <llornkcor> | 2003-02-16 20:54:08 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-02-16 20:54:08 (UTC) |
commit | 64178d4839f12540b8a3d19cf79c9c2b1d33707e (patch) (side-by-side diff) | |
tree | c8e1b65c379e286b9f8f6750b0c69eaf5c00235c | |
parent | b24a37c7e412cdf49f5d93c8ab51786b6cda24fb (diff) | |
download | opie-64178d4839f12540b8a3d19cf79c9c2b1d33707e.zip opie-64178d4839f12540b8a3d19cf79c9c2b1d33707e.tar.gz opie-64178d4839f12540b8a3d19cf79c9c2b1d33707e.tar.bz2 |
fix for bug 616- hitting ok when no file is selected hangs
-rw-r--r-- | core/apps/textedit/textedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 4cf1b07..e931f01 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -608,65 +608,65 @@ void TextEdit::setWordWrap(bool y) { void TextEdit::setSearchBar(bool b) { useSearchBar=b; Config cfg("TextEdit"); cfg.setGroup("View"); cfg.writeEntry ( "SearchBar", b ); searchBarAction->setOn(b); if(b) searchBar->show(); else searchBar->hide(); editor->setFocus(); } void TextEdit::fileNew() { // if( !bFromDocView ) { // saveAs(); // } newFile(DocLnk()); } void TextEdit::fileOpen() { QMap<QString, QStringList> map; map.insert(tr("All"), QStringList() ); QStringList text; text << "text/*"; map.insert(tr("Text"), text ); text << "*"; map.insert(tr("All"), text ); QString str = OFileDialog::getOpenFileName( 2, QPEApplication::documentDir(), QString::null, map); - if( QFile(str).exists() && !QFileInfo(str).isDir() ) + if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) openFile( str ); else updateCaption(); } void TextEdit::doSearchBar() { if(!useSearchBar) searchBar->hide(); else searchBar->show(); } #if 0 void TextEdit::slotFind() { FindDialog frmFind( tr("Text Editor"), this ); connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), editor, SLOT(slotDoFind( const QString&,bool,bool))); //case sensitive, backwards, [category] connect( editor, SIGNAL(notFound()), &frmFind, SLOT(slotNotFound()) ); connect( editor, SIGNAL(searchWrapped()), &frmFind, SLOT(slotWrapAround()) ); frmFind.exec(); } #endif void TextEdit::fileRevert() { |