-rw-r--r-- | core/apps/textedit/textedit.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index ea27e1b..40ea501 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -791,19 +791,28 @@ bool TextEdit::saveAs() currentFileName=docname; } } - -// QString str = OFileDialog::getSaveFileName( 2,"/");//,"", "*", this ); -// if(!str.isEmpty() ) { -// openFile( str ); +/* + QMap<QString, QStringList> map; + map.insert(tr("All"), QStringList() ); + QStringList text; + text << "text/*"; + map.insert(tr("Text"), text ); + text << "*"; + map.insert(tr("All"), text ); + QString str = OFileDialog::getSaveFileName( 2,"/", QString::null, map); + if(!str.isEmpty() ) { + QString fileNm=str; +*/ fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName); qDebug("wanna save filename "+currentFileName); fileSaveDlg->exec(); if( fileSaveDlg->result() == 1 ) { QString fileNm=fileSaveDlg->selectedFileName; -// QString fileNm=srt; + + qDebug("saving filename "+fileNm); QFileInfo fi(fileNm); currentFileName=fi.fileName(); if(doc) { |