From 6040d26c56a95d9f5bd09688e22009fc5b5e124d Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 11 Aug 2005 10:10:40 +0000 Subject: add opie-smb --- (limited to 'core/apps') diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index ca760bb..759e440 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -907,11 +907,11 @@ bool TextEdit::saveAs() { dire = QPEApplication::documentDir(); QString str; if( !featureAutoSave) { - str = OFileDialog::getSaveFileName( 2, - dire, - filee, map); - } else - str=currentFileName; + str = OFileDialog::getSaveFileName( 2, + dire, + filee, map); + } else + str = currentFileName; if(!str.isEmpty()) { QString fileNm=str; @@ -923,31 +923,31 @@ bool TextEdit::saveAs() { // QString file = doc->file(); // doc->removeFiles(); delete doc; - DocLnk nf; - nf.setType("text/plain"); - nf.setFile( fileNm); - doc = new DocLnk(nf); + DocLnk nf; + nf.setType("text/plain"); + nf.setFile( fileNm); + doc = new DocLnk(nf); // editor->setText(rt); - odebug << "Saving file as "+currentFileName << oendl; - doc->setName( fi.baseName() /*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, - tr("Permissions"),true, - 0,(const QString &)fileNm); - QPEApplication::execDialog( filePerm ); - - if( filePerm) - delete filePerm; - } + odebug << "Saving file as "+currentFileName << oendl; + doc->setName( fi.baseName() /*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, + tr("Permissions"),true, + 0,(const QString &)fileNm); + QPEApplication::execDialog( filePerm ); + + if( filePerm) + delete filePerm; + } // } editor->setEdited( false); edited1 = false; -- cgit v0.9.0.2