summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.cpp
Side-by-side diff
Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 759e440..61beac5 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -667,7 +667,9 @@ void TextEdit::openDotFile( const QString &f ) {
odebug << "openFile dotfile " + currentFileName << oendl;
QString txt;
QFile file(f);
- file.open(IO_ReadWrite);
+ if (!file.open(IO_ReadWrite))
+ owarn << "Failed to open file " << file.name() << oendl;
+ else {
QTextStream t(&file);
while ( !t.atEnd()) {
txt+=t.readLine()+"\n";
@@ -676,8 +678,7 @@ void TextEdit::openDotFile( const QString &f ) {
editor->setEdited( false);
edited1=false;
edited=false;
-
-
+ }
}
updateCaption( currentFileName);
}