summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 086fdb6..1d0df6a 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -775,16 +775,22 @@ void TextEdit::showEditTools() {
775/*! 775/*!
776 unprompted save */ 776 unprompted save */
777bool TextEdit::save() { 777bool TextEdit::save() {
778 QString name, file;
778 odebug << "saveAsFile " + currentFileName << oendl; 779 odebug << "saveAsFile " + currentFileName << oendl;
779 if(currentFileName.isEmpty()) { 780 if(currentFileName.isEmpty()) {
780 saveAs(); 781 saveAs();
781 return false; 782 return false;
782 } 783 }
783 784 name = currentFileName;
784 QString file = doc->file(); 785 if(doc) {
786 file = doc->file();
785 odebug << "saver file "+file << oendl; 787 odebug << "saver file "+file << oendl;
786 QString name= doc->name(); 788 name = doc->name();
787 odebug << "File named "+name << oendl; 789 odebug << "File named "+name << oendl;
790 } else {
791 name = file = currentFileName;
792 }
793
788 QString rt = editor->text(); 794 QString rt = editor->text();
789 if( !rt.isEmpty() ) { 795 if( !rt.isEmpty() ) {
790 if(name.isEmpty()) { 796 if(name.isEmpty()) {