diff options
author | Thomas Zander <t.zander@nokia.com> | 2010-05-27 13:01:29 (GMT) |
---|---|---|
committer | Thomas Zander <t.zander@nokia.com> | 2010-05-27 13:01:29 (GMT) |
commit | 016b89d07478c91617ad345a0b3d7f16d0f8cd21 (patch) | |
tree | b56f2a81e112d08cc6d629ea2e6e1e4259b56f35 /src/gui/kernel | |
parent | 4459b4b29073bb82fe480b5eac1a4d9241068b38 (diff) | |
parent | 103e1e8ea5e8879f2bb97e008840a212b3004a51 (diff) | |
download | Qt-016b89d07478c91617ad345a0b3d7f16d0f8cd21.zip Qt-016b89d07478c91617ad345a0b3d7f16d0f8cd21.tar.gz Qt-016b89d07478c91617ad345a0b3d7f16d0f8cd21.tar.bz2 |
Merge commit 'origin/4.7' into symbian47
Conflicts:
src/plugins/bearer/symbian/qnetworksession_impl.h
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 18 | ||||
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac_p.h | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 8 |
3 files changed, 22 insertions, 9 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index e60a5f2..3c57a10 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2229,15 +2229,17 @@ void QApplication::closeAllWindows() { bool did_close = true; QWidget *w; - while((w = activeModalWidget()) && did_close) { - if(!w->isVisible()) + while ((w = activeModalWidget()) && did_close) { + if (!w->isVisible() || w->data->is_closing) break; did_close = w->close(); } QWidgetList list = QApplication::topLevelWidgets(); for (int i = 0; did_close && i < list.size(); ++i) { w = list.at(i); - if (w->isVisible() && w->windowType() != Qt::Desktop) { + if (w->isVisible() + && w->windowType() != Qt::Desktop + && !w->data->is_closing) { did_close = w->close(); list = QApplication::topLevelWidgets(); i = -1; @@ -5279,18 +5281,20 @@ bool QApplication::keypadNavigationEnabled() This function replaces the QInputContext instance used by the application with \a inputContext. + Qt takes ownership of the given \a inputContext. + \sa inputContext() */ void QApplication::setInputContext(QInputContext *inputContext) { - Q_D(QApplication); - Q_UNUSED(d);// only static members being used. + if (inputContext == QApplicationPrivate::inputContext) + return; if (!inputContext) { qWarning("QApplication::setInputContext: called with 0 input context"); return; } - delete d->inputContext; - d->inputContext = inputContext; + delete QApplicationPrivate::inputContext; + QApplicationPrivate::inputContext = inputContext; } /*! diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index 5db121a..44fb4f0 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -73,6 +73,9 @@ ** ****************************************************************************/ +#ifndef QT_COCOA_HELPERS_MAC_P_H +#define QT_COCOA_HELPERS_MAC_P_H + // // W A R N I N G // ------------- @@ -216,3 +219,5 @@ bool qt_cocoaPostMessage(id target, SEL selector); void qt_mac_post_retranslateAppMenu(); QT_END_NAMESPACE + +#endif // QT_COCOA_HELPERS_MAC_P_H diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index e56ba7b..b5879ae 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -317,6 +317,8 @@ QInputContext *QWidget::inputContext() This function sets the input context \a context on this widget. + Qt takes ownership of the given input \a context. + \sa inputContext() */ void QWidget::setInputContext(QInputContext *context) @@ -325,6 +327,8 @@ void QWidget::setInputContext(QInputContext *context) if (!testAttribute(Qt::WA_InputMethodEnabled)) return; #ifndef QT_NO_IM + if (context == d->ic) + return; if (d->ic) delete d->ic; d->ic = context; @@ -675,8 +679,8 @@ void QWidget::setAutoFillBackground(bool enabled) (to move the keyboard focus), and passes on most of the other events to one of the more specialized handlers above. - Events and the mechanism used to deliver them are covered in the - \l{Events and Event Filters} document. + Events and the mechanism used to deliver them are covered in + \l{The Event System}. \section1 Groups of Functions and Properties |