diff options
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 14 | ||||
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 4faa193..3f8cc72 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -69,7 +69,6 @@ extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp # include "qfontdialog.h" # include "qcolordialog.h" # include "qwizard.h" -# include "qmenubar.h" #endif #if defined(Q_WS_S60) @@ -529,12 +528,6 @@ int QDialog::exec() #endif //Q_WS_WINCE_WM #ifdef Q_OS_SYMBIAN -#ifndef QT_NO_MENUBAR - QMenuBar *menuBar = 0; - if (!findChild<QMenuBar *>()) - menuBar = new QMenuBar(this); -#endif - if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) || qobject_cast<QColorDialog *>(this) || qobject_cast<QWizard *>(this)) showMaximized(); @@ -566,13 +559,6 @@ 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; } diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index df8b525..fe25b0f 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -65,6 +65,10 @@ #include <QtGui/qfontmetrics.h> #include <QtGui/qclipboard.h> +#ifndef QT_NO_STYLE_S60 +#include <qs60style.h> +#endif + #ifdef Q_WS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_smartphone();//defined in qguifunctions_wince.cpp @@ -383,6 +387,16 @@ void QMessageBoxPrivate::updateSize() int height = (layout->hasHeightForWidth()) ? layout->totalHeightForWidth(width) : layout->totalMinimumSize().height(); + +#ifndef QT_NO_STYLE_S60 + QS60Style *s60Style = 0; + s60Style = qobject_cast<QS60Style *>(QApplication::style()); + + //use custom pixel metric to deduce the minimum height of the messagebox + if (s60Style) + height = qMax(height, s60Style->pixelMetric((QStyle::PixelMetric)PM_MessageBoxHeight)); +#endif + q->setFixedSize(width, height); QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest); } |