Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/textedit/textedit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index bd7cfb6..4f4f994 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -778,25 +778,30 @@ void TextEdit::showEditTools() { | |||
778 | menu->show(); | 778 | menu->show(); |
779 | editBar->show(); | 779 | editBar->show(); |
780 | if(!useSearchBar) | 780 | if(!useSearchBar) |
781 | searchBar->hide(); | 781 | searchBar->hide(); |
782 | else | 782 | else |
783 | searchBar->show(); | 783 | searchBar->show(); |
784 | setWState (WState_Reserved1 ); | 784 | setWState (WState_Reserved1 ); |
785 | } | 785 | } |
786 | 786 | ||
787 | /*! | 787 | /*! |
788 | unprompted save */ | 788 | unprompted save */ |
789 | bool TextEdit::save() { | 789 | bool TextEdit::save() { |
790 | QString file = doc->file(); | 790 | qDebug("saveAsFile " + currentFileName); |
791 | if(currentFileName.isEmpty()) { | ||
792 | saveAs(); | ||
793 | return; | ||
794 | } | ||
795 | QString file = doc->file(); | ||
791 | qDebug("saver file "+file); | 796 | qDebug("saver file "+file); |
792 | QString name= doc->name(); | 797 | QString name= doc->name(); |
793 | qDebug("File named "+name); | 798 | qDebug("File named "+name); |
794 | QString rt = editor->text(); | 799 | QString rt = editor->text(); |
795 | if( !rt.isEmpty() ) { | 800 | if( !rt.isEmpty() ) { |
796 | if(name.isEmpty()) { | 801 | if(name.isEmpty()) { |
797 | saveAs(); | 802 | saveAs(); |
798 | } else { | 803 | } else { |
799 | currentFileName= name ; | 804 | currentFileName= name ; |
800 | qDebug("saveFile "+currentFileName); | 805 | qDebug("saveFile "+currentFileName); |
801 | 806 | ||
802 | struct stat buf; | 807 | struct stat buf; |