summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-25 19:53:30 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-25 19:53:30 (GMT)
commitef5891755bf760b68df1fc387e08a1b16980d6ad (patch)
treeffacc13c82dcadd1dda588e703ba43e440d9454c /src/gui/kernel
parent5a7223450d0ebd4eaa47f263005c6d1c2e142a76 (diff)
parenta32c96e753c2f5a123e518a92762ec9c9ff3b0b7 (diff)
downloadQt-ef5891755bf760b68df1fc387e08a1b16980d6ad.zip
Qt-ef5891755bf760b68df1fc387e08a1b16980d6ad.tar.gz
Qt-ef5891755bf760b68df1fc387e08a1b16980d6ad.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (50 commits) Dont crash when assigning the same input context twice. Fixed a typo in variable name in qlocale data generator. Fix for Norwegian and Korean languages on symbian. Remove unused function in QDBusConnectionPrivate Doc: Fixing bugs in HTML generator Updating 4.7.0 change log. Doc: Correcting style to class lists qdoc: Improved class index page. Added MSVC 2010 project files to .gitignore Fix architecture detection on GNU/Hurd. Revert "tst_bic: make it possible to test for cross-compilation" fix typo in documentation Improve Bearer Management related documentation in QNetworkAccessManager Compile with QT_NO_ACTION. Unbreak compilation outside Mac QDBusAbstractInterface: don't set lastError outside the object's own thread tst_bic: make it possible to test for cross-compilation Remove Q_PACKED from QChar and QLocale::Data. QDebug operator for QFlags Removing unneeded qDebug statement. ...
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp18
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac_p.h5
-rw-r--r--src/gui/kernel/qwidget.cpp8
3 files changed, 22 insertions, 9 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 7b62de1..57c4c99 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2218,15 +2218,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;
@@ -5268,18 +5270,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 1f2cd8c..569af42 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -312,6 +312,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)
@@ -320,6 +322,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;
@@ -670,8 +674,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