summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2009-08-28 11:34:31 (GMT)
committermread <qt-info@nokia.com>2009-08-28 11:34:31 (GMT)
commitb165e6a8f86efb8aebdca44c092907d2750533d4 (patch)
tree0b70cfc8602aab9320b0a60a63e8fedf6c67857c /src
parent719d5ac4220744d17344ff07ffaa9e86c01ac412 (diff)
parent7449a69e39b3ccd877da3e5ad7a9154ab7751dec (diff)
downloadQt-b165e6a8f86efb8aebdca44c092907d2750533d4.zip
Qt-b165e6a8f86efb8aebdca44c092907d2750533d4.tar.gz
Qt-b165e6a8f86efb8aebdca44c092907d2750533d4.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/container/qaxwidget.cpp7
-rw-r--r--src/corelib/animation/qabstractanimation.cpp31
-rw-r--r--src/corelib/global/qglobal.cpp6
-rw-r--r--src/corelib/global/qnamespace.qdoc5
-rw-r--r--src/corelib/io/qsettings.cpp16
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp48
-rw-r--r--src/corelib/kernel/qabstractitemmodel.h3
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp4
-rw-r--r--src/corelib/kernel/qobject.cpp14
-rw-r--r--src/corelib/statemachine/qabstracttransition_p.h2
-rw-r--r--src/corelib/statemachine/qsignalevent.h2
-rw-r--r--src/corelib/statemachine/qsignaltransition.cpp17
-rw-r--r--src/corelib/statemachine/qsignaltransition_p.h3
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp7
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp8
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp11
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.h1
-rw-r--r--src/gui/kernel/qwidget.cpp9
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp2
-rw-r--r--src/gui/painting/qbackingstore.cpp4
-rw-r--r--src/gui/styles/qs60style_s60.cpp3
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp6
-rw-r--r--src/opengl/qgl.cpp20
-rw-r--r--src/script/api/qscriptcontextinfo.cpp14
-rw-r--r--src/script/api/qscriptengine.cpp8
-rw-r--r--src/script/utils/qscriptdate.cpp2
26 files changed, 185 insertions, 68 deletions
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index e4c9d42..621c836 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -1535,9 +1535,10 @@ HRESULT WINAPI QAxClientSite::SetBorderSpace(LPCBORDERWIDTHS pborderwidths)
HRESULT WINAPI QAxClientSite::SetActiveObject(IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
{
AX_DEBUG(QAxClientSite::SetActiveObject);
-
- if (pszObjName && widget)
- widget->setWindowTitle(QString::fromWCharArray(pszObjName));
+
+ Q_UNUSED(pszObjName);
+ // we are ignoring the name of the object, as suggested by MSDN documentation
+ // for IOleInPlaceUIWindow::SetActiveObject().
if (m_spInPlaceActiveObject) {
if (!inPlaceModelessEnabled)
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index dfd6779..49bd8e9 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -259,28 +259,33 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
}
state = newState;
- QPointer<QAbstractAnimation> guard(q);
+ QWeakPointer<QAbstractAnimation> guard(q);
- guard->updateState(oldState, newState);
+ q->updateState(oldState, newState);
+ if (!guard)
+ return;
//this is to be safe if updateState changes the state
if (state == oldState)
return;
// Notify state change
- if (guard)
- emit guard->stateChanged(oldState, newState);
+ emit q->stateChanged(oldState, newState);
+ if (!guard)
+ return;
- switch (state)
- {
+ switch (state) {
case QAbstractAnimation::Paused:
case QAbstractAnimation::Running:
//this ensures that the value is updated now that the animation is running
- if(oldState == QAbstractAnimation::Stopped && guard)
- guard->setCurrentTime(currentTime);
+ if(oldState == QAbstractAnimation::Stopped) {
+ q->setCurrentTime(currentTime);
+ if (!guard)
+ return;
+ }
// Register timer if our parent is not running.
- if (state == QAbstractAnimation::Running && guard) {
+ if (state == QAbstractAnimation::Running) {
if (!group || group->state() == QAbstractAnimation::Stopped) {
QUnifiedTimer::instance()->registerAnimation(q);
}
@@ -292,7 +297,10 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
case QAbstractAnimation::Stopped:
// Leave running state.
int dura = q->duration();
- if (deleteWhenStopped && guard)
+ if (!guard)
+ return;
+
+ if (deleteWhenStopped)
q->deleteLater();
QUnifiedTimer::instance()->unregisterAnimation(q);
@@ -300,8 +308,7 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
if (dura == -1 || loopCount < 0
|| (oldDirection == QAbstractAnimation::Forward && (oldCurrentTime * (oldCurrentLoop + 1)) == (dura * loopCount))
|| (oldDirection == QAbstractAnimation::Backward && oldCurrentTime == 0)) {
- if (guard)
- emit q->finished();
+ emit q->finished();
}
break;
}
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index d7ae78f..7a24ecc 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1903,12 +1903,12 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
*/
/*!
- T *q_check_ptr(T *pointer)
+ \fn T *q_check_ptr(T *pointer)
\relates <QtGlobal>
- Users Q_CHECK_PTR on \a pointer, then returns \a pointer.
+ Users Q_CHECK_PTR on \a pointer, then returns \a pointer.
- This can be used as an inline version of Q_CHECK_PTR.
+ This can be used as an inline version of Q_CHECK_PTR.
*/
/*!
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 657e367..134cbcc 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2445,7 +2445,7 @@
\value ImhNone No hints.
\value ImhHiddenText Characters should be hidden, as is typically used when entering passwords.
This is automatically set when setting QLineEdit::echoMode to \c Password.
- \value ImhNumbersOnly Only number input is allowed.
+ \value ImhDigitsOnly Only number input is allowed.
\value ImhUppercaseOnly Only upper case letter input is allowed.
\value ImhLowercaseOnly Only lower case letter input is allowed.
\value ImhNoAutoUppercase The input method should not try to automatically switch to upper case
@@ -2456,6 +2456,9 @@
\value ImhNoPredictiveText Do not use predictive text (i.e. dictionary lookup) while typing.
\value ImhDialableCharactersOnly Only characters suitable for phone dialling are allowed.
+ \omitvalue ImhFormattedNumbersOnly
+ \omitvalue ImhExclusiveInputMask
+
\note If several flags ending with \c Only are ORed together, the resulting character set will
consist of the union of the specified sets. For instance specifying \c ImhNumbersOnly and
\c ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters.
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index db0c696..de483ed 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -3199,8 +3199,8 @@ bool QSettings::isWritable() const
Note that the Windows registry and INI files use case-insensitive
keys, whereas the Carbon Preferences API on Mac OS X uses
- case-sensitive keys. To avoid portability problems, see the \l{Key
- Syntax} rules.
+ case-sensitive keys. To avoid portability problems, see the
+ \l{Section and Key Syntax} rules.
Example:
@@ -3234,8 +3234,8 @@ void QSettings::setValue(const QString &key, const QVariant &value)
Note that the Windows registry and INI files use case-insensitive
keys, whereas the Carbon Preferences API on Mac OS X uses
- case-sensitive keys. To avoid portability problems, see the \l{Key
- Syntax} rules.
+ case-sensitive keys. To avoid portability problems, see the
+ \l{Section and Key Syntax} rules.
\sa setValue(), value(), contains()
*/
@@ -3269,8 +3269,8 @@ void QSettings::remove(const QString &key)
Note that the Windows registry and INI files use case-insensitive
keys, whereas the Carbon Preferences API on Mac OS X uses
- case-sensitive keys. To avoid portability problems, see the \l{Key
- Syntax} rules.
+ case-sensitive keys. To avoid portability problems, see the
+ \l{Section and Key Syntax} rules.
\sa value(), setValue()
*/
@@ -3331,8 +3331,8 @@ bool QSettings::event(QEvent *event)
Note that the Windows registry and INI files use case-insensitive
keys, whereas the Carbon Preferences API on Mac OS X uses
- case-sensitive keys. To avoid portability problems, see the \l{Key
- Syntax} rules.
+ case-sensitive keys. To avoid portability problems, see the
+ \l{Section and Key Syntax} rules.
Example:
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 1c9104a..5e8848b 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1339,7 +1339,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
\endlist
- \sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), reset(),
+ \sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), modelReset(),
changePersistentIndex()
*/
@@ -2769,7 +2769,24 @@ void QAbstractItemModel::endMoveColumns()
/*!
Resets the model to its original state in any attached views.
- The view to which the model is attached to will be reset as well.
+ \note Use beginResetModel() and endResetModel() instead whenever possible.
+ Use this method only if there is no way to call beginResetModel() before invalidating the model.
+ Otherwise it could lead to unexcpected behaviour, especially when used with proxy models.
+*/
+void QAbstractItemModel::reset()
+{
+ Q_D(QAbstractItemModel);
+ emit modelAboutToBeReset();
+ d->invalidatePersistentIndexes();
+ emit modelReset();
+}
+
+/*!
+ Begins a model reset operation.
+
+ A reset operation resets the model to its current state in any attached views.
+
+ \note Any views attached to this model will be reset as well.
When a model is reset it means that any previous data reported from the
model is now invalid and has to be queried for again. This also means that
@@ -2779,12 +2796,29 @@ void QAbstractItemModel::endMoveColumns()
call this function rather than emit dataChanged() to inform other
components when the underlying data source, or its structure, has changed.
- \sa modelAboutToBeReset(), modelReset()
+ You must call this function before resetting any internal data structures in your model
+ or proxy model.
+
+ \sa modelAboutToBeReset(), modelReset(), endResetModel()
+ \since 4.6
*/
-void QAbstractItemModel::reset()
+void QAbstractItemModel::beginResetModel()
{
- Q_D(QAbstractItemModel);
emit modelAboutToBeReset();
+}
+
+/*!
+ Completes a model reset operation.
+
+ You must call this function after resetting any internal data structure in your model
+ or proxy model.
+
+ \sa beginResetModel()
+ \since 4.6
+*/
+void QAbstractItemModel::endResetModel()
+{
+ Q_D(QAbstractItemModel);
d->invalidatePersistentIndexes();
emit modelReset();
}
@@ -3256,7 +3290,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
This signal is emitted when reset() is called, before the model's internal
state (e.g. persistent model indexes) has been invalidated.
- \sa reset(), modelReset()
+ \sa beginResetModel(), modelReset()
*/
/*!
@@ -3266,7 +3300,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
This signal is emitted when reset() is called, after the model's internal
state (e.g. persistent model indexes) has been invalidated.
- \sa reset(), modelAboutToBeReset()
+ \sa endResetModel(), modelAboutToBeReset()
*/
/*!
diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/kernel/qabstractitemmodel.h
index b47e4cb..1ca6cbe 100644
--- a/src/corelib/kernel/qabstractitemmodel.h
+++ b/src/corelib/kernel/qabstractitemmodel.h
@@ -293,6 +293,9 @@ protected:
void reset();
+ void beginResetModel();
+ void endResetModel();
+
void changePersistentIndex(const QModelIndex &from, const QModelIndex &to);
void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to);
QModelIndexList persistentIndexList() const;
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index 957b92c..a263cc4 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -175,10 +175,6 @@ Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal)
return qt_s60_plugin_resolver()->resolve(ordinal);
}
-/*!
-\internal
-Provides global access to a shared RFs.
-*/
class QS60RFsSession
{
public:
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 1f35c73..8abe28e 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -240,18 +240,20 @@ static void computeOffsets(const QMetaObject *metaobject, int *signalOffset, int
}
}
-/*! \internal
+/*
This vector contains the all connections from an object.
- Each object may have one vector containing the lists of connections for a given signal.
- The index in the vector correspond to the signal index.
- The signal index is the one returned by QObjectPrivate::signalIndex (not QMetaObject::indexOfSignal).
+ Each object may have one vector containing the lists of
+ connections for a given signal. The index in the vector correspond
+ to the signal index. The signal index is the one returned by
+ QObjectPrivate::signalIndex (not QMetaObject::indexOfSignal).
Negative index means connections to all signals.
This vector is protected by the object mutex (signalSlotMutexes())
- Each Connection is also part of a 'senders' linked list. The mutex of the receiver must be locked when touching
- the pointers of this linked list.
+ Each Connection is also part of a 'senders' linked list. The mutex
+ of the receiver must be locked when touching the pointers of this
+ linked list.
*/
class QObjectConnectionListVector : public QVector<QObjectPrivate::ConnectionList>
{
diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h
index 328be16..33e4474 100644
--- a/src/corelib/statemachine/qabstracttransition_p.h
+++ b/src/corelib/statemachine/qabstracttransition_p.h
@@ -75,7 +75,7 @@ public:
static QAbstractTransitionPrivate *get(QAbstractTransition *q);
bool callEventTest(QEvent *e);
- void callOnTransition(QEvent *e);
+ virtual void callOnTransition(QEvent *e);
QState *sourceState() const;
QStateMachine *machine() const;
void emitTriggered();
diff --git a/src/corelib/statemachine/qsignalevent.h b/src/corelib/statemachine/qsignalevent.h
index 7e5d888..de166f4 100644
--- a/src/corelib/statemachine/qsignalevent.h
+++ b/src/corelib/statemachine/qsignalevent.h
@@ -70,6 +70,8 @@ private:
QObject *m_sender;
int m_signalIndex;
QList<QVariant> m_arguments;
+
+ friend class QSignalTransitionPrivate;
};
#endif //QT_NO_STATEMACHINE
diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp
index e34448f..fb28c08 100644
--- a/src/corelib/statemachine/qsignaltransition.cpp
+++ b/src/corelib/statemachine/qsignaltransition.cpp
@@ -245,6 +245,23 @@ bool QSignalTransition::event(QEvent *e)
return QAbstractTransition::event(e);
}
+void QSignalTransitionPrivate::callOnTransition(QEvent *e)
+{
+ Q_Q(QSignalTransition);
+
+ QSignalEvent *se = static_cast<QSignalEvent *>(e);
+ int savedSignalIndex;
+ if (e->type() == QEvent::Signal) {
+ savedSignalIndex = se->m_signalIndex;
+ se->m_signalIndex = originalSignalIndex;
+ }
+
+ q->onTransition(e);
+
+ if (e->type() == QEvent::Signal)
+ se->m_signalIndex = savedSignalIndex;
+}
+
QT_END_NAMESPACE
#endif //QT_NO_STATEMACHINE
diff --git a/src/corelib/statemachine/qsignaltransition_p.h b/src/corelib/statemachine/qsignaltransition_p.h
index 21082ab..69bbcc9 100644
--- a/src/corelib/statemachine/qsignaltransition_p.h
+++ b/src/corelib/statemachine/qsignaltransition_p.h
@@ -69,9 +69,12 @@ public:
void unregister();
void maybeRegister();
+ virtual void callOnTransition(QEvent *e);
+
QObject *sender;
QByteArray signal;
int signalIndex;
+ int originalSignalIndex;
};
QT_END_NAMESPACE
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index d6946de..e5bca2c 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1408,6 +1408,7 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio
signal.remove(0, 1);
const QMetaObject *meta = sender->metaObject();
int signalIndex = meta->indexOfSignal(signal);
+ int originalSignalIndex = signalIndex;
if (signalIndex == -1) {
signalIndex = meta->indexOfSignal(QMetaObject::normalizedSignature(signal));
if (signalIndex == -1) {
@@ -1416,6 +1417,11 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio
return;
}
}
+ // The signal index we actually want to connect to is the one
+ // that is going to be sent, i.e. the non-cloned original index.
+ while (meta->method(signalIndex).attributes() & QMetaMethod::Cloned)
+ --signalIndex;
+
QVector<int> &connectedSignalIndexes = connections[sender];
if (connectedSignalIndexes.size() <= signalIndex)
connectedSignalIndexes.resize(signalIndex+1);
@@ -1435,6 +1441,7 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio
}
++connectedSignalIndexes[signalIndex];
QSignalTransitionPrivate::get(transition)->signalIndex = signalIndex;
+ QSignalTransitionPrivate::get(transition)->originalSignalIndex = originalSignalIndex;
#ifdef QSTATEMACHINE_DEBUG
qDebug() << q << ": added signal transition from" << transition->sourceState()
<< ": ( sender =" << sender << ", signal =" << signal
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index 3103ba1..2da768b 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -76,8 +76,8 @@ static TPtrC defaultFormatSpec(TExtendedLocale&)
return TPtrC(KNullDesC);
}
-/*!
- Definition of struct for mapping Symbian to ISO locale
+/*
+ Definition of struct for mapping Symbian to ISO locale
*/
struct symbianToISO {
int symbian_language;
@@ -85,8 +85,8 @@ struct symbianToISO {
};
-/*!
- Mapping from Symbian to ISO locale
+/*
+ Mapping from Symbian to ISO locale
*/
static const symbianToISO symbian_to_iso_list[] = {
{ ELangEnglish, "en_GB" },
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index d173efe..18fbf7b 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -174,6 +174,7 @@ public:
const QModelIndex &source_bottom_right);
void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int start, int end);
+ void _q_sourceAboutToBeReset();
void _q_sourceReset();
void _q_sourceLayoutAboutToBeChanged();
@@ -1148,11 +1149,17 @@ void QSortFilterProxyModelPrivate::_q_sourceHeaderDataChanged(Qt::Orientation or
emit q->headerDataChanged(orientation, proxy_start, proxy_end);
}
+void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset()
+{
+ Q_Q(QSortFilterProxyModel);
+ q->beginResetModel();
+}
+
void QSortFilterProxyModelPrivate::_q_sourceReset()
{
Q_Q(QSortFilterProxyModel);
// All internal structures are deleted in clear()
- q->reset();
+ q->endResetModel();
update_source_sort_column();
if (dynamic_sortfilter)
sort();
@@ -1499,6 +1506,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
disconnect(d->model, SIGNAL(layoutChanged()),
this, SLOT(_q_sourceLayoutChanged()));
+ disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset()));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset()));
QAbstractProxyModel::setSourceModel(sourceModel);
@@ -1539,6 +1547,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
connect(d->model, SIGNAL(layoutChanged()),
this, SLOT(_q_sourceLayoutChanged()));
+ connect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset()));
connect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset()));
d->clear_mapping();
diff --git a/src/gui/itemviews/qsortfilterproxymodel.h b/src/gui/itemviews/qsortfilterproxymodel.h
index 12baa19..0314aec 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.h
+++ b/src/gui/itemviews/qsortfilterproxymodel.h
@@ -177,6 +177,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(const QModelIndex &source_top_left, const QModelIndex &source_bottom_right))
Q_PRIVATE_SLOT(d_func(), void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_sourceAboutToBeReset())
Q_PRIVATE_SLOT(d_func(), void _q_sourceReset())
Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutAboutToBeChanged())
Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutChanged())
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index fb5f934..38b09ee 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -11846,10 +11846,9 @@ const QList<QAction*>& QWidget::softKeys() const
\preliminary
\since 4.6
- Sets the softkey \a softkey to this widget's list of softkeys,
+ Sets the softkey \a softKey to this widget's list of softkeys.
Setting 0 as softkey will clear all the existing softkeys set
- to the widget
- A QWidget can have 0 or more softkeys
+ to the widget. A QWidget can have 0 or more softkeys.
\sa softKeys(), setSoftKeys()
*/
@@ -11866,8 +11865,8 @@ void QWidget::setSoftKey(QAction *softKey)
}
/*!
- Sets the list of softkeys \a softkeys to this widget's list of softkeys,
- A QWidget can have 0 or more softkeys
+ Sets the list of softkeys \a softKeys to this widget's list of softkeys.
+ A QWidget can have 0 or more softkeys.
\sa softKeys(), setSoftKey()
*/
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 36ffcbe..eb87052 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -1450,7 +1450,7 @@ static const qreal inv_dist_to_plane = 1. / 1024.;
value of 1024 corresponds to the projection factor used
by QTransform::rotate() for the x and y axes.
- If \a distToPlane is zero, then the returned QTransform
+ If \a distanceToPlane is zero, then the returned QTransform
is formed by simply dropping the third row and third column
of the QMatrix4x4. This is suitable for implementing
orthographic projections where the z co-ordinate should
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 4f45c3d..4665b66 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1544,8 +1544,8 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn)
// QGLWidget does not support partial updates if:
// 1) The context is double buffered
// 2) The context is single buffered and auto-fill background is enabled.
- const bool noPartialUpdateSupport = (engine && engine->type() == QPaintEngine::OpenGL
- || engine->type() == QPaintEngine::OpenGL2)
+ const bool noPartialUpdateSupport = (engine && (engine->type() == QPaintEngine::OpenGL
+ || engine->type() == QPaintEngine::OpenGL2))
&& (usesDoubleBufferedGLContext || q->autoFillBackground());
QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn);
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index bc218cd..1cf47cc 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -1350,9 +1350,6 @@ void QS60StyleModeSpecifics::colorGroupAndIndex(
}
}
-/*!
- Constructs a QS60Style object.
-*/
QS60Style::QS60Style()
: QCommonStyle(*new QS60StylePrivate)
{
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 30f16da..faf04da 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -951,6 +951,12 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
if (hop_by_hop)
continue;
+ // Do not copy over the Date header because it will be
+ // different for every request and therefore cause a re-write to
+ // the disk when a 304 is received inside replyHeaderChanged()
+ if (header == "date")
+ continue;
+
// Don't store Warning 1xx headers
if (header == "warning") {
QByteArray v = rawHeader(header);
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 02991d9..8cf3b45 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2179,6 +2179,9 @@ GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format)
The \a format parameter sets the internal format for the
texture. The default format is \c GL_RGBA.
+ The binding \a options are a set of options used to decide how to
+ bind the texture to the context.
+
The texture that is generated is cached, so multiple calls to
bindTexture() with the same QImage will return the same texture
id.
@@ -2229,7 +2232,7 @@ GLuint QGLContext::bindTexture(const QPixmap &pixmap, GLenum target, GLint forma
\overload
Generates and binds a 2D GL texture to the current context, based
- on \a image.
+ on \a pixmap.
*/
GLuint QGLContext::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, BindOptions options)
{
@@ -4254,8 +4257,12 @@ GLuint QGLWidget::bindTexture(const QImage &image, GLenum target, GLint format)
return d->glcx->bindTexture(image, target, format, QGLContext::DefaultBindOption);
}
+/*!
+ \overload
-
+ The binding \a options are a set of options used to decide how to
+ bind the texture to the context.
+ */
GLuint QGLWidget::bindTexture(const QImage &image, GLenum target, GLint format, QGLContext::BindOptions options)
{
Q_D(QGLWidget);
@@ -4291,6 +4298,15 @@ GLuint QGLWidget::bindTexture(const QPixmap &pixmap, GLenum target, GLint format
return d->glcx->bindTexture(pixmap, target, format, QGLContext::DefaultBindOption);
}
+/*!
+ \overload
+
+ Generates and binds a 2D GL texture to the current context, based
+ on \a pixmap. The generated texture id is returned and can be used in
+
+ The binding \a options are a set of options used to decide how to
+ bind the texture to the context.
+ */
GLuint QGLWidget::bindTexture(const QPixmap &pixmap, GLenum target, GLint format,
QGLContext::BindOptions options)
{
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index e59b773..890ed9d 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -50,6 +50,9 @@
#include <QtCore/qmetaobject.h>
#include "CodeBlock.h"
#include "JSFunction.h"
+#if ENABLE(JIT)
+#include "MacroAssemblerCodeRef.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -154,7 +157,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
lineNumber = -1;
columnNumber = -1;
- const JSC::ExecState *frame = QScriptEnginePrivate::frameForContext(context);
+ JSC::CallFrame *frame = const_cast<JSC::CallFrame *>(QScriptEnginePrivate::frameForContext(context));
// Get the line number:
@@ -171,8 +174,13 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
JSC::Instruction *returnPC = aboveFrame->returnPC();
JSC::CodeBlock *codeBlock = frame->codeBlock();
if (returnPC && codeBlock) {
- lineNumber = codeBlock->lineNumberForBytecodeOffset(const_cast<JSC::ExecState *>(frame),
- returnPC - codeBlock->instructions().begin() -1);
+#if ENABLE(JIT)
+ unsigned bytecodeOffset = codeBlock->getBytecodeIndex(frame, JSC::ReturnAddressPtr(returnPC));
+#else
+ unsigned bytecodeOffset = returnPC - codeBlock->instructions().begin();
+#endif
+ bytecodeOffset--; //because returnPC is on the next instruction. We want the current one
+ lineNumber = codeBlock->lineNumberForBytecodeOffset(const_cast<JSC::ExecState *>(frame), bytecodeOffset);
}
}
} else {
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 596fd8f..29044a9 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2259,8 +2259,11 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
if (calledAsConstructor)
flags |= CalledAsConstructorContext;
+ //build a frame
JSC::CallFrame *newCallFrame = exec;
- if (callee == 0 || !(exec->callee() == callee && exec->returnPC() != 0)) {
+ if (callee == 0 //called from public QScriptEngine::pushContext
+ || exec->returnPC() == 0 || (contextFlags(exec) & NativeContext) //called from native-native call
+ || (exec->codeBlock() && exec->callee() != callee)) { //the interpreter did not build a frame for us.
//We need to check if the Interpreter might have already created a frame for function called from JS.
JSC::Interpreter *interp = exec->interpreter();
JSC::Register *oldEnd = interp->registerFile().end();
@@ -2278,6 +2281,9 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
newCallFrame->init(0, /*vPC=*/0, exec->scopeChain(), exec, flags, argc, callee);
} else {
setContextFlags(newCallFrame, flags);
+#if ENABLE(JIT)
+ exec->registers()[JSC::RegisterFile::Callee] = JSC::JSValue(callee); //JIT let the callee set the 'callee'
+#endif
if (calledAsConstructor) {
//update the new created this
JSC::Register* thisRegister = newCallFrame->registers() - JSC::RegisterFile::CallFrameHeaderSize - newCallFrame->argumentCount();
diff --git a/src/script/utils/qscriptdate.cpp b/src/script/utils/qscriptdate.cpp
index a6abe4a..2445ebf 100644
--- a/src/script/utils/qscriptdate.cpp
+++ b/src/script/utils/qscriptdate.cpp
@@ -330,7 +330,7 @@ static qsreal getLocalTZA()
/*!
\internal
- Converts the QDateTime \dt to an ECMA Date value (in UTC form).
+ Converts the QDateTime \a dt to an ECMA Date value (in UTC form).
*/
qsreal FromDateTime(const QDateTime &dt)
{