summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-07 11:31:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-07 11:31:16 (GMT)
commite032a0730ad752d0855c281f61799ae89fb36ead (patch)
tree502311766e0406aae6bb2d6cee37881174ba0d47 /src
parent98a4db7321cb286cd0a7a07adeb265798a650515 (diff)
parent064b7fe6f97bcf214f749794c5ccab3b4cf0bcc7 (diff)
downloadQt-e032a0730ad752d0855c281f61799ae89fb36ead.zip
Qt-e032a0730ad752d0855c281f61799ae89fb36ead.tar.gz
Qt-e032a0730ad752d0855c281f61799ae89fb36ead.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: Doc: fixing page name bug caused by 07bbace404078dcfd82eff717daa97299b8ba52c changing qml elements page Doc: updating details on Tier 2 platforms Doc: adding remark on release of qt quick element support in creator Doc: updating the qdocconf files and the stylesheet Replaced QWeakPointer to *Pointer in QGestureManager. Fixed hiding a window on X11 before it was shown. Fix incorrect license header.
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp7
-rw-r--r--src/gui/kernel/qgesturemanager.cpp3
-rw-r--r--src/gui/kernel/qgesturemanager_p.h4
-rwxr-xr-xsrc/xmlpatterns/parser/createTokenLookup.sh16
4 files changed, 19 insertions, 11 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index e4d9848..7495f6d 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -3642,6 +3642,11 @@ int QApplication::x11ProcessEvent(XEvent* event)
case MapNotify: // window shown
if (widget->isWindow()) {
+ // if we got a MapNotify when we were not waiting for it, it most
+ // likely means the user has already asked to hide the window before
+ // it ever being shown, so we try to withdraw a window after sending
+ // the QShowEvent.
+ bool pendingHide = widget->testAttribute(Qt::WA_WState_ExplicitShowHide) && widget->testAttribute(Qt::WA_WState_Hidden);
widget->d_func()->topData()->waitingForMapNotify = 0;
if (widget->windowType() != Qt::Popup) {
@@ -3661,6 +3666,8 @@ int QApplication::x11ProcessEvent(XEvent* event)
widget->setAttribute(Qt::WA_WState_Visible, true);
}
}
+ if (pendingHide) // hide the window
+ XWithdrawWindow(X11->display, widget->internalWinId(), widget->x11Info().screen());
}
break;
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index cb4061e..5c80340 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -162,7 +162,7 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ
QMap<ObjectGesture, QList<QGesture *> >::Iterator iter = m_objectGestures.begin();
while (iter != m_objectGestures.end()) {
ObjectGesture objectGesture = iter.key();
- if (objectGesture.gesture == type && target == objectGesture.object.data()) {
+ if (objectGesture.gesture == type && target == objectGesture.object) {
QSet<QGesture *> gestures = iter.value().toSet();
for (QHash<QGestureRecognizer *, QSet<QGesture *> >::iterator
it = m_obsoleteGestures.begin(), e = m_obsoleteGestures.end(); it != e; ++it) {
@@ -172,6 +172,7 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ
m_deletedRecognizers.remove(g);
m_gestureToRecognizer.remove(g);
}
+
qDeleteAll(gestures);
iter = m_objectGestures.erase(iter);
} else {
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h
index 747cb1a..0d84b67 100644
--- a/src/gui/kernel/qgesturemanager_p.h
+++ b/src/gui/kernel/qgesturemanager_p.h
@@ -106,13 +106,13 @@ private:
struct ObjectGesture
{
- QWeakPointer<QObject> object;
+ QObject* object;
Qt::GestureType gesture;
ObjectGesture(QObject *o, const Qt::GestureType &g) : object(o), gesture(g) { }
inline bool operator<(const ObjectGesture &rhs) const
{
- if (object.data() < rhs.object.data())
+ if (object < rhs.object)
return true;
if (object == rhs.object)
return gesture < rhs.gesture;
diff --git a/src/xmlpatterns/parser/createTokenLookup.sh b/src/xmlpatterns/parser/createTokenLookup.sh
index 01af6ca..e11a3ba 100755
--- a/src/xmlpatterns/parser/createTokenLookup.sh
+++ b/src/xmlpatterns/parser/createTokenLookup.sh
@@ -71,16 +71,16 @@ license=`cat <<EOF
** Exception version 1.0, 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 are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
+**
+**
+**
+**
+**
+**
+**
+**
** \\$QT_END_LICENSE\\$
**
****************************************************************************/