summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qapplication.cpp2
-rw-r--r--src/gui/kernel/qwidget_x11.cpp2
-rw-r--r--tests/benchmarks/qhostinfo/main.cpp28
3 files changed, 18 insertions, 14 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 4165c95..cdd0c1b 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5230,6 +5230,8 @@ QInputContext *QApplication::inputContext() const
{
Q_D(const QApplication);
Q_UNUSED(d);// only static members being used.
+ if (QApplicationPrivate::is_app_closing)
+ return d->inputContext;
#ifdef Q_WS_X11
if (!X11)
return 0;
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 0bc9cbc..f9db485 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -1084,7 +1084,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
} else {
// release previous focus information participating with
// preedit preservation of qic
- QInputContext *qic = inputContext();
+ QInputContext *qic = QApplicationPrivate::inputContext;
if (qic)
qic->widgetDestroyed(this);
}
diff --git a/tests/benchmarks/qhostinfo/main.cpp b/tests/benchmarks/qhostinfo/main.cpp
index 389443b..80d0fd8 100644
--- a/tests/benchmarks/qhostinfo/main.cpp
+++ b/tests/benchmarks/qhostinfo/main.cpp
@@ -7,11 +7,11 @@
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
-** Commercial Usage
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -25,19 +25,21 @@
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
+
+
#include <QDebug>
#include <QHostInfo>
#include <QStringList>