summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileSaver.cpp3
-rw-r--r--core/apps/textedit/textedit.cpp16
2 files changed, 13 insertions, 6 deletions
diff --git a/core/apps/textedit/fileSaver.cpp b/core/apps/textedit/fileSaver.cpp
index b1ddc0b..209a258 100644
--- a/core/apps/textedit/fileSaver.cpp
+++ b/core/apps/textedit/fileSaver.cpp
@@ -182,2 +182,3 @@ void fileSaver::listClicked(QListViewItem *selectedItem)
{
+ if(selectedItem != NULL) {
QString strItem=selectedItem->text(0);
@@ -218,3 +219,3 @@ void fileSaver::listClicked(QListViewItem *selectedItem)
-
+ }
}
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index f89ed6d..f99f259 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -512,3 +512,3 @@ void TextEdit::fileOpen()
// if(!b) {
- QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this );
+ QString str = OFileDialog::getOpenFileName( 2,"/");//,"", "*", this );
if(!str.isEmpty() )
@@ -750,2 +750,3 @@ bool TextEdit::save()
mode = buf.st_mode;
+
if(!fileIs) {
@@ -824,7 +825,12 @@ bool TextEdit::saveAs()
- fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName);
- qDebug("wanna save filename "+currentFileName);
- fileSaveDlg->exec();
- if( fileSaveDlg->result() == 1 ) {
+// QString str = OFileDialog::getSaveFileName( 2,"/");//,"", "*", this );
+// if(!str.isEmpty() ) {
+// openFile( 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);