summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-08-28 13:01:55 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-08-28 13:01:55 (GMT)
commit7a69207653d97037d76b3dedfa3fa67033962eb3 (patch)
tree0be4650fc332d9c5197dac3877567cb23504db77 /src
parent9725ab222ffceb34b93af01631b273404ab784a9 (diff)
parent406f13e53ad78ba65b15ee7f06787e1d8a5d3fdd (diff)
downloadQt-7a69207653d97037d76b3dedfa3fa67033962eb3.zip
Qt-7a69207653d97037d76b3dedfa3fa67033962eb3.tar.gz
Qt-7a69207653d97037d76b3dedfa3fa67033962eb3.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.cpp124
-rw-r--r--src/corelib/kernel/qabstractitemmodel.h3
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp4
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp18
-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/accessible/qaccessible_mac_cocoa.mm13
-rw-r--r--src/gui/image/qpixmapfilter.cpp4
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp17
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp11
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.h1
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h1
-rw-r--r--src/gui/kernel/qmime_mac.cpp13
-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/gui/styles/qstylesheetstyle.cpp26
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp11
-rw-r--r--src/gui/text/qfontengine_s60.cpp9
-rw-r--r--src/gui/text/qfontengine_s60_p.h4
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac.mm6
-rw-r--r--src/network/access/qhttpnetworkreply.cpp7
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp6
-rw-r--r--src/opengl/qgl.cpp20
-rw-r--r--src/opengl/qgl.h2
-rw-r--r--src/opengl/qglshaderprogram.cpp15
-rw-r--r--src/opengl/qglshaderprogram.h4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h4
-rw-r--r--src/plugins/s60/src/qdesktopservices_3_2.cpp1
-rw-r--r--src/s60installs/s60installs.pro (renamed from src/s60installs/qt_libs.pro)3
-rw-r--r--src/script/api/qscriptcontextinfo.cpp14
-rw-r--r--src/script/api/qscriptengine.cpp8
-rw-r--r--src/script/utils/qscriptdate.cpp2
-rw-r--r--src/src.pro5
47 files changed, 344 insertions, 154 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..1ba3000 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()
*/
@@ -2498,25 +2498,32 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
/*!
Begins a row move operation.
- When reimplementing a subclass, this method simplifies moving entities
- in your model. This method is responsible for moving persistent indexes
- in the model, which you would otherwise be required to do yourself.
+ When reimplementing a subclass, this method simplifies moving
+ entities in your model. This method is responsible for moving
+ persistent indexes in the model, which you would otherwise be
+ required to do yourself.
Using beginMoveRows and endMoveRows is an alternative to emitting
- layoutAboutToBeChanged and layoutChanged directly along with changePersistentIndexes.
- layoutAboutToBeChanged is emitted by this method for compatibility reasons.
+ layoutAboutToBeChanged and layoutChanged directly along with
+ changePersistentIndexes. layoutAboutToBeChanged is emitted by
+ this method for compatibility reasons.
The \a sourceParent index corresponds to the parent from which the
- rows are moved; \a sourceFirst and \a sourceLast are the row numbers of the
- rows to be moved. The \a destinationParent index corresponds to the parent into which
- the rows are moved. The \a destinationRow is the row to which the rows will be moved.
- That is, the index at row \a sourceFirst in \a sourceParent will become row \a destinationRow
- in \a destinationParent. Its siblings will be moved correspondingly.
-
- Note that \a sourceParent and \a destinationParent may be the same, in which case you must
- ensure that the \a destinationRow is not within the range of \a sourceFirst and \a sourceLast.
- You must also ensure that you do not attempt to move a row to one of its own chilren or ancestors.
- This method returns false if either condition is true, in which case you should abort your move operation.
+ rows are moved; \a sourceFirst and \a sourceLast are the row
+ numbers of the rows to be moved. The \a destinationParent index
+ corresponds to the parent into which the rows are moved. The \a
+ destinationChild is the row to which the rows will be moved. That
+ is, the index at row \a sourceFirst in \a sourceParent will become
+ row \a destinationChild in \a destinationParent. Its siblings will
+ be moved correspondingly.
+
+ Note that \a sourceParent and \a destinationParent may be the
+ same, in which case you must ensure that the \a destinationChild is
+ not within the range of \a sourceFirst and \a sourceLast. You
+ must also ensure that you do not attempt to move a row to one of
+ its own chilren or ancestors. This method returns false if either
+ condition is true, in which case you should abort your move
+ operation.
\sa endMoveRows()
@@ -2694,25 +2701,32 @@ void QAbstractItemModel::endRemoveColumns()
/*!
Begins a column move operation.
- When reimplementing a subclass, this method simplifies moving entities
- in your model. This method is responsible for moving persistent indexes
- in the model, which you would otherwise be required to do yourself.
+ When reimplementing a subclass, this method simplifies moving
+ entities in your model. This method is responsible for moving
+ persistent indexes in the model, which you would otherwise be
+ required to do yourself.
- Using beginMoveColumns and endMoveColumns is an alternative to emitting
- layoutAboutToBeChanged and layoutChanged directly along with changePersistentIndexes.
- layoutAboutToBeChanged is emitted by this method for compatibility reasons.
+ Using beginMoveColumns and endMoveColumns is an alternative to
+ emitting layoutAboutToBeChanged and layoutChanged directly along
+ with changePersistentIndexes. layoutAboutToBeChanged is emitted
+ by this method for compatibility reasons.
The \a sourceParent index corresponds to the parent from which the
- columns are moved; \a sourceFirst and \a sourceLast are the column numbers of the
- columns to be moved. The \a destinationParent index corresponds to the parent into which
- the columns are moved. The \a destinationColumn is the column to which the columns will be moved.
- That is, the index at column \a sourceFirst in \a sourceParent will become column \a destinationColumn
- in \a destinationParent. Its siblings will be moved correspondingly.
-
- Note that \a sourceParent and \a destinationParent may be the same, in which case you must
- ensure that the \a destinationColumn is not within the range of \a sourceFirst and \a sourceLast.
- You must also ensure that you do not attempt to move a row to one of its own chilren or ancestors.
- This method returns false if either condition is true, in which case you should abort your move operation.
+ columns are moved; \a sourceFirst and \a sourceLast are the column
+ numbers of the columns to be moved. The \a destinationParent index
+ corresponds to the parent into which the columns are moved. The \a
+ destinationChild is the column to which the columns will be
+ moved. That is, the index at column \a sourceFirst in \a
+ sourceParent will become column \a destinationChild in \a
+ destinationParent. Its siblings will be moved correspondingly.
+
+ Note that \a sourceParent and \a destinationParent may be the
+ same, in which case you must ensure that the \a destinationChild
+ is not within the range of \a sourceFirst and \a sourceLast. You
+ must also ensure that you do not attempt to move a row to one of
+ its own chilren or ancestors. This method returns false if either
+ condition is true, in which case you should abort your move
+ operation.
\sa endMoveColumns()
@@ -2769,7 +2783,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 +2810,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 +3304,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 +3314,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/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 183809e..854abef 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1029,7 +1029,7 @@ void QCoreApplication::exit(int returnCode)
The event is \e not deleted when the event has been sent. The normal
approach is to create the event on the stack, for example:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 0
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 0
\sa postEvent(), notify()
*/
@@ -1552,7 +1552,7 @@ bool QCoreApplication::event(QEvent *e)
Example:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 1
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 1
\sa exit(), aboutToQuit(), QApplication::lastWindowClosed()
*/
@@ -2171,7 +2171,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
If you want to iterate over the list, you can use the \l foreach
pseudo-keyword:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 2
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 2
\sa setLibraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary,
{How to Create Qt Plugins}
@@ -2318,7 +2318,7 @@ void QCoreApplication::removeLibraryPath(const QString &path)
A function with the following signature that can be used as an
event filter:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 3
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 3
\sa setEventFilter()
*/
@@ -2507,7 +2507,7 @@ int QCoreApplication::loopLevel()
}
#endif
-/*!
+/*
\fn void QCoreApplication::watchUnixSignal(int signal, bool watch)
\internal
*/
@@ -2531,7 +2531,7 @@ int QCoreApplication::loopLevel()
The function specified by \a ptr should take no arguments and should
return nothing. For example:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 4
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 4
Note that for an application- or module-wide cleanup,
qAddPostRoutine() is often not suitable. For example, if the
@@ -2545,7 +2545,7 @@ int QCoreApplication::loopLevel()
parent-child mechanism to call a cleanup function at the right
time:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 5
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 5
By selecting the right parent object, this can often be made to
clean up the module's data at the right moment.
@@ -2559,7 +2559,7 @@ int QCoreApplication::loopLevel()
translation functions, \c tr() and \c trUtf8(), with these
signatures:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 6
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 6
This macro is useful if you want to use QObject::tr() or
QObject::trUtf8() in classes that don't inherit from QObject.
@@ -2568,7 +2568,7 @@ int QCoreApplication::loopLevel()
class definition (before the first \c{public:} or \c{protected:}).
For example:
- \snippet doc/src/snippets/code/src.corelib.kernel.qcoreapplication.cpp 7
+ \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 7
The \a context parameter is normally the class name, but it can
be any string.
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/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm
index 502827c..41a2566 100644
--- a/src/gui/accessible/qaccessible_mac_cocoa.mm
+++ b/src/gui/accessible/qaccessible_mac_cocoa.mm
@@ -59,9 +59,9 @@ QT_BEGIN_NAMESPACE
//#define MAC_ACCESSIBILTY_DEVELOPER_MODE
#ifdef MAC_ACCESSIBILTY_DEVELOPER_MODE
-#define MAC_ACCESSIBILTY_DEBUG qDebug
+#define MAC_ACCESSIBILTY_DEBUG QT_PREPEND_NAMESPACE(qDebug)
#else
-#define MAC_ACCESSIBILTY_DEBUG if (0) qDebug
+#define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(qDebug)
#endif
typedef QMap<QAccessible::Role, NSString *> QMacAccessibiltyRoleMap;
@@ -195,13 +195,13 @@ QT_END_NAMESPACE
- (BOOL)accessibilityIsIgnored
{
- QAInterface interface = interfaceForView(self);
+ QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
return isInterfaceIgnored(interface);
}
- (NSArray *)accessibilityAttributeNames
{
- QAInterface interface = interfaceForView(self);
+ QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
static NSArray *attributes = nil;
if (attributes == nil) {
@@ -213,9 +213,10 @@ QT_END_NAMESPACE
- (id)accessibilityAttributeValue:(NSString *)attribute
{
- MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self << QCFString::toQString(reinterpret_cast<CFStringRef>(attribute));
+ MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self <<
+ QT_PREPEND_NAMESPACE(QCFString)::toQString(reinterpret_cast<CFStringRef>(attribute));
- QAInterface interface = interfaceForView(self);
+ QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
// Switch on the attribute name and call the appropriate handler function.
// Pass the call on to the NSView class for attributes we don't handle.
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index bc14b5e..4b2f365 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -580,8 +580,6 @@ Qt::TransformationMode QPixmapBlurFilter::quality() const
}
/*!
- \reimp
-
\internal
*/
QRectF QPixmapBlurFilter::boundingRectFor(const QRectF &rect) const
@@ -657,8 +655,6 @@ static QImage blurred(const QImage& image, const QRect& rect, int radius)
}
/*!
- \reimp
-
\internal
*/
void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap &src, const QRectF &srcRect) const
diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp
index 27888ac..992bc78 100644
--- a/src/gui/inputmethod/qinputcontext.cpp
+++ b/src/gui/inputmethod/qinputcontext.cpp
@@ -156,16 +156,17 @@ QInputContext::~QInputContext()
}
/*!
- \internal
Returns the widget that has an input focus for this input
- context. Ordinary input methods should not call this function
- directly to keep platform independence and flexible configuration
- possibility.
+ context.
The return value may differ from holderWidget() if the input
context is shared between several text widgets.
- \sa setFocusWidget(), holderWidget()
+ \warning To ensure platform independence and support flexible
+ configuration of widgets, ordinary input methods should not call
+ this function directly.
+
+ \sa setFocusWidget()
*/
QWidget *QInputContext::focusWidget() const
{
@@ -175,9 +176,9 @@ QWidget *QInputContext::focusWidget() const
/*!
- \internal
- Sets the widget that has an input focus for this input
- context. Ordinary input methods must not call this function
+ Sets the widget that has an input focus for this input context.
+
+ \warning Ordinary input methods must not call this function
directly.
\sa focusWidget()
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/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index d93fa2f..443a118 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -59,6 +59,7 @@ QT_FORWARD_DECLARE_CLASS(QWidgetPrivate);
QT_FORWARD_DECLARE_CLASS(QWidget);
QT_FORWARD_DECLARE_CLASS(QEvent);
QT_FORWARD_DECLARE_CLASS(QCocoaDropData);
+QT_FORWARD_DECLARE_CLASS(QString);
QT_FORWARD_DECLARE_CLASS(QStringList);
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp
index 9e8de67..2e9514d 100644
--- a/src/gui/kernel/qmime_mac.cpp
+++ b/src/gui/kernel/qmime_mac.cpp
@@ -68,6 +68,12 @@
#include "qmap.h"
#include <private/qt_mac_p.h>
+
+#ifdef Q_WS_MAC32
+#include <QuickTime/QuickTime.h>
+#include <qlibrary.h>
+#endif
+
QT_BEGIN_NAMESPACE
extern CGImageRef qt_mac_createCGImageFromQImage(const QImage &img, const QImage **imagePtr = 0); // qpaintengine_mac.cpp
@@ -503,9 +509,6 @@ QList<QByteArray> QMacPasteboardMimeHTMLText::convertFromMime(const QString &mim
// This can be removed once 10.6 is the minimum (or we have to require 64-bit) whichever comes first.
-#include <QuickTime/QuickTime.h>
-#include <qlibrary.h>
-
typedef ComponentResult (*PtrGraphicsImportSetDataHandle)(GraphicsImportComponent, Handle);
typedef ComponentResult (*PtrGraphicsImportCreateCGImage)(GraphicsImportComponent, CGImageRef*, UInt32);
typedef ComponentResult (*PtrGraphicsExportSetInputCGImage)(GraphicsExportComponent, CGImageRef);
@@ -636,7 +639,9 @@ QList<QByteArray> QMacPasteboardMimePict::convertFromMime(const QString &mime, Q
DisposeHandle(pic);
return ret;
}
-#endif
+
+
+#endif //Q_WS_MAC32
class QMacPasteboardMimeTiff : public QMacPasteboardMime {
public:
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/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 7acb3a6..da71ced 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -214,6 +214,7 @@ enum PseudoElement {
PseudoElement_ViewItemText,
PseudoElement_ViewItemIndicator,
PseudoElement_ScrollAreaCorner,
+ PseudoElement_TabBarTabCloseButton,
NumPseudoElements
};
@@ -223,7 +224,7 @@ struct PseudoElementInfo {
};
static const PseudoElementInfo knownPseudoElements[NumPseudoElements] = {
- { QStyle::SC_None, "", },
+ { QStyle::SC_None, "" },
{ QStyle::SC_None, "down-arrow" },
{ QStyle::SC_None, "up-arrow" },
{ QStyle::SC_None, "left-arrow" },
@@ -300,8 +301,9 @@ static const PseudoElementInfo knownPseudoElements[NumPseudoElements] = {
{ QStyle::SC_None, "item" },
{ QStyle::SC_None, "icon" },
{ QStyle::SC_None, "text" },
- { QStyle::SC_None, "indicator" } ,
- { QStyle::SC_None, "corner" }
+ { QStyle::SC_None, "indicator" },
+ { QStyle::SC_None, "corner" },
+ { QStyle::SC_None, "close-button" },
};
@@ -4370,6 +4372,12 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
case PE_IndicatorSpinPlus:
pseudoElement = PseudoElement_SpinBoxUpArrow;
break;
+#ifndef QT_NO_TABBAR
+ case PE_IndicatorTabClose:
+ if (w)
+ w = w->parentWidget(); //match on the QTabBar instead of the CloseButton
+ pseudoElement = PseudoElement_TabBarTabCloseButton;
+#endif
default:
break;
@@ -5104,6 +5112,18 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi
#endif // QT_NO_TABWIDGET
s = QLatin1String("alignment");
break;
+#ifndef QT_NO_TABBAR
+ case SH_TabBar_CloseButtonPosition:
+ rule = renderRule(w, opt, PseudoElement_TabBarTabCloseButton);
+ if (rule.hasPosition()) {
+ Qt::Alignment align = rule.position()->position;
+ if (align & Qt::AlignLeft || align & Qt::AlignTop)
+ return QTabBar::LeftSide;
+ if (align & Qt::AlignRight || align & Qt::AlignBottom)
+ return QTabBar::RightSide;
+ }
+ break;
+#endif
case SH_TabBar_ElideMode: s = QLatin1String("tabbar-elide-mode"); break;
case SH_TabBar_PreferNoArrows: s = QLatin1String("tabbar-prefer-no-arrows"); break;
case SH_ComboBox_PopupFrameStyle:
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 058041b..fe90010 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -126,8 +126,13 @@ QFontDatabaseS60StoreImplementation::QFontDatabaseS60StoreImplementation()
}
QFontDatabaseS60StoreImplementation::~QFontDatabaseS60StoreImplementation()
{
- qDeleteAll(m_extensions);
- // TODO m_store cleanup removed because it was crashing
+ typedef QHash<QString, const QFontEngineS60Extensions *>::iterator iterator;
+ for (iterator p = m_extensions.begin(); p != m_extensions.end(); ++p) {
+ m_store->ReleaseFont((*p)->fontOwner());
+ delete *p;
+ }
+
+ delete m_store;
m_heap->Close();
}
@@ -140,7 +145,7 @@ const QFontEngineS60Extensions *QFontDatabaseS60StoreImplementation::extension(c
const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, spec);
Q_ASSERT(err == KErrNone && font);
CBitmapFont *bitmapFont = static_cast<CBitmapFont*>(font);
- m_extensions.insert(typeface, new QFontEngineS60Extensions(bitmapFont->OpenFont()));
+ m_extensions.insert(typeface, new QFontEngineS60Extensions(font, bitmapFont->OpenFont()));
}
return m_extensions.value(typeface);
}
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index eba21e8..ed6b1c1 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -54,10 +54,11 @@
QT_BEGIN_NAMESPACE
-QFontEngineS60Extensions::QFontEngineS60Extensions(COpenFont *font)
+QFontEngineS60Extensions::QFontEngineS60Extensions(CFont* fontOwner, COpenFont *font)
: m_font(font)
, m_cmap(0)
, m_symbolCMap(false)
+ , m_fontOwner(fontOwner)
{
TAny *shapingExtension = NULL;
m_font->ExtendedInterface(KUidOpenFontShapingExtension, shapingExtension);
@@ -109,6 +110,12 @@ QPainterPath QFontEngineS60Extensions::glyphOutline(glyph_t glyph) const
return result;
}
+CFont *QFontEngineS60Extensions::fontOwner() const
+{
+ return m_fontOwner;
+}
+
+
// duplicated from qfontengine_xyz.cpp
static inline unsigned int getChar(const QChar *str, int &i, const int len)
{
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index 0c1be8c..bbbc3d6 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -69,11 +69,12 @@ QT_BEGIN_NAMESPACE
class QFontEngineS60Extensions
{
public:
- QFontEngineS60Extensions(COpenFont *font);
+ QFontEngineS60Extensions(CFont* fontOwner, COpenFont *font);
QByteArray getSfntTable(uint tag) const;
const unsigned char *cmap() const;
QPainterPath glyphOutline(glyph_t glyph) const;
+ CFont *fontOwner() const;
private:
COpenFont *m_font;
@@ -82,6 +83,7 @@ private:
mutable const unsigned char *m_cmap;
mutable bool m_symbolCMap;
mutable QByteArray m_cmapTable;
+ CFont* m_fontOwner;
};
class QFontEngineS60 : public QFontEngine
diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac.mm b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
index 3b58a4e..2ef0ead 100644
--- a/src/gui/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
@@ -100,7 +100,8 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
{
Q_UNUSED(flag);
Q_UNUSED(nstoolbar);
- QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString(itemIdentifier));
+ QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(
+ QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(itemIdentifier));
NSToolbarItem *item = nil;
if (tb) {
item = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier];
@@ -112,7 +113,8 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
- (void)toolbarWillAddItem:(NSNotification *)notification
{
NSToolbarItem *item = [[notification userInfo] valueForKey:@"item"];
- QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString([item itemIdentifier]));
+ QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(
+ QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)([item itemIdentifier]));
if (!tb)
return; // I can't really do anything about this.
[item retain];
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index d3d57d4..ea2018d 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -514,8 +514,11 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
chunkedTransferEncoding = headerField("transfer-encoding").toLower().contains("chunked");
// cache isConnectionCloseEnabled since it is called often
- connectionCloseEnabled = (headerField("connection").toLower().contains("close") ||
- headerField("proxy-connection").toLower().contains("close"));
+ QByteArray connectionHeaderField = headerField("connection");
+ // check for explicit indication of close or the implicit connection close of HTTP/1.0
+ connectionCloseEnabled = (connectionHeaderField.toLower().contains("close") ||
+ headerField("proxy-connection").toLower().contains("close")) ||
+ (majorVersion == 1 && minorVersion == 0 && connectionHeaderField.isEmpty());
}
return bytes;
}
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/opengl/qgl.h b/src/opengl/qgl.h
index a928d64..13ad668 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -300,7 +300,7 @@ public:
DefaultBindOption = LinearFilteringBindOption | InvertedYBindOption | MipmapBindOption,
InternalBindOption = MemoryManagedBindOption | PremultipliedAlphaBindOption
};
- Q_DECLARE_FLAGS(BindOptions, BindOption);
+ Q_DECLARE_FLAGS(BindOptions, BindOption)
GLuint bindTexture(const QImage &image, GLenum target, GLint format,
BindOptions options);
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 8ce50cf..b07fb3b 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -441,6 +441,16 @@ static const char qualifierDefines[] =
"#define highp\n";
#endif
+// The "highp" qualifier doesn't exist in fragment shaders
+// on all ES platforms. When it doesn't exist, use "mediump".
+#ifdef QT_OPENGL_ES
+#define QGL_REDEFINE_HIGHP 1
+static const char redefineHighp[] =
+ "#ifndef GL_FRAGMENT_PRECISION_HIGH\n"
+ "#define highp mediump\n"
+ "#endif\n";
+#endif
+
/*!
Sets the \a source code for this shader and compiles it.
Returns true if the source was successfully compiled, false otherwise.
@@ -463,6 +473,11 @@ bool QGLShader::compile(const char *source)
#ifdef QGL_DEFINE_QUALIFIERS
src.append(qualifierDefines);
#endif
+#ifdef QGL_REDEFINE_HIGHP
+ if (d->shaderType == FragmentShader ||
+ d->shaderType == PartialFragmentShader)
+ src.append(redefineHighp);
+#endif
src.append(source);
glShaderSource(d->shader, src.size(), src.data(), 0);
return d->compile(this);
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 4f95ef3..d747679 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -73,7 +73,7 @@ public:
PartialVertexShader = PartialShader | VertexShader,
PartialFragmentShader = PartialShader | FragmentShader
};
- Q_DECLARE_FLAGS(ShaderType, ShaderTypeBits);
+ Q_DECLARE_FLAGS(ShaderType, ShaderTypeBits)
explicit QGLShader(QGLShader::ShaderType type, QObject *parent = 0);
QGLShader(const QString& fileName, QGLShader::ShaderType type, QObject *parent = 0);
@@ -108,7 +108,7 @@ private:
Q_DISABLE_COPY(QGLShader)
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QGLShader::ShaderType);
+Q_DECLARE_OPERATORS_FOR_FLAGS(QGLShader::ShaderType)
class QGLShaderProgramPrivate;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 1bf74d4..4542051 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1509,10 +1509,10 @@ bool QDirectFBScreen::initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *d
return true;
}
-uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, uint flags, int *bpl)
+uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl)
{
void *mem;
- const DFBResult result = surface->Lock(surface, static_cast<DFBSurfaceLockFlags>(flags), static_cast<void**>(&mem), bpl);
+ const DFBResult result = surface->Lock(surface, flags, &mem, bpl);
if (result != DFB_OK) {
DirectFBError("QDirectFBScreen::lockSurface()", result);
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index 8af4e0f..4b6c01f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -210,7 +210,7 @@ public:
const QImage &image);
#endif
- static uchar *lockSurface(IDirectFBSurface *surface, uint flags, int *bpl = 0);
+ static uchar *lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl = 0);
#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
void setDirectFBImageProvider(IDirectFBImageProvider *provider);
#endif
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
index dafc478..f8c0aae 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
@@ -95,9 +95,7 @@ private:
void createWindow();
IDirectFBWindow *dfbWindow;
QDirectFBWindowSurface *sibling;
-#endif
-
-#ifdef QT_NO_DIRECTFB_WM
+#else
enum Mode {
Primary,
Offscreen
diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp
index fab1237..e8f4a27 100644
--- a/src/plugins/s60/src/qdesktopservices_3_2.cpp
+++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp
@@ -50,6 +50,7 @@
EXPORT_C QString localizedDirectoryName(QString& rawPath)
{
QString ret;
+ std::exception dummy; // voodoo fix for "Undefined symbol typeinfo for std::exception" in armv5 build
TRAPD(err,
QT_TRYCATCH_LEAVING(
diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/s60installs.pro
index f24a03f..0314958 100644
--- a/src/s60installs/qt_libs.pro
+++ b/src/s60installs/s60installs.pro
@@ -5,7 +5,8 @@ symbian: {
load(data_caging_paths)
SUBDIRS=
- TARGET = "QtLibs pre-release"
+ # WARNING: Changing TARGET name will break Symbian SISX upgrade functionality
+ TARGET = "Qt for S60"
TARGET.UID3 = 0x2001E61C
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
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)
{
diff --git a/src/src.pro b/src/src.pro
index feb6a9c..1801d55 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -6,8 +6,7 @@ win32:SRC_SUBDIRS += src_winmain
wince*:{
SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib
} else:symbian {
- SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib
- SRC_SUBDIRS += $$QT_SOURCE_TREE/src/s60installs/qt_libs.pro
+ SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs
} else {
SRC_SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_network src_gui src_sql src_testlib
!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support
@@ -37,6 +36,8 @@ SRC_SUBDIRS += src_plugins
src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main
src_s60main.target = sub-s60main
+src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs
+src_s60installs.target = sub-s60installs
src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain
src_winmain.target = sub-winmain
src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap