summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qdialog.cpp')
-rw-r--r--src/gui/dialogs/qdialog.cpp38
1 files changed, 34 insertions, 4 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 0288cd9..c7ea5f0 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -64,8 +64,12 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp
#elif defined(Q_WS_X11)
# include "../kernel/qt_x11_p.h"
+#elif defined(Q_WS_S60)
+# include "qfiledialog.h"
+#endif
+#if defined(Q_OS_SYMBIAN)
+#include "qmenubar.h"
#endif
-
#ifndef SPI_GETSNAPTODEFBUTTON
# define SPI_GETSNAPTODEFBUTTON 95
#endif
@@ -292,9 +296,13 @@ QDialog::QDialog(QDialogPrivate &dd, QWidget *parent, Qt::WindowFlags f)
QDialog::~QDialog()
{
- // Need to hide() here, as our (to-be) overridden hide()
- // will not be called in ~QWidget.
- hide();
+ QT_TRY {
+ // Need to hide() here, as our (to-be) overridden hide()
+ // will not be called in ~QWidget.
+ hide();
+ } QT_CATCH(...) {
+ // we're in the destructor - just swallow the exception
+ }
}
/*!
@@ -486,7 +494,22 @@ int QDialog::exec()
#endif //QT_NO_MENUBAR
#endif //Q_WS_WINCE_WM
+#ifdef Q_OS_SYMBIAN
+#ifndef QT_NO_MENUBAR
+ QMenuBar *menuBar = 0;
+ if (!findChild<QMenuBar *>())
+ menuBar = new QMenuBar(this);
+#endif
+#endif
+
+#if !defined(Q_WS_S60)
show();
+#else
+ if (qobject_cast<QFileDialog *>(this))
+ showFullScreen();
+ else
+ show();
+#endif
#ifdef Q_WS_MAC
d->mac_nativeDialogModalHelp();
@@ -511,6 +534,13 @@ int QDialog::exec()
delete menuBar;
#endif //QT_NO_MENUBAR
#endif //Q_WS_WINCE_WM
+#ifdef Q_OS_SYMBIAN
+#ifndef QT_NO_MENUBAR
+ else if (menuBar)
+ delete menuBar;
+#endif //QT_NO_MENUBAR
+#endif //Q_OS_SYMBIAN
+
return res;
}