diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-12-13 10:49:30 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-12-13 10:49:43 (GMT) |
commit | 11f61a9c413352e01fd2180250aa3fb09e1b4ac9 (patch) | |
tree | 677e38fbb55cd9fb2b45c2bff22a213ec7096c94 /src | |
parent | b62c6de3eae005da146a9009f86851a1431b1892 (diff) | |
parent | 9aa60dfdf5b4837b9ceb15d8fcbc96f37dce7b5a (diff) | |
download | Qt-11f61a9c413352e01fd2180250aa3fb09e1b4ac9.zip Qt-11f61a9c413352e01fd2180250aa3fb09e1b4ac9.tar.gz Qt-11f61a9c413352e01fd2180250aa3fb09e1b4ac9.tar.bz2 |
Merge commit '9aa60dfdf5b4837b9ceb15d8fcbc96f37dce7b5a' of Oslo-Staging-1 into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/codecs/qtextcodec.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qprocess.cpp | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_unix.cpp | 5 | ||||
-rw-r--r-- | src/dbus/qdbusargument_p.h | 2 | ||||
-rw-r--r-- | src/dbus/qdbusconnection_p.h | 2 | ||||
-rw-r--r-- | src/dbus/qdbusconnectioninterface.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbuserror.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusintegrator_p.h | 2 | ||||
-rw-r--r-- | src/dbus/qdbusinterface.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusinterface_p.h | 4 | ||||
-rw-r--r-- | src/dbus/qdbusinternalfilters.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusmessage.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusmetatype.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusutil.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusxmlparser_p.h | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 24 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 10 | ||||
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 3 | ||||
-rw-r--r-- | src/qt_install.pri | 6 |
20 files changed, 58 insertions, 23 deletions
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h index f831700..6170272 100644 --- a/src/corelib/codecs/qtextcodec.h +++ b/src/corelib/codecs/qtextcodec.h @@ -161,7 +161,7 @@ public: QByteArray fromUnicode(const QString& str); QByteArray fromUnicode(const QChar *uc, int len); #ifdef QT3_SUPPORT - QByteArray fromUnicode(const QString& uc, int& lenInOut); + QT3_SUPPORT QByteArray fromUnicode(const QString& uc, int& lenInOut); #endif bool hasFailure() const; private: diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 37b0ea1..e4c4e3f 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -144,7 +144,7 @@ QString QFSFileEnginePrivate::canonicalized(const QString &path) return path; #endif // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here. -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_LINIX) || defined(Q_OS_SYMBIAN) char *ret = realpath(path.toLocal8Bit().constData(), (char*)0); if (ret) { QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret)); diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 37161bc..c78af3c 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -275,7 +275,7 @@ QProcessEnvironment &QProcessEnvironment::operator=(const QProcessEnvironment &o */ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const { - return d->hash == other.d->hash; + return d == other.d || (d && other.d && d->hash == other.d->hash); } /*! @@ -334,6 +334,7 @@ bool QProcessEnvironment::contains(const QString &name) const */ void QProcessEnvironment::insert(const QString &name, const QString &value) { + // d detaches from null d->hash.insert(prepareName(name), prepareValue(value)); } diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp index 5885591..d0dc7be 100644 --- a/src/corelib/kernel/qcore_unix.cpp +++ b/src/corelib/kernel/qcore_unix.cpp @@ -129,7 +129,7 @@ static inline bool time_update(struct timeval *tv, const struct timeval &start, // clock source is monotonic, so we can recalculate how much timeout is left struct timeval now = qt_gettime(); *tv = timeout + start - now; - return true; + return tv->tv_sec >= 0; } int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept, @@ -154,7 +154,8 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept, // recalculate the timeout if (!time_update(&timeout, start, *orig_timeout)) { - // clock reset, fake timeout error + // timeout during update + // or clock reset, fake timeout error return 0; } } diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h index 47c5e62..17302b4 100644 --- a/src/dbus/qdbusargument_p.h +++ b/src/dbus/qdbusargument_p.h @@ -54,7 +54,7 @@ // #include <qdbusargument.h> -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" QT_BEGIN_NAMESPACE diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index b65e101..d6f7598 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -67,7 +67,7 @@ #include <QtCore/qvarlengtharray.h> #include <QtCore/qvector.h> -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include <qdbusmessage.h> diff --git a/src/dbus/qdbusconnectioninterface.cpp b/src/dbus/qdbusconnectioninterface.cpp index 0f9a67f..ec61859 100644 --- a/src/dbus/qdbusconnectioninterface.cpp +++ b/src/dbus/qdbusconnectioninterface.cpp @@ -49,7 +49,7 @@ #include <QtCore/QVariant> #include <QtCore/QDebug> -#include <qdbus_symbols_p.h> // for the DBUS_* constants +#include "qdbus_symbols_p.h" // for the DBUS_* constants QT_BEGIN_NAMESPACE diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp index 5c2fa2b..a48b878 100644 --- a/src/dbus/qdbuserror.cpp +++ b/src/dbus/qdbuserror.cpp @@ -44,7 +44,7 @@ #include <qdebug.h> #include <qvarlengtharray.h> -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include "qdbusmessage.h" #include "qdbusmessage_p.h" diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h index 5b18aca..85c6cb2 100644 --- a/src/dbus/qdbusintegrator_p.h +++ b/src/dbus/qdbusintegrator_p.h @@ -54,7 +54,7 @@ #ifndef QDBUSINTEGRATOR_P_H #define QDBUSINTEGRATOR_P_H -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include "qcoreevent.h" #include "qeventloop.h" diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp index d0a693f..c05e6a9 100644 --- a/src/dbus/qdbusinterface.cpp +++ b/src/dbus/qdbusinterface.cpp @@ -41,7 +41,7 @@ #include "qdbusinterface.h" -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include <QtCore/qpointer.h> #include <QtCore/qstringlist.h> diff --git a/src/dbus/qdbusinterface_p.h b/src/dbus/qdbusinterface_p.h index 3d11af1..a601608 100644 --- a/src/dbus/qdbusinterface_p.h +++ b/src/dbus/qdbusinterface_p.h @@ -54,8 +54,8 @@ #ifndef QDBUSINTERFACEPRIVATE_H #define QDBUSINTERFACEPRIVATE_H -#include <qdbusabstractinterface_p.h> -#include <qdbusmetaobject_p.h> +#include "qdbusabstractinterface_p.h" +#include "qdbusmetaobject_p.h" #include <qdbusinterface.h> QT_BEGIN_NAMESPACE diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp index acd04d3..37110c5 100644 --- a/src/dbus/qdbusinternalfilters.cpp +++ b/src/dbus/qdbusinternalfilters.cpp @@ -41,7 +41,7 @@ #include "qdbusconnection_p.h" -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include <QtCore/qcoreapplication.h> #include <QtCore/qmetaobject.h> #include <QtCore/qstringlist.h> diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp index 4f1950b..a37ba1f 100644 --- a/src/dbus/qdbusmessage.cpp +++ b/src/dbus/qdbusmessage.cpp @@ -44,7 +44,7 @@ #include <qdebug.h> #include <qstringlist.h> -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include "qdbusargument_p.h" #include "qdbuserror.h" diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp index 237aea3..afa3bbf 100644 --- a/src/dbus/qdbusmetatype.cpp +++ b/src/dbus/qdbusmetatype.cpp @@ -42,7 +42,7 @@ #include "qdbusmetatype.h" #include <string.h> -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include <qbytearray.h> #include <qglobal.h> diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp index bf5a739..01b1dbd 100644 --- a/src/dbus/qdbusutil.cpp +++ b/src/dbus/qdbusutil.cpp @@ -41,7 +41,7 @@ #include "qdbusutil_p.h" -#include <qdbus_symbols_p.h> +#include "qdbus_symbols_p.h" #include <QtCore/qstringlist.h> diff --git a/src/dbus/qdbusxmlparser_p.h b/src/dbus/qdbusxmlparser_p.h index 3dbae1b..1a0523b 100644 --- a/src/dbus/qdbusxmlparser_p.h +++ b/src/dbus/qdbusxmlparser_p.h @@ -56,7 +56,7 @@ #include <QtCore/qmap.h> #include <QtXml/qdom.h> #include <qdbusmacros.h> -#include <qdbusintrospection_p.h> +#include "qdbusintrospection_p.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 27ebb79..2a53456 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -613,6 +613,19 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) if (item == lastActivePanel) lastActivePanel = 0; + // Cancel active touches + { + QMap<int, QGraphicsItem *>::iterator it = itemForTouchPointId.begin(); + while (it != itemForTouchPointId.end()) { + if (it.value() == item) { + sceneCurrentTouchPoints.remove(it.key()); + it = itemForTouchPointId.erase(it); + } else { + ++it; + } + } + } + // Disable selectionChanged() for individual items ++selectionChanging; int oldSelectedItemsSize = selectedItems.size(); @@ -5679,17 +5692,22 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve touchEvent->setAccepted(acceptTouchEvents); res = acceptTouchEvents && sendEvent(item, touchEvent); eventAccepted = touchEvent->isAccepted(); - item->d_ptr->acceptedTouchBeginEvent = (res && eventAccepted); + if (itemForTouchPointId.value(touchEvent->touchPoints().first().id()) == 0) { + // item was deleted + item = 0; + } else { + item->d_ptr->acceptedTouchBeginEvent = (res && eventAccepted); + } touchEvent->spont = false; if (res && eventAccepted) { // the first item to accept the TouchBegin gets an implicit grab. for (int i = 0; i < touchEvent->touchPoints().count(); ++i) { const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().at(i); - itemForTouchPointId[touchPoint.id()] = item; + itemForTouchPointId[touchPoint.id()] = item; // can be zero } break; } - if (item->isPanel()) + if (item && item->isPanel()) break; } diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 9f4cd0c..8c63968 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -4092,9 +4092,15 @@ bool QApplication::notify(QObject *receiver, QEvent *e) bool acceptTouchEvents = widget->testAttribute(Qt::WA_AcceptTouchEvents); touchEvent->setWidget(widget); touchEvent->setAccepted(acceptTouchEvents); + QWeakPointer<QWidget> p = widget; res = acceptTouchEvents && d->notify_helper(widget, touchEvent); eventAccepted = touchEvent->isAccepted(); - widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, res && eventAccepted); + if (p.isNull()) { + // widget was deleted + widget = 0; + } else { + widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, res && eventAccepted); + } touchEvent->spont = false; if (res && eventAccepted) { // the first widget to accept the TouchBegin gets an implicit grab. @@ -4103,7 +4109,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) d->widgetForTouchPointId[touchPoint.id()] = widget; } break; - } else if (widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) { + } else if (p.isNull() || widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) { break; } QPoint offset = widget->pos(); diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index c91c608..923f2e3 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -49,6 +49,9 @@ #include "QtCore/qdatetime.h" #include <ctype.h> +#ifndef QT_NO_DATESTRING +# include <stdio.h> +#endif QT_BEGIN_NAMESPACE diff --git a/src/qt_install.pri b/src/qt_install.pri index ebeac8d..5b29942 100644 --- a/src/qt_install.pri +++ b/src/qt_install.pri @@ -30,6 +30,12 @@ qt_install_headers { targ_headers.files = $$INSTALL_HEADERS targ_headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET INSTALLS += targ_headers + + contains(QT_CONFIG,private_tests) { + private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES + private_headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET/private + INSTALLS += private_headers + } } embedded:equals(TARGET, QtGui) { |