summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.cpp
Unidiff
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 ) {
667 odebug << "openFile dotfile " + currentFileName << oendl; 667 odebug << "openFile dotfile " + currentFileName << oendl;
668 QString txt; 668 QString txt;
669 QFile file(f); 669 QFile file(f);
670 file.open(IO_ReadWrite); 670 if (!file.open(IO_ReadWrite))
671 owarn << "Failed to open file " << file.name() << oendl;
672 else {
671 QTextStream t(&file); 673 QTextStream t(&file);
672 while ( !t.atEnd()) { 674 while ( !t.atEnd()) {
673 txt+=t.readLine()+"\n"; 675 txt+=t.readLine()+"\n";
@@ -676,8 +678,7 @@ void TextEdit::openDotFile( const QString &f ) {
676 editor->setEdited( false); 678 editor->setEdited( false);
677 edited1=false; 679 edited1=false;
678 edited=false; 680 edited=false;
679 681 }
680
681 } 682 }
682 updateCaption( currentFileName); 683 updateCaption( currentFileName);
683} 684}