-rw-r--r-- | core/apps/textedit/textedit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index bd0014a..f6a869a 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -822,48 +822,49 @@ bool TextEdit::saveAs() { | |||
822 | qDebug("saving filename "+fileNm); | 822 | qDebug("saving filename "+fileNm); |
823 | QFileInfo fi(fileNm); | 823 | QFileInfo fi(fileNm); |
824 | currentFileName=fi.fileName(); | 824 | currentFileName=fi.fileName(); |
825 | if(doc) { | 825 | if(doc) { |
826 | // QString file = doc->file(); | 826 | // QString file = doc->file(); |
827 | // doc->removeFiles(); | 827 | // doc->removeFiles(); |
828 | delete doc; | 828 | delete doc; |
829 | DocLnk nf; | 829 | DocLnk nf; |
830 | nf.setType("text/plain"); | 830 | nf.setType("text/plain"); |
831 | nf.setFile( fileNm); | 831 | nf.setFile( fileNm); |
832 | doc = new DocLnk(nf); | 832 | doc = new DocLnk(nf); |
833 | // editor->setText(rt); | 833 | // editor->setText(rt); |
834 | // qDebug("openFile doclnk "+currentFileName); | 834 | // qDebug("openFile doclnk "+currentFileName); |
835 | doc->setName( currentFileName); | 835 | doc->setName( currentFileName); |
836 | updateCaption( currentFileName); | 836 | updateCaption( currentFileName); |
837 | 837 | ||
838 | FileManager fm; | 838 | FileManager fm; |
839 | if ( !fm.saveFile( *doc, rt ) ) { | 839 | if ( !fm.saveFile( *doc, rt ) ) { |
840 | return false; | 840 | return false; |
841 | } | 841 | } |
842 | 842 | ||
843 | if( useAdvancedFeatures ) { | 843 | if( useAdvancedFeatures ) { |
844 | filePermissions *filePerm; | 844 | filePermissions *filePerm; |
845 | filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm); | 845 | filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm); |
846 | filePerm->showMaximized(); | ||
846 | filePerm->exec(); | 847 | filePerm->exec(); |
847 | 848 | ||
848 | if( filePerm) | 849 | if( filePerm) |
849 | delete filePerm; | 850 | delete filePerm; |
850 | } | 851 | } |
851 | } | 852 | } |
852 | editor->setEdited( false); | 853 | editor->setEdited( false); |
853 | edited1 = false; | 854 | edited1 = false; |
854 | edited = false; | 855 | edited = false; |
855 | if(caption().left(1)=="*") | 856 | if(caption().left(1)=="*") |
856 | setCaption(caption().right(caption().length()-1)); | 857 | setCaption(caption().right(caption().length()-1)); |
857 | 858 | ||
858 | return true; | 859 | return true; |
859 | } | 860 | } |
860 | qDebug("returning false"); | 861 | qDebug("returning false"); |
861 | return false; | 862 | return false; |
862 | } //end saveAs | 863 | } //end saveAs |
863 | 864 | ||
864 | void TextEdit::clear() { | 865 | void TextEdit::clear() { |
865 | delete doc; | 866 | delete doc; |
866 | doc = 0; | 867 | doc = 0; |
867 | editor->clear(); | 868 | editor->clear(); |
868 | } | 869 | } |
869 | 870 | ||