summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp6
-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
4 files changed, 17 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 3d3a749..82dd83a 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -809,6 +809,12 @@ void QApplicationPrivate::construct(
if (testLib.load()) {
typedef void (*TasInitialize)(void);
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
+#ifdef Q_OS_SYMBIAN
+ // resolving method by name does not work on Symbian OS so need to use ordinal
+ if(!initFunction) {
+ initFunction = (TasInitialize)testLib.resolve("1");
+ }
+#endif
if (initFunction) {
initFunction();
} else {
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;