diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-04-21 12:22:24 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-04-21 12:22:24 (GMT) |
commit | 51dca5f8afc3aa619a3bb62858db78a85cc3ecef (patch) | |
tree | dfc1fb65b6a8e5e429f1701992548f8a0425decb /src/gui/kernel/qwidget.cpp | |
parent | 6f5ad5dcab8e6f702894c4fa5c016d9837375626 (diff) | |
parent | c74dac2a0ef5d1b428c4da4e48fab05f9886233a (diff) | |
download | Qt-51dca5f8afc3aa619a3bb62858db78a85cc3ecef.zip Qt-51dca5f8afc3aa619a3bb62858db78a85cc3ecef.tar.gz Qt-51dca5f8afc3aa619a3bb62858db78a85cc3ecef.tar.bz2 |
Merge remote branch 'origin/4.7' into lighthouse
Conflicts:
configure
src/gui/kernel/qapplication.cpp
src/gui/painting/qbackingstore.cpp
src/opengl/qgl.cpp
src/opengl/qgl_p.h
src/plugins/plugins.pro
tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
tools/tools.pro
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 07639ba..3a0f3c7 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1481,7 +1481,7 @@ QWidget::~QWidget() QObjectPrivate::clearGuards(this); if (d->declarativeData) { - d->declarativeData->destroyed(this); + QAbstractDeclarativeData::destroyed(d->declarativeData, this); d->declarativeData = 0; // don't activate again in ~QObject } @@ -1509,8 +1509,12 @@ QWidget::~QWidget() if (QWidgetPrivate::allWidgets) // might have been deleted by ~QApplication QWidgetPrivate::allWidgets->remove(this); - QEvent e(QEvent::Destroy); - QCoreApplication::sendEvent(this, &e); + QT_TRY { + QEvent e(QEvent::Destroy); + QCoreApplication::sendEvent(this, &e); + } QT_CATCH(const std::exception&) { + // if this fails we can't do anything about it but at least we are not allowed to throw. + } } int QWidgetPrivate::instanceCounter = 0; // Current number of widget instances @@ -6183,6 +6187,8 @@ void QWidget::setFocus(Qt::FocusReason reason) previousProxyFocus = topData->proxyWidget->widget()->focusWidget(); if (previousProxyFocus && previousProxyFocus->focusProxy()) previousProxyFocus = previousProxyFocus->focusProxy(); + if (previousProxyFocus == this && !topData->proxyWidget->d_func()->proxyIsGivingFocus) + return; } } #endif @@ -10565,6 +10571,10 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) case Qt::WA_X11OpenGLOverlay: d->updateIsOpaque(); break; + case Qt::WA_X11DoNotAcceptFocus: + if (testAttribute(Qt::WA_WState_Created)) + d->updateX11AcceptFocus(); + break; #endif case Qt::WA_DontShowOnScreen: { if (on && isVisible()) { |