-rw-r--r-- | library/qpedialog.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/library/qpedialog.cpp b/library/qpedialog.cpp index da461b7..87d61e3 100644 --- a/library/qpedialog.cpp +++ b/library/qpedialog.cpp | |||
@@ -20,8 +20,15 @@ | |||
20 | 20 | ||
21 | #define protected public | 21 | #include "qpedialog.h" |
22 | |||
22 | #include <qdialog.h> | 23 | #include <qdialog.h> |
23 | #undef protected | ||
24 | 24 | ||
25 | #include "qpedialog.h" | 25 | #include "qpeapplication.h" |
26 | #include <qpe/qpeapplication.h> | 26 | |
27 | |||
28 | // Allow access to nornally protected accept and reject functions | ||
29 | class HackedPrivateQDialog : public QDialog{ | ||
30 | public: | ||
31 | void accept() { QDialog::accept();} | ||
32 | void reject() { QDialog::reject();} | ||
33 | }; | ||
27 | 34 | ||
@@ -68,6 +75,9 @@ void QPEDialogListener::appMessage( const QCString &msg, const QByteArray & ) | |||
68 | return; | 75 | return; |
76 | |||
77 | HackedPrivateQDialog *hackedDialog = static_cast<HackedPrivateQDialog*>(dialog); | ||
78 | |||
69 | if (msg == "accept()") { | 79 | if (msg == "accept()") { |
70 | dialog->accept(); | 80 | hackedDialog->accept(); |
71 | } else if (msg == "reject()") { | 81 | } else if (msg == "reject()") { |
72 | dialog->reject(); | 82 | hackedDialog->reject(); |
73 | } | 83 | } |