-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 0af18da..9e6ba8d 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -811,49 +811,49 @@ bool TextEdit::saveAs() | |||
811 | if(!str.isEmpty() ) { | 811 | if(!str.isEmpty() ) { |
812 | QString fileNm=str; | 812 | QString fileNm=str; |
813 | 813 | ||
814 | qDebug("saving filename "+fileNm); | 814 | qDebug("saving filename "+fileNm); |
815 | QFileInfo fi(fileNm); | 815 | QFileInfo fi(fileNm); |
816 | currentFileName=fi.fileName(); | 816 | currentFileName=fi.fileName(); |
817 | if(doc) { | 817 | if(doc) { |
818 | // QString file = doc->file(); | 818 | // QString file = doc->file(); |
819 | // doc->removeFiles(); | 819 | // doc->removeFiles(); |
820 | delete doc; | 820 | delete doc; |
821 | DocLnk nf; | 821 | DocLnk nf; |
822 | nf.setType("text/plain"); | 822 | nf.setType("text/plain"); |
823 | nf.setFile( fileNm); | 823 | nf.setFile( fileNm); |
824 | doc = new DocLnk(nf); | 824 | doc = new DocLnk(nf); |
825 | // editor->setText(rt); | 825 | // editor->setText(rt); |
826 | // qDebug("openFile doclnk "+currentFileName); | 826 | // qDebug("openFile doclnk "+currentFileName); |
827 | doc->setName( currentFileName); | 827 | doc->setName( currentFileName); |
828 | updateCaption( currentFileName); | 828 | updateCaption( currentFileName); |
829 | 829 | ||
830 | FileManager fm; | 830 | FileManager fm; |
831 | if ( !fm.saveFile( *doc, rt ) ) { | 831 | if ( !fm.saveFile( *doc, rt ) ) { |
832 | return false; | 832 | return false; |
833 | } | 833 | } |
834 | 834 | ||
835 | if( useAdvancedFfeatures ) { | 835 | if( useAdvancedFeatures ) { |
836 | filePermissions *filePerm; | 836 | filePermissions *filePerm; |
837 | filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm); | 837 | filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm); |
838 | filePerm->exec(); | 838 | filePerm->exec(); |
839 | 839 | ||
840 | if( filePerm) | 840 | if( filePerm) |
841 | delete filePerm; | 841 | delete filePerm; |
842 | } | 842 | } |
843 | } | 843 | } |
844 | } | 844 | } |
845 | editor->setEdited(TRUE); | 845 | editor->setEdited(TRUE); |
846 | edited1=FALSE; | 846 | edited1=FALSE; |
847 | edited=TRUE; | 847 | edited=TRUE; |
848 | if(caption().left(1)=="*") | 848 | if(caption().left(1)=="*") |
849 | setCaption(caption().right(caption().length()-1)); | 849 | setCaption(caption().right(caption().length()-1)); |
850 | 850 | ||
851 | return true; | 851 | return true; |
852 | } //end saveAs | 852 | } //end saveAs |
853 | 853 | ||
854 | void TextEdit::clear() | 854 | void TextEdit::clear() |
855 | { | 855 | { |
856 | delete doc; | 856 | delete doc; |
857 | doc = 0; | 857 | doc = 0; |
858 | editor->clear(); | 858 | editor->clear(); |
859 | } | 859 | } |