summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-03-01 09:02:25 (UTC)
committer llornkcor <llornkcor>2004-03-01 09:02:25 (UTC)
commitaa4539e4ccc23c47f720819e23c9a6faf53a4df8 (patch) (side-by-side diff)
tree7c501175e1655b27cc144954e741d7eb8dc9372b
parent47cb805563e76732320f082975aad3046be1992a (diff)
downloadopie-aa4539e4ccc23c47f720819e23c9a6faf53a4df8.zip
opie-aa4539e4ccc23c47f720819e23c9a6faf53a4df8.tar.gz
opie-aa4539e4ccc23c47f720819e23c9a6faf53a4df8.tar.bz2
add error dialogs
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp9
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
@@ -814,12 +814,13 @@ bool TextEdit::save() {
mode = buf.st_mode;
if(!fileIs) {
doc->setName( name);
FileManager fm;
if ( !fm.saveFile( *doc, rt ) ) {
+ QMessageBox::message(tr("Text Edit"),tr("Save Failed"));
return false;
}
} else {
qDebug("regular save file");
QFile f(file);
if( f.open(IO_WriteOnly)) {
@@ -906,20 +907,19 @@ bool TextEdit::saveAs() {
QFileInfo cuFi( currentFileName);
QString filee = cuFi.fileName();
QString dire = cuFi.dirPath();
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;
qDebug("saving filename "+fileNm);
QFileInfo fi(fileNm);
currentFileName=fi.fileName();
@@ -935,12 +935,13 @@ bool TextEdit::saveAs() {
qDebug("Saving file as "+currentFileName);
doc->setName( currentFileName);
updateCaption( currentFileName);
FileManager fm;
if ( !fm.saveFile( *doc, rt ) ) {
+ QMessageBox::message(tr("Text Edit"),tr("Save Failed"));
return false;
}
if( filePerms ) {
filePermissions *filePerm;
filePerm = new filePermissions(this,