author | leseb <leseb> | 2002-06-17 20:52:48 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-06-17 20:52:48 (UTC) |
commit | b177eb4a659c674d1bc3ab82d6d980aade7c0959 (patch) (side-by-side diff) | |
tree | 4ba2aee9db13423e37ae0a8051d80c010f815666 /noncore/unsupported/mail2/attachdiag.cpp | |
parent | 7ba6590093fb86fe4bf64839d3a517dd396853a3 (diff) | |
download | opie-b177eb4a659c674d1bc3ab82d6d980aade7c0959.zip opie-b177eb4a659c674d1bc3ab82d6d980aade7c0959.tar.gz opie-b177eb4a659c674d1bc3ab82d6d980aade7c0959.tar.bz2 |
Fix some bugs when dealing with attachments
Diffstat (limited to 'noncore/unsupported/mail2/attachdiag.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/attachdiag.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/noncore/unsupported/mail2/attachdiag.cpp b/noncore/unsupported/mail2/attachdiag.cpp index 36e1948..446cfe5 100644 --- a/noncore/unsupported/mail2/attachdiag.cpp +++ b/noncore/unsupported/mail2/attachdiag.cpp @@ -5,2 +5,3 @@ +#include <qpe/applnk.h> #include <qpe/fileselector.h> @@ -21,7 +22,7 @@ AttachDiag::AttachDiag(QWidget* parent = 0, const char* name = 0, bool modal, WF - FileSelector *fileSelector = new FileSelector("*", this, "FileSelector"); - fileSelector->setCloseVisible(false); - fileSelector->setNewVisible(false); + _fileSelector = new FileSelector("*", this, "FileSelector"); + _fileSelector->setCloseVisible(false); + _fileSelector->setNewVisible(false); - layout->addMultiCellWidget(fileSelector, 0, 0, 0, 1); + layout->addMultiCellWidget(_fileSelector, 0, 0, 0, 1); @@ -39,3 +40,2 @@ AttachDiag::AttachDiag(QWidget* parent = 0, const char* name = 0, bool modal, WF - connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), SLOT(fileSelected(const DocLnk &))); connect(attachButton, SIGNAL(clicked()), SLOT(accept())); @@ -43,8 +43,5 @@ AttachDiag::AttachDiag(QWidget* parent = 0, const char* name = 0, bool modal, WF - if (fileSelector->selected() != NULL) - currentFile = *fileSelector->selected(); - - if (fileSelector->fileCount() == 0) { + if (_fileSelector->fileCount() == 0) { attachButton->setEnabled(false); - fileSelector->setEnabled(false); + _fileSelector->setEnabled(false); } @@ -52,5 +49,5 @@ AttachDiag::AttachDiag(QWidget* parent = 0, const char* name = 0, bool modal, WF -void AttachDiag::fileSelected(const DocLnk &file) +DocLnk AttachDiag::selectedFile() { - currentFile = file; + return *_fileSelector->selected(); } @@ -64,3 +61,3 @@ DocLnk AttachDiag::getFile(QWidget *parent) if (QDialog::Accepted == attach.exec()) { - return attach.currentFile; + return attach.selectedFile(); } |