equal
deleted
inserted
replaced
67 #elif defined(Q_OS_SYMBIAN) |
67 #elif defined(Q_OS_SYMBIAN) |
68 # include "qfiledialog.h" |
68 # include "qfiledialog.h" |
69 # include "qfontdialog.h" |
69 # include "qfontdialog.h" |
70 # include "qcolordialog.h" |
70 # include "qcolordialog.h" |
71 # include "qwizard.h" |
71 # include "qwizard.h" |
72 # include "qmenubar.h" |
|
73 #endif |
72 #endif |
74 |
73 |
75 #if defined(Q_WS_S60) |
74 #if defined(Q_WS_S60) |
76 #include "private/qt_s60_p.h" |
75 #include "private/qt_s60_p.h" |
77 #endif |
76 #endif |
413 if (e->type() == QEvent::OkRequest) { |
412 if (e->type() == QEvent::OkRequest) { |
414 accept(); |
413 accept(); |
415 result = true; |
414 result = true; |
416 } |
415 } |
417 #else |
416 #else |
418 if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) |
417 if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) { |
419 adjustPosition(parentWidget()); |
418 if (!testAttribute(Qt::WA_Moved)) { |
|
419 Qt::WindowStates state = windowState(); |
|
420 adjustPosition(parentWidget()); |
|
421 setAttribute(Qt::WA_Moved, false); // not really an explicit position |
|
422 if (state != windowState()) |
|
423 setWindowState(state); |
|
424 } |
|
425 } |
420 #endif |
426 #endif |
421 return result; |
427 return result; |
422 } |
428 } |
423 #endif |
429 #endif |
424 |
430 |
520 } |
526 } |
521 #endif //QT_NO_MENUBAR |
527 #endif //QT_NO_MENUBAR |
522 #endif //Q_WS_WINCE_WM |
528 #endif //Q_WS_WINCE_WM |
523 |
529 |
524 #ifdef Q_OS_SYMBIAN |
530 #ifdef Q_OS_SYMBIAN |
525 #ifndef QT_NO_MENUBAR |
|
526 QMenuBar *menuBar = 0; |
|
527 if (!findChild<QMenuBar *>()) |
|
528 menuBar = new QMenuBar(this); |
|
529 #endif |
|
530 |
|
531 if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) || |
531 if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) || |
532 qobject_cast<QColorDialog *>(this) || qobject_cast<QWizard *>(this)) |
532 qobject_cast<QColorDialog *>(this) || qobject_cast<QWizard *>(this)) |
533 showMaximized(); |
533 showMaximized(); |
534 else |
534 else |
535 #endif // Q_OS_SYMBIAN |
535 #endif // Q_OS_SYMBIAN |
557 #ifndef QT_NO_MENUBAR |
557 #ifndef QT_NO_MENUBAR |
558 else if (menuBar) |
558 else if (menuBar) |
559 delete menuBar; |
559 delete menuBar; |
560 #endif //QT_NO_MENUBAR |
560 #endif //QT_NO_MENUBAR |
561 #endif //Q_WS_WINCE_WM |
561 #endif //Q_WS_WINCE_WM |
562 #ifdef Q_OS_SYMBIAN |
|
563 #ifndef QT_NO_MENUBAR |
|
564 else if (menuBar) |
|
565 delete menuBar; |
|
566 #endif //QT_NO_MENUBAR |
|
567 #endif //Q_OS_SYMBIAN |
|
568 |
|
569 return res; |
562 return res; |
570 } |
563 } |
571 |
564 |
572 |
565 |
573 /*! |
566 /*! |
805 |
798 |
806 /*!\reimp */ |
799 /*!\reimp */ |
807 void QDialog::showEvent(QShowEvent *event) |
800 void QDialog::showEvent(QShowEvent *event) |
808 { |
801 { |
809 if (!event->spontaneous() && !testAttribute(Qt::WA_Moved)) { |
802 if (!event->spontaneous() && !testAttribute(Qt::WA_Moved)) { |
810 Qt::WindowStates state = windowState(); |
803 Qt::WindowStates state = windowState(); |
811 adjustPosition(parentWidget()); |
804 adjustPosition(parentWidget()); |
812 setAttribute(Qt::WA_Moved, false); // not really an explicit position |
805 setAttribute(Qt::WA_Moved, false); // not really an explicit position |
813 if (state != windowState()) |
806 if (state != windowState()) |
814 setWindowState(state); |
807 setWindowState(state); |
815 } |
808 } |
816 } |
809 } |
817 |
810 |
818 /*! \internal */ |
811 /*! \internal */ |
819 void QDialog::adjustPosition(QWidget* w) |
812 void QDialog::adjustPosition(QWidget* w) |