-rw-r--r-- | core/apps/textedit/textedit.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 2a4d391..8e106bf 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -819,2 +819,3 @@ bool TextEdit::save() { if ( !fm.saveFile( *doc, rt ) ) { + QMessageBox::message(tr("Text Edit"),tr("Save Failed")); return false; @@ -911,4 +912,3 @@ bool TextEdit::saveAs() { QString str; - if( !featureAutoSave) - { + if( !featureAutoSave) { str = OFileDialog::getSaveFileName( 2, @@ -916,5 +916,5 @@ bool TextEdit::saveAs() { filee, map); - } - else + } else str=currentFileName; + if(!str.isEmpty()) { @@ -940,2 +940,3 @@ bool TextEdit::saveAs() { if ( !fm.saveFile( *doc, rt ) ) { + QMessageBox::message(tr("Text Edit"),tr("Save Failed")); return false; |