-rw-r--r-- | core/apps/textedit/textedit.cpp | 7 |
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 | |||
@@ -664,23 +664,24 @@ void TextEdit::openDotFile( const QString &f ) { | |||
664 | if(!currentFileName.isEmpty()) { | 664 | if(!currentFileName.isEmpty()) { |
665 | currentFileName=f; | 665 | currentFileName=f; |
666 | 666 | ||
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"; |
674 | } | 676 | } |
675 | editor->setText(txt); | 677 | editor->setText(txt); |
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 | } |
684 | 685 | ||
685 | void TextEdit::openFile( const QString &f ) { | 686 | void TextEdit::openFile( const QString &f ) { |
686 | odebug << "filename is "+ f << oendl; | 687 | odebug << "filename is "+ f << oendl; |