summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 5e720df..d39044a 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -187,6 +187,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
, extraPaintEngine(0)
, polished(0)
, graphicsEffect(0)
+#if !defined(QT_NO_IM)
+ , imHints(Qt::ImhNone)
+#endif
, inheritedFontResolveMask(0)
, inheritedPaletteResolveMask(0)
, leftmargin(0)
@@ -217,7 +220,6 @@ QWidgetPrivate::QWidgetPrivate(int version)
, window_event(0)
, qd_hd(0)
#endif
- ,imHints(Qt::ImhNone)
{
if (!qApp) {
qFatal("QWidget: Must construct a QApplication before a QPaintDevice");
@@ -971,7 +973,10 @@ struct QWidgetExceptionCleaner
/* this cleans up when the constructor throws an exception */
static inline void cleanup(QWidget *that, QWidgetPrivate *d)
{
-#ifndef QT_NO_EXCEPTIONS
+#ifdef QT_NO_EXCEPTIONS
+ Q_UNUSED(that);
+ Q_UNUSED(d);
+#else
QWidgetPrivate::allWidgets->remove(that);
if (d->focus_next != that) {
if (d->focus_next)
@@ -4965,6 +4970,13 @@ void QWidgetPrivate::setSoftKeys_sys(const QList<QAction*> &softkeys)
}
#endif // !defined(Q_OS_SYMBIAN)
+/*!
+ Returns a pointer to this widget's effect if it has one; otherwise 0.
+
+ \since 4.6
+
+ \sa setGraphicsEffect()
+*/
QGraphicsEffect *QWidget::graphicsEffect() const
{
Q_D(const QWidget);
@@ -4982,6 +4994,8 @@ QGraphicsEffect *QWidget::graphicsEffect() const
\note This function will apply the effect on itself and all its children.
\since 4.6
+
+ \sa graphicsEffect()
*/
void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
{
@@ -6231,6 +6245,10 @@ bool QWidget::isActiveWindow() const
if(qt_mac_is_macdrawer(tlw) &&
tlw->parentWidget() && tlw->parentWidget()->isActiveWindow())
return true;
+
+ extern bool qt_mac_insideKeyWindow(const QWidget *); //qwidget_mac.cpp
+ if (QApplication::testAttribute(Qt::AA_MacPluginApplication) && qt_mac_insideKeyWindow(tlw))
+ return true;
#endif
if(style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, this)) {
if(tlw->windowType() == Qt::Tool &&