From aa4539e4ccc23c47f720819e23c9a6faf53a4df8 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Mon, 01 Mar 2004 09:02:25 +0000 Subject: add error dialogs --- 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 @@ -817,6 +817,7 @@ bool TextEdit::save() { doc->setName( name); FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { + QMessageBox::message(tr("Text Edit"),tr("Save Failed")); return false; } } else { @@ -827,7 +828,7 @@ bool TextEdit::save() { f.writeBlock(crt,crt.length()); } else { QMessageBox::message(tr("Text Edit"),tr("Write Failed")); - return false; + return false; } } @@ -909,14 +910,13 @@ bool TextEdit::saveAs() { if(dire==".") dire = QPEApplication::documentDir(); QString str; - if( !featureAutoSave) - { + if( !featureAutoSave) { str = OFileDialog::getSaveFileName( 2, dire, filee, map); - } - else + } else str=currentFileName; + if(!str.isEmpty()) { QString fileNm=str; @@ -938,6 +938,7 @@ bool TextEdit::saveAs() { FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { + QMessageBox::message(tr("Text Edit"),tr("Save Failed")); return false; } -- cgit v0.9.0.2