summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-12-15 21:32:35 (UTC)
committer llornkcor <llornkcor>2002-12-15 21:32:35 (UTC)
commit6de66e1e2af2b3b06e53dd83338b9dc9df6190df (patch) (side-by-side diff)
tree1c6d955f2acf0f2a1b93b7959748ceed85bab8e0
parent0a32396b7294d535b467b4fb4a4a0fb6038a21dc (diff)
downloadopie-6de66e1e2af2b3b06e53dd83338b9dc9df6190df.zip
opie-6de66e1e2af2b3b06e53dd83338b9dc9df6190df.tar.gz
opie-6de66e1e2af2b3b06e53dd83338b9dc9df6190df.tar.bz2
fix bug in open when cancelling
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index b199c81..8b3c4c6 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -559,65 +559,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(!str.isEmpty() )
+ if( QFile(str).exists())
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() {