diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-27 22:33:26 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-27 22:33:26 (GMT) |
commit | b65e9811968ec2e122b0e7f6b9a58dce50e3c01c (patch) | |
tree | 5c394813841d5172e3430f20b0500ffc10fc594e /src | |
parent | 7795c14a574fcee67c840ce996602d61e66683f5 (diff) | |
parent | 7f9205aa572c60085c9e9f38749bb48e707fea95 (diff) | |
download | Qt-b65e9811968ec2e122b0e7f6b9a58dce50e3c01c.zip Qt-b65e9811968ec2e122b0e7f6b9a58dce50e3c01c.tar.gz Qt-b65e9811968ec2e122b0e7f6b9a58dce50e3c01c.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:
Adding missing image
Fix QT_NO_DATESTRING
Check the gesturemanager pointer before accessing it.
Added files that had been renamed.
Modified file/directory names and text to remove disallowed terminology.
Cherry pick fix for MOBILITY-1077 from Qt Mobility.
Fix typo in docs.
Cherry pick fix for MOBILITY-1145 from Qt Mobility.
Cherry pick fix for MOBILITY-1144 from Qt Mobility.
Fixed the following sub-tasks for QTBUG-12192
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 8 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 6 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativestringconverters.cpp | 8 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativestringconverters_p.h | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 7 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qevent.cpp | 8 | ||||
-rw-r--r-- | src/gui/kernel/qgesture.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 4 | ||||
-rw-r--r-- | src/network/bearer/qnetworksession.cpp | 12 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 21 |
12 files changed, 58 insertions, 36 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 23307c9..febcdef 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -240,7 +240,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: color expected")); } break; -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING case QVariant::Date: { bool ok; @@ -262,7 +262,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: datetime expected")); } break; -#endif // QT_NO_TEXTDATE +#endif // QT_NO_DATESTRING case QVariant::Point: case QVariant::PointF: { @@ -416,7 +416,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, instr.storeColor.value = c.rgba(); } break; -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING case QVariant::Date: { QDate d = QDeclarativeStringConverters::dateFromString(string); @@ -450,7 +450,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, instr.storeDateTime.valueIndex = index; } break; -#endif // QT_NO_TEXTDATE +#endif // QT_NO_DATESTRING case QVariant::Point: case QVariant::PointF: { diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index e313c97..346a2f4 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -329,7 +329,7 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr qtObject.setProperty(QLatin1String("tint"), newFunction(QDeclarativeEnginePrivate::tint, 2)); } -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING //date/time formatting qtObject.setProperty(QLatin1String("formatDate"),newFunction(QDeclarativeEnginePrivate::formatDate, 2)); qtObject.setProperty(QLatin1String("formatTime"),newFunction(QDeclarativeEnginePrivate::formatTime, 2)); @@ -1301,7 +1301,7 @@ QScriptValue QDeclarativeEnginePrivate::vector3d(QScriptContext *ctxt, QScriptEn \qmlmethod string Qt::formatDate(datetime date, variant format) Returns the string representation of \c date, formatted according to \c format. */ -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine) { int argCount = ctxt->argumentCount(); @@ -1442,7 +1442,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr } return engine->newVariant(qVariantFromValue(date.toString(enumFormat))); } -#endif // QT_NO_TEXTDATE +#endif // QT_NO_DATESTRING /*! \qmlmethod color Qt::rgba(real red, real green, real blue, real alpha) diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index a5c8c38..3b5dd5a 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -304,7 +304,7 @@ public: static QScriptValue consoleLog(QScriptContext*, QScriptEngine*); static QScriptValue quit(QScriptContext*, QScriptEngine*); -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING static QScriptValue formatDate(QScriptContext*, QScriptEngine*); static QScriptValue formatTime(QScriptContext*, QScriptEngine*); static QScriptValue formatDateTime(QScriptContext*, QScriptEngine*); diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp index 8bd2cf1..7534a2c 100644 --- a/src/declarative/qml/qdeclarativestringconverters.cpp +++ b/src/declarative/qml/qdeclarativestringconverters.cpp @@ -106,14 +106,14 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p return QVariant(uint(qRound(s.toDouble(ok)))); case QMetaType::QColor: return QVariant::fromValue(colorFromString(s, ok)); -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING case QMetaType::QDate: return QVariant::fromValue(dateFromString(s, ok)); case QMetaType::QTime: return QVariant::fromValue(timeFromString(s, ok)); case QMetaType::QDateTime: return QVariant::fromValue(dateTimeFromString(s, ok)); -#endif // QT_NO_TEXTDATE +#endif // QT_NO_DATESTRING case QMetaType::QPointF: return QVariant::fromValue(pointFFromString(s, ok)); case QMetaType::QPoint: @@ -152,7 +152,7 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) } } -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok) { QDate d = QDate::fromString(s, Qt::ISODate); @@ -173,7 +173,7 @@ QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, boo if (ok) *ok = d.isValid(); return d; } -#endif // QT_NO_TEXTDATE +#endif // QT_NO_DATESTRING //expects input of "x,y" QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok) diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h index 842d1b3..e6b0abe 100644 --- a/src/declarative/qml/qdeclarativestringconverters_p.h +++ b/src/declarative/qml/qdeclarativestringconverters_p.h @@ -73,7 +73,7 @@ namespace QDeclarativeStringConverters QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0); QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0); -#ifndef QT_NO_TEXTDATE +#ifndef QT_NO_DATESTRING QDate Q_DECLARATIVE_EXPORT dateFromString(const QString &, bool *ok = 0); QTime Q_DECLARATIVE_EXPORT timeFromString(const QString &, bool *ok = 0); QDateTime Q_DECLARATIVE_EXPORT dateTimeFromString(const QString &, bool *ok = 0); diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 5fffefb..a2ae385 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1453,9 +1453,10 @@ QGraphicsItem::~QGraphicsItem() #ifndef QT_NO_GESTURES if (d_ptr->isObject && !d_ptr->gestureContext.isEmpty()) { QGraphicsObject *o = static_cast<QGraphicsObject *>(this); - QGestureManager *manager = QGestureManager::instance(); - foreach (Qt::GestureType type, d_ptr->gestureContext.keys()) - manager->cleanupCachedGestures(o, type); + if (QGestureManager *manager = QGestureManager::instance()) { + foreach (Qt::GestureType type, d_ptr->gestureContext.keys()) + manager->cleanupCachedGestures(o, type); + } } #endif diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index aaf479f..5c333b0 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -5791,10 +5791,12 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window, #ifndef QT_NO_GESTURES QGestureManager* QGestureManager::instance() { - QApplicationPrivate *qAppPriv = QApplicationPrivate::instance(); - if (!qAppPriv->gestureManager) - qAppPriv->gestureManager = new QGestureManager(qApp); - return qAppPriv->gestureManager; + if (QApplicationPrivate *qAppPriv = QApplicationPrivate::instance()) { + if (!qAppPriv->gestureManager) + qAppPriv->gestureManager = new QGestureManager(qApp); + return qAppPriv->gestureManager; + } + return 0; } #endif // QT_NO_GESTURES diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 92eed33..bbc9e0b 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3627,7 +3627,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \brief The QTouchEvent class contains parameters that describe a touch event. \since 4.6 \ingroup events - \ingroup multitouch + \ingroup touch \section1 Enabling Touch Events @@ -3641,7 +3641,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) Similarly to QMouseEvent, Qt automatically grabs each touch point on the first press inside a widget, and the widget will receive all updates for the touch point until it is released. - Note that it is possible for a widget to receive events for multiple touch points, and that + Note that it is possible for a widget to receive events for numerous touch points, and that multiple widgets may be receiving touch events at the same time. \section1 Event Handling @@ -3717,7 +3717,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \i As mentioned above, enabling touch events means multiple widgets can be receiving touch events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents, - this gives you great flexibility in designing multi-touch user interfaces. Be aware of the + this gives you great flexibility in designing touch user interfaces. Be aware of the implications. For example, it is possible that the user is moving a QSlider with one finger and pressing a QPushButton with another. The signals emitted by these widgets will be interleaved. @@ -3729,7 +3729,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an \l{QApplication::activePopupWidget()}{active pop-up widget}. The behavior of QTouchEvents is - undefined when opening a pop-up or grabbing the mouse while there are multiple active touch + undefined when opening a pop-up or grabbing the mouse while there are more than one active touch points. \endlist diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index 6359ecf..4a4452a 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -306,10 +306,10 @@ void QPanGesture::setAcceleration(qreal value) \class QPinchGesture \since 4.6 \brief The QPinchGesture class describes a pinch gesture made my the user. - \ingroup multitouch + \ingroup touch \ingroup gestures - A pinch gesture is a form of multitouch user input in which the user typically + A pinch gesture is a form of touch user input in which the user typically touches two points on the input device with a thumb and finger, before moving them closer together or further apart to change the scale factor, zoom, or level of detail of the user interface. @@ -389,7 +389,7 @@ void QPanGesture::setAcceleration(qreal value) \brief the current scale factor The scale factor measures the scale factor associated with the distance - between two of the user's inputs on a multitouch device. + between two of the user's inputs on a touch device. \sa totalScaleFactor, lastScaleFactor */ diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index fed8d0a..aaa29a1 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -12049,8 +12049,8 @@ void QWidget::ungrabGesture(Qt::GestureType gesture) { Q_D(QWidget); if (d->gestureContext.remove(gesture)) { - QGestureManager *manager = QGestureManager::instance(); - manager->cleanupCachedGestures(this, gesture); + if (QGestureManager *manager = QGestureManager::instance()) + manager->cleanupCachedGestures(this, gesture); } } #endif // QT_NO_GESTURES diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 1ed6cbb..65de539 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -629,8 +629,10 @@ void QNetworkSession::reject() If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned. - This function may not always be supported on all platforms and returns - 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + This function may not always be supported on all platforms and returns 0. + The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + + \note On some platforms this function may run the main event loop. */ quint64 QNetworkSession::bytesWritten() const { @@ -646,8 +648,10 @@ quint64 QNetworkSession::bytesWritten() const If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned. - This function may not always be supported on all platforms and returns - 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + This function may not always be supported on all platforms and returns 0. + The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + + \note On some platforms this function may run the main event loop. */ quint64 QNetworkSession::bytesReceived() const { diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index f89ed0a..d6b4975 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1044,6 +1044,11 @@ void QNetworkSessionPrivateImpl::RunL() TInt error = KErrNone; QNetworkConfiguration newActiveConfig = activeConfiguration(); if (!newActiveConfig.isValid()) { + // RConnection startup was successfull but no configuration + // was found. That indicates that user has chosen to create a + // new WLAN configuration (from scan results), but that new + // configuration does not have access to Internet (Internet + // Connectivity Test, ICT, failed). error = KErrGeneral; } else { // Use name of the IAP to open global 'Open C' RConnection @@ -1053,16 +1058,24 @@ void QNetworkSessionPrivateImpl::RunL() strcpy(ifr.ifr_name, nameAsByteArray.constData()); error = setdefaultif(&ifr); } - if (error != KErrNone) { isOpen = false; isOpening = false; iError = QNetworkSession::UnknownSessionError; QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + if (!newActiveConfig.isValid()) { + // No valid configuration, bail out. + // Status updates from QNCM won't be received correctly + // because there is no configuration to associate them with so transit here. + iConnection.Close(); + newState(QNetworkSession::Closing); + newState(QNetworkSession::Disconnected); + } else { + Cancel(); + } QT_TRYCATCH_LEAVING(syncStateWithInterface()); return; } @@ -1117,7 +1130,9 @@ void QNetworkSessionPrivateImpl::RunL() isOpening = false; activeConfig = QNetworkConfiguration(); serviceConfig = QNetworkConfiguration(); - if (publicConfig.state() == QNetworkConfiguration::Undefined || + if (statusCode == KErrCancel) { + iError = QNetworkSession::SessionAbortedError; + } else if (publicConfig.state() == QNetworkConfiguration::Undefined || publicConfig.state() == QNetworkConfiguration::Defined) { iError = QNetworkSession::InvalidConfigurationError; } else { |