Diffstat (limited to 'noncore/unsupported/mail2/attachdiag.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/attachdiag.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/mail2/attachdiag.cpp b/noncore/unsupported/mail2/attachdiag.cpp index 6e6c3d4..bedf3c4 100644 --- a/noncore/unsupported/mail2/attachdiag.cpp +++ b/noncore/unsupported/mail2/attachdiag.cpp | |||
@@ -34,38 +34,38 @@ AttachDiag::AttachDiag(QWidget* parent = 0, const char* name = 0, bool modal, WF | |||
34 | QPushButton *cancelButton = new QPushButton(this); | 34 | QPushButton *cancelButton = new QPushButton(this); |
35 | cancelButton->setText(tr("Cancel")); | 35 | cancelButton->setText(tr("Cancel")); |
36 | cancelButton->setIconSet(Resource::loadPixmap("editdelete")); | 36 | cancelButton->setIconSet(Resource::loadPixmap("editdelete")); |
37 | 37 | ||
38 | layout->addWidget(cancelButton, 1, 1); | 38 | layout->addWidget(cancelButton, 1, 1); |
39 | 39 | ||
40 | connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), SLOT(fileSelected(const DocLnk &))); | 40 | connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), SLOT(fileSelected(const DocLnk &))); |
41 | connect(attachButton, SIGNAL(clicked()), SLOT(accept())); | 41 | connect(attachButton, SIGNAL(clicked()), SLOT(accept())); |
42 | connect(cancelButton, SIGNAL(clicked()), SLOT(close())); | 42 | connect(cancelButton, SIGNAL(clicked()), SLOT(close())); |
43 | 43 | ||
44 | if (fileSelector->selected() != NULL) | 44 | if (fileSelector->selected() != NULL) |
45 | currentFile = *fileSelector->selected(); | 45 | currentFile = *fileSelector->selected(); |
46 | 46 | ||
47 | if (fileSelector->fileCount() == 0) { | 47 | if (fileSelector->fileCount() == 0) { |
48 | attachButton->setEnabled(false); | 48 | attachButton->setEnabled(false); |
49 | fileSelector->setEnabled(false); | 49 | fileSelector->setEnabled(false); |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | void AttachDiag::fileSelected(const DocLnk &file) | 53 | void AttachDiag::fileSelected(const DocLnk &file) |
54 | { | 54 | { |
55 | currentFile = file; | 55 | currentFile = file; |
56 | } | 56 | } |
57 | 57 | ||
58 | DocLnk AttachDiag::getFile() | 58 | DocLnk AttachDiag::getFile(QWidget *parent) |
59 | { | 59 | { |
60 | AttachDiag *attach = new AttachDiag(0, 0, true); | 60 | AttachDiag *attach = new AttachDiag(parent, 0, true); |
61 | attach->showMaximized(); | 61 | attach->showMaximized(); |
62 | attach->show(); | 62 | attach->show(); |
63 | 63 | ||
64 | if (QDialog::Accepted == attach->exec()) { | 64 | if (QDialog::Accepted == attach->exec()) { |
65 | return attach->currentFile; | 65 | return attach->currentFile; |
66 | } | 66 | } |
67 | 67 | ||
68 | return DocLnk(); | 68 | return DocLnk(); |
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||