diff -r b72c6db6890b -r 5dc02b23752f src/gui/dialogs/qdialog.cpp --- a/src/gui/dialogs/qdialog.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/gui/dialogs/qdialog.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -258,7 +258,7 @@ QDialog::QDialog(QWidget *parent, Qt::WindowFlags f) : QWidget(*new QDialogPrivate, parent, - f | QFlag((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : 0)) + f | ((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : Qt::WindowType(0))) { #ifdef Q_WS_WINCE if (!qt_wince_is_smartphone()) @@ -295,7 +295,7 @@ \internal */ QDialog::QDialog(QDialogPrivate &dd, QWidget *parent, Qt::WindowFlags f) - : QWidget(dd, parent, f | QFlag((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : 0)) + : QWidget(dd, parent, f | ((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : Qt::WindowType(0))) { #ifdef Q_WS_WINCE if (!qt_wince_is_smartphone()) @@ -641,13 +641,14 @@ while (w && w->whatsThis().size() == 0 && !w->testAttribute(Qt::WA_CustomWhatsThis)) w = w->isWindow() ? 0 : w->parentWidget(); if (w) { - QMenu p(this); - QAction *wt = p.addAction(tr("What's This?")); - if (p.exec(e->globalPos()) == wt) { + QWeakPointer p = new QMenu(this); + QAction *wt = p.data()->addAction(tr("What's This?")); + if (p.data()->exec(e->globalPos()) == wt) { QHelpEvent e(QEvent::WhatsThis, w->rect().center(), w->mapToGlobal(w->rect().center())); QApplication::sendEvent(w, &e); } + delete p.data(); } #endif }