summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-15 13:15:13 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-15 13:15:13 (GMT)
commitb5b3e65f6e0392239621a3888d9aa58746f3899e (patch)
tree5c33473950b22db0a0eb9c230005cd8e7f251538 /src
parentcace8e6a9f00ee478dfe63a7fa6959056cfe7e8a (diff)
parent0c6780c39d18a4fd06b9bed94400de365a518c45 (diff)
downloadQt-b5b3e65f6e0392239621a3888d9aa58746f3899e.zip
Qt-b5b3e65f6e0392239621a3888d9aa58746f3899e.tar.gz
Qt-b5b3e65f6e0392239621a3888d9aa58746f3899e.tar.bz2
Merge branch '4.7' into qdoc-simplified
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h2
-rw-r--r--src/3rdparty/phonon/mmf/audioequalizer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/environmentalreverb.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/loudness.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/stereowidening.cpp2
-rw-r--r--src/corelib/global/qendian.h5
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp52
-rw-r--r--src/corelib/tools/qsimd.cpp14
-rw-r--r--src/declarative/declarative.pro1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp14
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp36
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp28
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp27
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeinclude.cpp24
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp53
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp19
-rw-r--r--src/declarative/qml/qdeclarativesqldatabase.cpp26
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp4
-rw-r--r--src/gui/dialogs/dialogs.pri2
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm8
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp18
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h2
-rw-r--r--src/gui/image/qimage.cpp25
-rw-r--r--src/gui/image/qpixmap_raster.cpp11
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp8
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp4
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h2
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm3
-rw-r--r--src/gui/kernel/qeventdispatcher_s60_p.h7
-rw-r--r--src/gui/kernel/qwidget_mac.mm16
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_p.h4
-rw-r--r--src/gui/painting/qgrayraster.c36
-rw-r--r--src/gui/painting/qpathclipper.cpp14
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp130
-rw-r--r--src/gui/text/qfontengine_s60.cpp182
-rw-r--r--src/gui/text/qfontengine_s60_p.h16
-rw-r--r--src/gui/text/qtextdocument.cpp6
-rw-r--r--src/gui/widgets/qcombobox.cpp2
-rw-r--r--src/gui/widgets/qlabel.cpp2
-rw-r--r--src/gui/widgets/qlinecontrol.cpp9
-rw-r--r--src/gui/widgets/qlinecontrol_p.h1
-rw-r--r--src/gui/widgets/qmenu.cpp5
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp4
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp80
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp19
-rw-r--r--src/opengl/qwindowsurface_gl.cpp13
-rw-r--r--src/openvg/qpaintengine_vg.cpp3
-rw-r--r--src/plugins/bearer/icd/proxyconf.cpp4
-rw-r--r--src/plugins/graphicssystems/meego/dithering.cpp11
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp9
-rw-r--r--src/plugins/phonon/mmf/mmf.pro4
-rw-r--r--src/s60installs/bwins/QtGuiu.def7
-rw-r--r--src/s60installs/eabi/QtGuiu.def7
-rw-r--r--src/s60installs/s60installs.pro2
71 files changed, 690 insertions, 372 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index 8879636..70adcf6 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -21,7 +21,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QScopedPointer>
-#include <audioeffectbase.h>
+#include <AudioEffectBase.h>
#include <phonon/effectinterface.h>
diff --git a/src/3rdparty/phonon/mmf/audioequalizer.cpp b/src/3rdparty/phonon/mmf/audioequalizer.cpp
index 28433f6..1d2bbd4 100644
--- a/src/3rdparty/phonon/mmf/audioequalizer.cpp
+++ b/src/3rdparty/phonon/mmf/audioequalizer.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <audioequalizerbase.h>
+#include <AudioEqualizerBase.h>
#include "audioequalizer.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/bassboost.cpp b/src/3rdparty/phonon/mmf/bassboost.cpp
index 81d9208..67076f6 100644
--- a/src/3rdparty/phonon/mmf/bassboost.cpp
+++ b/src/3rdparty/phonon/mmf/bassboost.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <bassboostbase.h>
+#include <BassBoostBase.h>
#include "bassboost.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
index c500385..d4f5223 100644
--- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp
+++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <environmentalreverbbase.h>
+#include <EnvironmentalReverbBase.h>
#include "environmentalreverb.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/loudness.cpp b/src/3rdparty/phonon/mmf/loudness.cpp
index 22d7518..ca05ab0 100644
--- a/src/3rdparty/phonon/mmf/loudness.cpp
+++ b/src/3rdparty/phonon/mmf/loudness.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <loudnessbase.h>
+#include <LoudnessBase.h>
#include "loudness.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/stereowidening.cpp b/src/3rdparty/phonon/mmf/stereowidening.cpp
index e452160..f90651b 100644
--- a/src/3rdparty/phonon/mmf/stereowidening.cpp
+++ b/src/3rdparty/phonon/mmf/stereowidening.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stereowideningbase.h>
+#include <StereoWideningBase.h>
#include "stereowidening.h"
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index d53504a..08415bf 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -44,9 +44,8 @@
#include <QtCore/qglobal.h>
-#ifdef Q_OS_LINUX
-# include <features.h>
-#endif
+// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
+#include <stdlib.h>
#ifdef __GLIBC__
#include <byteswap.h>
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index bcf4477..bf675a7 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -77,10 +77,14 @@ Q_DESTRUCTOR_FUNCTION(timerIdsDestructorFunction)
static QBasicAtomicInt nextFreeTimerId = Q_BASIC_ATOMIC_INITIALIZER(1);
+static const int TimerIdMask = 0x00ffffff;
+static const int TimerSerialMask = ~TimerIdMask & ~0x80000000;
+static const int TimerSerialCounter = TimerIdMask + 1;
+
// avoid the ABA-problem by using 7 of the top 8 bits of the timerId as a serial number
static inline int prepareNewValueWithSerialNumber(int oldId, int newId)
{
- return (newId & 0x00FFFFFF) | ((oldId + 0x01000000) & 0x7f000000);
+ return (newId & TimerIdMask) | ((oldId + TimerSerialCounter) & TimerSerialMask);
}
static inline int bucketOffset(int timerId)
@@ -120,17 +124,32 @@ void QAbstractEventDispatcherPrivate::init()
}
}
+// Timer IDs are implemented using a free-list;
+// there's a vector initialized with:
+// X[i] = i + 1
+// and nextFreeTimerId starts with 1.
+//
+// Allocating a timer ID involves taking the ID from
+// X[nextFreeTimerId]
+// updating nextFreeTimerId to this value and returning the old value
+//
+// When the timer ID is allocated, its cell in the vector is unused (it's a
+// free list). As an added protection, we use the cell to store an invalid
+// (negative) value that we can later check for integrity.
+//
+// (continues below).
int QAbstractEventDispatcherPrivate::allocateTimerId()
{
int timerId, newTimerId;
+ int at, *b;
do {
- timerId = nextFreeTimerId;
+ timerId = nextFreeTimerId; //.loadAcquire(); // ### FIXME Proper memory ordering semantics
// which bucket are we looking in?
- int which = timerId & 0x00ffffff;
+ int which = timerId & TimerIdMask;
int bucket = bucketOffset(which);
- int at = bucketIndex(bucket, which);
- int *b = timerIds[bucket];
+ at = bucketIndex(bucket, which);
+ b = timerIds[bucket];
if (!b) {
// allocate a new bucket
@@ -142,23 +161,38 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
}
}
- newTimerId = b[at];
+ newTimerId = prepareNewValueWithSerialNumber(timerId, b[at]);
} while (!nextFreeTimerId.testAndSetRelaxed(timerId, newTimerId));
+ b[at] = -timerId;
+
return timerId;
}
+// Releasing a timer ID requires putting the current ID back in the vector;
+// we do it by setting:
+// X[timerId] = nextFreeTimerId;
+// then we update nextFreeTimerId to the timer we've just released
+//
+// The extra code in allocateTimerId and releaseTimerId are ABA prevention
+// and bucket memory. The buckets are simply to make sure we allocate only
+// the necessary number of timers. See above.
+//
+// ABA prevention simply adds a value to 7 of the top 8 bits when resetting
+// nextFreeTimerId.
void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
{
- int which = timerId & 0x00ffffff;
+ int which = timerId & TimerIdMask;
int bucket = bucketOffset(which);
int at = bucketIndex(bucket, which);
int *b = timerIds[bucket];
+ Q_ASSERT(b[at] == -timerId);
+
int freeId, newTimerId;
do {
- freeId = nextFreeTimerId;
- b[at] = freeId & 0x00ffffff;
+ freeId = nextFreeTimerId;//.loadAcquire(); // ### FIXME Proper memory ordering semantics
+ b[at] = freeId & TimerIdMask;
newTimerId = prepareNewValueWithSerialNumber(freeId, timerId);
} while (!nextFreeTimerId.testAndSetRelease(freeId, newTimerId));
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 63ebafb..bc5e9e4 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -285,7 +285,13 @@ static inline uint detectProcessorFeatures()
uint features = MMX|SSE|SSE2|CMOV;
uint feature_result = 0;
-#if defined(Q_CC_GNU)
+#if defined (Q_OS_WIN64)
+ {
+ int info[4];
+ __cpuid(info, 1);
+ feature_result = info[2];
+ }
+#elif defined(Q_CC_GNU)
quint64 tmp;
asm ("xchg %%rbx, %1\n"
"cpuid\n"
@@ -294,12 +300,6 @@ static inline uint detectProcessorFeatures()
: "a" (1)
: "%edx"
);
-#elif defined (Q_OS_WIN64)
- {
- int info[4];
- __cpuid(info, 1);
- feature_result = info[2];
- }
#endif
if (feature_result & (1u))
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
index 93ad861..1ad888b 100644
--- a/src/declarative/declarative.pro
+++ b/src/declarative/declarative.pro
@@ -2,7 +2,6 @@ TARGET = QtDeclarative
QPRO_PWD = $$PWD
QT = core gui script network
contains(QT_CONFIG, svg): QT += svg
-contains(QT_CONFIG, opengl): QT += opengl
DEFINES += QT_BUILD_DECLARATIVE_LIB QT_NO_URL_CAST_FROM_STRING
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index cd770d4..7ebed2f 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -700,8 +700,8 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
bool rejectY = false;
bool rejectX = false;
- bool stealY = false;
- bool stealX = false;
+ bool stealY = stealMouse;
+ bool stealX = stealMouse;
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 264f12c..bb5b68b 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -735,7 +735,7 @@ void QDeclarativeGridViewPrivate::createHighlight()
QDeclarative_setParent_noEvent(item, q->contentItem());
item->setParentItem(q->contentItem());
highlight = new FxGridItem(item, q);
- if (currentItem)
+ if (currentItem && autoHighlight)
highlight->setPosition(currentItem->colPos(), currentItem->rowPos());
highlightXAnimator = new QSmoothedAnimation(q);
highlightXAnimator->target = QDeclarativeProperty(highlight->item, QLatin1String("x"));
@@ -1253,7 +1253,8 @@ void QDeclarativeGridView::setModel(const QVariant &model)
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
d->updateTrackedItem();
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
@@ -1321,7 +1322,8 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
d->updateTrackedItem();
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
@@ -2241,7 +2243,8 @@ void QDeclarativeGridView::componentComplete()
else
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
d->updateTrackedItem();
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
@@ -2649,7 +2652,8 @@ void QDeclarativeGridView::modelReset()
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->colPos(), d->currentItem->rowPos());
d->updateTrackedItem();
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 11286b0..24d9b03 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -1831,9 +1831,9 @@ void QDeclarativeItem::setClip(bool c)
/*!
\qmlproperty real Item::z
- Sets the stacking order of the item. By default the stacking order is 0.
+ Sets the stacking order of sibling items. By default the stacking order is 0.
- Items with a higher stacking value are drawn on top of items with a
+ Items with a higher stacking value are drawn on top of siblings with a
lower stacking order. Items with the same stacking value are drawn
bottom up in the order they appear. Items with a negative stacking
value are drawn under their parent's content.
@@ -2134,6 +2134,8 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
Margins apply to top, bottom, left, right, and fill anchors.
The \c anchors.margins property can be used to set all of the various margins at once, to the same value.
+ Note that margins are anchor-specific and are not applied if an item does not
+ use anchors.
Offsets apply for horizontal center, vertical center, and baseline anchors.
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index d8635b9..a36ee34 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -126,7 +126,7 @@ public:
widthValid(false), heightValid(false),
componentComplete(true), keepMouse(false),
smooth(false), transformOriginDirty(true), doneEventPreHandler(false), keyHandler(0),
- mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
+ mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0), hadSubFocusItem(false)
{
QGraphicsItemPrivate::acceptedMouseButtons = 0;
isDeclarativeItem = 1;
@@ -275,6 +275,8 @@ public:
qreal implicitWidth;
qreal implicitHeight;
+ bool hadSubFocusItem;
+
QPointF computeTransformOrigin() const;
virtual void setPosHelper(const QPointF &pos)
@@ -288,9 +290,11 @@ public:
// Reimplemented from QGraphicsItemPrivate
virtual void subFocusItemChange()
{
- if (flags & QGraphicsItem::ItemIsFocusScope || !parent)
- emit q_func()->activeFocusChanged(subFocusItem != 0);
+ bool hasSubFocusItem = subFocusItem != 0;
+ if (((flags & QGraphicsItem::ItemIsFocusScope) || !parent) && hasSubFocusItem != hadSubFocusItem)
+ emit q_func()->activeFocusChanged(hasSubFocusItem);
//see also QDeclarativeItemPrivate::focusChanged
+ hadSubFocusItem = hasSubFocusItem;
}
// Reimplemented from QGraphicsItemPrivate
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 845da79..2a7f508 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -265,6 +265,8 @@ public:
}
}
pos = (*(--visibleItems.constEnd()))->endPosition() + invisibleCount * (averageSize + spacing);
+ } else if (model && model->count()) {
+ pos = model->count() * averageSize + (model->count()-1) * spacing;
}
return pos;
}
@@ -739,16 +741,20 @@ void QDeclarativeListViewPrivate::layout()
return;
}
if (!visibleItems.isEmpty()) {
- qreal oldEnd = visibleItems.last()->endPosition();
+ bool fixedCurrent = currentItem && visibleItems.first()->item == currentItem->item;
+ qreal sum = visibleItems.first()->size();
qreal pos = visibleItems.first()->position() + visibleItems.first()->size() + spacing;
for (int i=1; i < visibleItems.count(); ++i) {
FxListItem *item = visibleItems.at(i);
item->setPosition(pos);
pos += item->size() + spacing;
+ sum += item->size();
+ fixedCurrent = fixedCurrent || (currentItem && item->item == currentItem->item);
}
- // move current item if it is after the visible items.
- if (currentItem && currentIndex > lastVisibleIndex())
- currentItem->setPosition(currentItem->position() + (visibleItems.last()->endPosition() - oldEnd));
+ averageSize = qRound(sum / visibleItems.count());
+ // move current item if it is not a visible item.
+ if (currentIndex >= 0 && currentItem && !fixedCurrent)
+ currentItem->setPosition(positionAt(currentIndex));
}
q->refill();
minExtentDirty = true;
@@ -1046,6 +1052,8 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
// This is slightly sub-optimal, but section heading caching minimizes the impact.
if (currentItem->section)
currentItem->section->setVisible(false);
+ if (visibleItems.isEmpty())
+ averageSize = currentItem->size();
}
updateHighlight();
emit q->currentIndexChanged();
@@ -1567,10 +1575,12 @@ void QDeclarativeListView::setModel(const QVariant &model)
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->position());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->position());
d->updateTrackedItem();
}
}
+ d->updateViewport();
}
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
@@ -1638,9 +1648,11 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->position());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->position());
d->updateTrackedItem();
}
+ d->updateViewport();
}
}
emit delegateChanged();
@@ -2628,8 +2640,10 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode)
cancelFlick();
d->setPosition(pos);
if (d->highlight) {
- d->highlight->setPosition(d->currentItem->itemPosition());
- d->highlight->setSize(d->currentItem->itemSize());
+ if (d->autoHighlight) {
+ d->highlight->setPosition(d->currentItem->itemPosition());
+ d->highlight->setSize(d->currentItem->itemSize());
+ }
d->updateHighlight();
}
}
@@ -2675,7 +2689,8 @@ void QDeclarativeListView::componentComplete()
else
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->position());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->position());
d->updateTrackedItem();
}
d->moveReason = QDeclarativeListViewPrivate::Other;
@@ -3138,7 +3153,8 @@ void QDeclarativeListView::modelReset()
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
if (d->highlight && d->currentItem) {
- d->highlight->setPosition(d->currentItem->position());
+ if (d->autoHighlight)
+ d->highlight->setPosition(d->currentItem->position());
d->updateTrackedItem();
}
d->moveReason = QDeclarativeListViewPrivate::Other;
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 7c79afe..87ea214 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1478,7 +1478,7 @@ void QDeclarativePathView::itemsRemoved(int modelIndex, int count)
currentChanged = true;
} else if (d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count) {
// current item has been removed.
- d->currentIndex = qMin(modelIndex, d->modelCount-1);
+ d->currentIndex = qMin(modelIndex, d->modelCount-count-1);
if (d->currentItem) {
if (QDeclarativePathViewAttached *att = d->attached(d->currentItem))
att->setIsCurrentItem(true);
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index f8421a3..df103de 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1479,6 +1479,7 @@ void QDeclarativeTextInput::cursorPosChanged()
updateRect();//TODO: Only update rect between pos's
updateMicroFocus();
emit cursorPositionChanged();
+ d->control->resetCursorBlinkTimer();
if(!d->control->hasSelectedText()){
if(d->lastSelectionStart != d->control->cursor()){
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 4fe6c4c..4f5213a 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -1367,7 +1367,7 @@ void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent,
Q_D(QDeclarativeVisualDataModel);
const int count = sourceEnd - sourceStart + 1;
if (destinationParent == d->m_root && sourceParent == d->m_root) {
- _q_itemsMoved(sourceStart, destinationRow, count);
+ _q_itemsMoved(sourceStart, sourceStart > destinationRow ? destinationRow : destinationRow-1, count);
} else if (sourceParent == d->m_root) {
_q_itemsRemoved(sourceStart, count);
} else if (destinationParent == d->m_root) {
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 63bde0f..77fc925 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -147,32 +147,36 @@ class QByteArray;
Components are reusable, encapsulated QML elements with well-defined interfaces.
Components are often defined by \l {qdeclarativedocuments.html}{component files} -
- that is, \c .qml files. The \e Component element allows components to be defined
- within QML items rather than in a separate file. This may be useful for reusing
- a small component within a QML file, or for defining a component that logically
- belongs with other QML components within a file.
+ that is, \c .qml files. The \e Component element essentially allows QML components
+ to be defined inline, within a \l {QML Document}{QML document}, rather than as a separate QML file.
+ This may be useful for reusing a small component within a QML file, or for defining
+ a component that logically belongs with other QML components within a file.
For example, here is a component that is used by multiple \l Loader objects.
- It contains a top level \l Rectangle item:
+ It contains a single item, a \l Rectangle:
\snippet doc/src/snippets/declarative/component.qml 0
Notice that while a \l Rectangle by itself would be automatically
rendered and displayed, this is not the case for the above rectangle
because it is defined inside a \c Component. The component encapsulates the
- QML elements within, as if they were defined in a separate \c .qml
+ QML elements within, as if they were defined in a separate QML
file, and is not loaded until requested (in this case, by the
two \l Loader objects).
- A Component cannot contain anything other
- than an \c id and a single top level item. While the \c id is optional,
- the top level item is not; you cannot define an empty component.
+ Defining a \c Component is similar to defining a \l {QML Document}{QML document}.
+ A QML document has a single top-level item that defines the behaviors and
+ properties of that component, and cannot define properties or behaviors outside
+ of that top-level item. In the same way, a \c Component definition contains a single
+ top level item (which in the above example is a \l Rectangle) and cannot define any
+ data outside of this item, with the exception of an \e id (which in the above example
+ is \e redSquare).
- The Component element is commonly used to provide graphical components
- for views. For example, the ListView::delegate property requires a Component
+ The \c Component element is commonly used to provide graphical components
+ for views. For example, the ListView::delegate property requires a \c Component
to specify how each list item is to be displayed.
- Component objects can also be dynamically created using
+ \c Component objects can also be created dynamically using
\l{QML:Qt::createComponent()}{Qt.createComponent()}.
*/
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index a8404f0..201e675 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -261,6 +261,33 @@ of their use.
\endlist
*/
+/*!
+\qmlmethod object Qt::include(string url, jsobject callback)
+
+Includes another JavaScript file. This method can only be used from within JavaScript files,
+and not regular QML files.
+
+This imports all functions from \a url into the current script's namespace.
+
+Qt.include() returns an object that describes the status of the operation. The object has
+a single property, \c {status}, that is set to one of the following values:
+
+\table
+\header \o Symbol \o Value \o Description
+\row \o result.OK \o 0 \o The include completed successfully.
+\row \o result.LOADING \o 1 \o Data is being loaded from the network.
+\row \o result.NETWORK_ERROR \o 2 \o A network error occurred while fetching the url.
+\row \o result.EXCEPTION \o 3 \o A JavaScript exception occurred while executing the included code.
+An additional \c exception property will be set in this case.
+\endtable
+
+The \c status property will be updated as the operation progresses.
+
+If provided, \a callback is invoked when the operation completes. The callback is passed
+the same object as is returned from the Qt.include() call.
+*/
+// Qt.include() is implemented in qdeclarativeinclude.cpp
+
QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
: captureProperties(false), rootContext(0), isDebugging(false),
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index acc13de..94765f2 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -382,7 +382,13 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath
foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser.plugins()) {
QString resolvedFilePath = database->resolvePlugin(dir, plugin.path, plugin.name);
-
+#if defined(QT_LIBINFIX) && defined(Q_OS_SYMBIAN)
+ if (resolvedFilePath.isEmpty()) {
+ // In case of libinfixed build, attempt to load libinfixed version, too.
+ QString infixedPluginName = plugin.name + QLatin1String(QT_LIBINFIX);
+ resolvedFilePath = database->resolvePlugin(dir, plugin.path, infixedPluginName);
+ }
+#endif
if (!resolvedFilePath.isEmpty()) {
if (!database->importPlugin(resolvedFilePath, uri, errorString)) {
if (errorString)
diff --git a/src/declarative/qml/qdeclarativeinclude.cpp b/src/declarative/qml/qdeclarativeinclude.cpp
index 1e240d7..a9ecdda 100644
--- a/src/declarative/qml/qdeclarativeinclude.cpp
+++ b/src/declarative/qml/qdeclarativeinclude.cpp
@@ -172,28 +172,8 @@ void QDeclarativeInclude::callback(QScriptEngine *engine, QScriptValue &callback
}
}
-/*!
-\qmlmethod object Qt::include(string url, jsobject callback)
-
-Include another JavaScript file. This method can only be used from within JavaScript files,
-and not regular QML files.
-
-Qt.include() returns an object that describes the status of the operation. The object has
-a single property, \c {status} that is set to one of the following values:
-
-\table
-\header \o Symbol \o Value \o Description
-\row \o result.OK \o 0 \o The include completed successfully.
-\row \o result.LOADING \o 1 \o Data is being loaded from the network.
-\row \o result.NETWORK_ERROR \o 2 \o A network error occurred while fetching the url.
-\row \o result.EXCEPTION \o 3 \o A JavaScript exception occurred while executing the included code.
-An additional \c exception property will be set in this case.
-\endtable
-
-The return object's properties will be updated as the operation progresses.
-
-If provided, \a callback is invoked when the operation completes. The callback is passed
-the same object as is returned from the Qt.include() call.
+/*
+ Documented in qdeclarativeengine.cpp
*/
QScriptValue QDeclarativeInclude::include(QScriptContext *ctxt, QScriptEngine *engine)
{
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
index d22798d..36e9721 100644
--- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
@@ -46,27 +46,44 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeNetworkAccessManagerFactory
\since 4.7
- \brief The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager for use by a Qt Declarative engine.
+ \brief The QDeclarativeNetworkAccessManagerFactory class creates QNetworkAccessManager instances for a QML engine.
- QNetworkAccessManager is used for all network access by QML.
- By implementing a factory it is possible to create custom
- QNetworkAccessManager with specialized caching, proxy and
- cookie support.
+ A QML engine uses QNetworkAccessManager for all network access.
+ By implementing a factory, it is possible to provide the QML engine
+ with custom QNetworkAccessManager instances with specialized caching,
+ proxy and cookies support.
- To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and implement
- the create() method.
+ To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and
+ implement the virtual create() method, then assign it to the relevant QML
+ engine using QDeclarativeEngine::setNetworkAccessManagerFactory().
- To use a factory, assign it to the relevant QDeclarativeEngine using
- QDeclarativeEngine::setNetworkAccessManagerFactory().
+ Note the QML engine may create QNetworkAccessManager instances
+ from multiple threads. Because of this, the implementation of the create()
+ method must be \l{Reentrancy and Thread-Safety}{reentrant}. In addition,
+ the developer should be careful if the signals of the object to be
+ returned from create() are connected to the slots of an object that may
+ be created in a different thread:
- Note: the create() method may be called by multiple threads, so ensure the
- implementation of this method is reentrant.
+ \list
+ \o The QML engine internally handles all requests, and cleans up any
+ QNetworkReply objects it creates. Receiving the
+ QNetworkAccessManager::finished() signal in another thread may not
+ provide the receiver with a valid reply object if it has already
+ been deleted.
+ \o Authentication details provided to QNetworkAccessManager::authenticationRequired()
+ must be provided immediately, so this signal cannot be connected as a
+ Qt::QueuedConnection (or as the default Qt::AutoConnection from another
+ thread).
+ \endlist
+
+ For more information about signals and threads, see
+ \l {Threads and QObjects} and \l {Signals and Slots Across Threads}.
- \sa QDeclarativeEngine::setNetworkAccessManagerFactory(), {declarative/cppextensions/networkaccessmanagerfactory}{NetworkAccessManagerFactory example}
+ \sa {declarative/cppextensions/networkaccessmanagerfactory}{NetworkAccessManagerFactory example}
*/
/*!
- The destructor is empty.
+ Destroys the factory. The default implementation does nothing.
*/
QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory()
{
@@ -75,13 +92,9 @@ QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactor
/*!
\fn QNetworkAccessManager *QDeclarativeNetworkAccessManagerFactory::create(QObject *parent)
- Implement this method to create a QNetworkAccessManager with \a parent.
- This allows proxies, caching and cookie support to be setup appropriately.
-
- This method must return a new QNetworkAccessManager each time it is called.
- The parent of the QNetworkAccessManager must be the \a parent provided.
- The QNetworkAccessManager(s) created by this
- function will be destroyed automatically when their parent is destroyed.
+ Creates and returns a network access manager with the specified \a parent.
+ This method must return a new QNetworkAccessManager instance each time
+ it is called.
Note: this method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index df0917f..60edd64 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -77,15 +77,28 @@ a property on a specific object instance. To read a property's value, programme
QDeclarativeProperty instance and call the read() method. Likewise to write a property value the
write() method is used.
+For example, for the following QML code:
+
+\qml
+// MyItem.qml
+import QtQuick 1.0
+
+Text { text: "A bit of text" }
+\endqml
+
+The \l Text object's properties could be accessed using QDeclarativeProperty, like this:
+
\code
+#include <QDeclarativeProperty>
+#include <QGraphicsObject>
-QObject *object = declarativeComponent.create();
+...
-QDeclarativeProperty property(object, "font.pixelSize");
+QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml"));
+QDeclarativeProperty property(view.rootObject(), "font.pixelSize");
qWarning() << "Current pixel size:" << property.read().toInt();
property.write(24);
qWarning() << "Pixel size should now be 24:" << property.read().toInt();
-
\endcode
*/
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp
index 45f277e..bda02a5 100644
--- a/src/declarative/qml/qdeclarativesqldatabase.cpp
+++ b/src/declarative/qml/qdeclarativesqldatabase.cpp
@@ -172,16 +172,23 @@ static const char* sqlerror[] = {
return errorValue; \
}
-
-static QString databaseFile(const QString& connectionName, QScriptEngine *engine)
+static QString qmlsqldatabase_databasesPath(QScriptEngine *engine)
{
QDeclarativeScriptEngine *qmlengine = static_cast<QDeclarativeScriptEngine*>(engine);
- QString basename = qmlengine->offlineStoragePath
- + QDir::separator() + QLatin1String("Databases") + QDir::separator();
- basename += connectionName;
- return basename;
+ return qmlengine->offlineStoragePath
+ + QDir::separator() + QLatin1String("Databases");
}
+static void qmlsqldatabase_initDatabasesPath(QScriptEngine *engine)
+{
+ QDir().mkpath(qmlsqldatabase_databasesPath(engine));
+}
+
+static QString qmlsqldatabase_databaseFile(const QString& connectionName, QScriptEngine *engine)
+{
+ return qmlsqldatabase_databasesPath(engine) + QDir::separator()
+ + connectionName;
+}
static QScriptValue qmlsqldatabase_item(QScriptContext *context, QScriptEngine *engine)
@@ -302,7 +309,7 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri
if (ok) {
context->thisObject().setProperty(QLatin1String("version"), to_version, QScriptValue::ReadOnly);
- QSettings ini(databaseFile(db.connectionName(),engine)+QLatin1String(".ini"),QSettings::IniFormat);
+ QSettings ini(qmlsqldatabase_databaseFile(db.connectionName(),engine) + QLatin1String(".ini"), QSettings::IniFormat);
ini.setValue(QLatin1String("Version"), to_version);
}
@@ -348,6 +355,8 @@ static QScriptValue qmlsqldatabase_read_transaction(QScriptContext *context, QSc
*/
static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEngine *engine)
{
+ qmlsqldatabase_initDatabasesPath(engine);
+
QSqlDatabase database;
QString dbname = context->argument(0).toString();
@@ -360,7 +369,7 @@ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEng
md5.addData(dbname.toUtf8());
QString dbid(QLatin1String(md5.result().toHex()));
- QString basename = databaseFile(dbid,engine);
+ QString basename = qmlsqldatabase_databaseFile(dbid, engine);
bool created = false;
QString version = dbversion;
@@ -375,7 +384,6 @@ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEng
} else {
created = !QFile::exists(basename+QLatin1String(".sqlite"));
database = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"), dbid);
- QDir().mkpath(basename);
if (created) {
ini.setValue(QLatin1String("Name"), dbname);
if (dbcreationCallback.isFunction())
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index ce5b483..49a12b1 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -503,9 +503,9 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\qmlclass XmlListModel QDeclarativeXmlListModel
\ingroup qml-working-with-data
\since 4.7
- \brief The XmlListModel element is used to specify a model using XPath expressions.
+ \brief The XmlListModel element is used to specify a read-only model using XPath expressions.
- XmlListModel is used to create a model from XML data. It can be used as a data source
+ XmlListModel is used to create a read-only model from XML data. It can be used as a data source
for view elements (such as ListView, PathView, GridView) and other elements that interact with model
data (such as \l Repeater).
diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri
index c25b6d5..12e3a71 100644
--- a/src/gui/dialogs/dialogs.pri
+++ b/src/gui/dialogs/dialogs.pri
@@ -109,7 +109,7 @@ SOURCES += \
dialogs/qprintpreviewdialog.cpp
symbian:contains(QT_CONFIG, s60) {
- LIBS += -lcommondialogs
+ LIBS += -lCommonDialogs
SOURCES += dialogs/qfiledialog_symbian.cpp \
dialogs/qcolordialog_symbian.cpp
}
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 87850a7..1e13113 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -719,6 +719,14 @@ bool QFileDialogPrivate::setVisible_sys(bool visible)
if (!visible == q->isHidden())
return false;
+ if (q->windowFlags() & Qt::WindowStaysOnTopHint) {
+ // The native file dialog tries all it can to stay
+ // on the NSModalPanel level. And it might also show
+ // its own "create directory" dialog that we cannot control.
+ // So we need to use the non-native version in this case...
+ return false;
+ }
+
#ifndef QT_MAC_USE_COCOA
return visible ? showCarbonNavServicesDialog() : hideCarbonNavServicesDialog();
#else
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 7ab49cb..94e1a72 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3295,9 +3295,13 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
}
// Update the child focus chain.
- if (scene && scene->focusItem())
- scene->focusItem()->d_ptr->clearSubFocus();
- f->d_ptr->setSubFocus();
+ QGraphicsItem *commonAncestor = 0;
+ if (scene && scene->focusItem()) {
+ commonAncestor = scene->focusItem()->commonAncestorItem(f);
+ scene->focusItem()->d_ptr->clearSubFocus(scene->focusItem(), commonAncestor);
+ }
+
+ f->d_ptr->setSubFocus(f, commonAncestor);
// Update the scene's focus item.
if (scene) {
@@ -5554,7 +5558,7 @@ void QGraphicsItemPrivate::ensureSceneTransformRecursive(QGraphicsItem **topMost
/*!
\internal
*/
-void QGraphicsItemPrivate::setSubFocus(QGraphicsItem *rootItem)
+void QGraphicsItemPrivate::setSubFocus(QGraphicsItem *rootItem, QGraphicsItem *stopItem)
{
// Update focus child chain. Stop at panels, or if this item
// is hidden, stop at the first item with a visible parent.
@@ -5567,7 +5571,7 @@ void QGraphicsItemPrivate::setSubFocus(QGraphicsItem *rootItem)
if (parent != q_ptr && parent->d_ptr->subFocusItem) {
if (parent->d_ptr->subFocusItem == q_ptr)
break;
- parent->d_ptr->subFocusItem->d_ptr->clearSubFocus();
+ parent->d_ptr->subFocusItem->d_ptr->clearSubFocus(0, stopItem);
}
parent->d_ptr->subFocusItem = q_ptr;
parent->d_ptr->subFocusItemChange();
@@ -5580,12 +5584,12 @@ void QGraphicsItemPrivate::setSubFocus(QGraphicsItem *rootItem)
/*!
\internal
*/
-void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem)
+void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem, QGraphicsItem *stopItem)
{
// Reset sub focus chain.
QGraphicsItem *parent = rootItem ? rootItem : q_ptr;
do {
- if (parent->d_ptr->subFocusItem != q_ptr)
+ if (parent->d_ptr->subFocusItem != q_ptr || parent == stopItem)
break;
parent->d_ptr->subFocusItem = 0;
parent->d_ptr->subFocusItemChange();
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 1b7aa97..b938759 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -479,8 +479,8 @@ public:
void setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromHide);
void clearFocusHelper(bool giveFocusToParent);
- void setSubFocus(QGraphicsItem *rootItem = 0);
- void clearSubFocus(QGraphicsItem *rootItem = 0);
+ void setSubFocus(QGraphicsItem *rootItem = 0, QGraphicsItem *stopItem = 0);
+ void clearSubFocus(QGraphicsItem *rootItem = 0, QGraphicsItem *stopItem = 0);
void resetFocusProxy();
virtual void subFocusItemChange();
virtual void focusScopeItemChange(bool isSubFocusItem);
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp
index 86b4589..3e95735 100644
--- a/src/gui/graphicsview/qgraphicslayout.cpp
+++ b/src/gui/graphicsview/qgraphicslayout.cpp
@@ -307,10 +307,13 @@ void QGraphicsLayout::invalidate()
// does not call the base implementation? In addition, updateGeometry()
// does more than we need.
layoutItem->d_func()->sizeHintCacheDirty = true;
- layoutItem = layoutItem->parentLayoutItem();
+ layoutItem->d_func()->sizeHintWithConstraintCacheDirty = true;
+ layoutItem = layoutItem->parentLayoutItem();
}
- if (layoutItem)
+ if (layoutItem) {
layoutItem->d_func()->sizeHintCacheDirty = true;
+ layoutItem->d_func()->sizeHintWithConstraintCacheDirty = true;
+ }
bool postIt = layoutItem ? !layoutItem->isLayout() : false;
if (postIt) {
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 016cfbf..df13039 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -128,6 +128,7 @@ QGraphicsLayoutItemPrivate::~QGraphicsLayoutItemPrivate()
void QGraphicsLayoutItemPrivate::init()
{
sizeHintCacheDirty = true;
+ sizeHintWithConstraintCacheDirty = true;
sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
@@ -828,6 +829,7 @@ void QGraphicsLayoutItem::updateGeometry()
{
Q_D(QGraphicsLayoutItem);
d->sizeHintCacheDirty = true;
+ d->sizeHintWithConstraintCacheDirty = true;
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index a0015dc..726e6d7 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4583,13 +4583,13 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
itemCache->exposed.clear();
deviceData->cacheIndent = QPoint();
pix = QPixmap();
- } else {
+ } else if (!viewRect.isNull()) {
allowPartialCacheExposure = deviceData->cacheIndent != QPoint();
}
// Allow partial cache exposure if the device rect isn't fully contained and
// deviceRect is 20% taller or wider than the viewRect.
- if (!allowPartialCacheExposure && !viewRect.contains(deviceRect)) {
+ if (!allowPartialCacheExposure && !viewRect.isNull() && !viewRect.contains(deviceRect)) {
allowPartialCacheExposure = (viewRect.width() * 1.2 < deviceRect.width())
|| (viewRect.height() * 1.2 < deviceRect.height());
}
diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h
index 44efbba..1b2e2ec 100644
--- a/src/gui/graphicsview/qgridlayoutengine_p.h
+++ b/src/gui/graphicsview/qgridlayoutengine_p.h
@@ -433,7 +433,7 @@ private:
// Lazily computed from the above user input
mutable int q_cachedEffectiveFirstRows[NOrientations];
mutable int q_cachedEffectiveLastRows[NOrientations];
- mutable quint8 q_cachedConstraintOrientation : 2;
+ mutable quint8 q_cachedConstraintOrientation : 3;
// Layout item input
mutable QLayoutStyleInfo q_cachedDataForStyleInfo;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 2bb0897..cc3b867 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -1121,9 +1121,14 @@ QImage::QImage(const char * const xpm[])
QImage::QImage(const QImage &image)
: QPaintDevice()
{
- d = image.d;
- if (d)
- d->ref.ref();
+ if (image.paintingActive()) {
+ d = 0;
+ operator=(image.copy());
+ } else {
+ d = image.d;
+ if (d)
+ d->ref.ref();
+ }
}
#ifdef QT3_SUPPORT
@@ -1320,11 +1325,15 @@ QImage::~QImage()
QImage &QImage::operator=(const QImage &image)
{
- if (image.d)
- image.d->ref.ref();
- if (d && !d->ref.deref())
- delete d;
- d = image.d;
+ if (image.paintingActive()) {
+ operator=(image.copy());
+ } else {
+ if (image.d)
+ image.d->ref.ref();
+ if (d && !d->ref.deref())
+ delete d;
+ d = image.d;
+ }
return *this;
}
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 53f3559..29bf5f5 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -44,11 +44,13 @@
#include "qpixmap_raster_p.h"
#include "qnativeimage_p.h"
#include "qimage_p.h"
+#include "qpaintengine.h"
#include "qbitmap.h"
#include "qimage.h"
#include <QBuffer>
#include <QImageReader>
+#include <private/qimage_p.h>
#include <private/qsimd_p.h>
#include <private/qwidget_p.h>
#include <private/qdrawhelper_p.h>
@@ -302,6 +304,15 @@ bool QRasterPixmapData::hasAlphaChannel() const
QImage QRasterPixmapData::toImage() const
{
+ if (!image.isNull()) {
+ QImageData *data = const_cast<QImage &>(image).data_ptr();
+ if (data->paintEngine && data->paintEngine->isActive()
+ && data->paintEngine->paintDevice() == &image)
+ {
+ return image.copy();
+ }
+ }
+
return image;
}
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 4a1b9b9..686f388 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -657,6 +657,8 @@ void QCoeFepInputContext::UpdateFepInlineTextL(const TDesC& aNewInlineText,
if (!w)
return;
+ commitTemporaryPreeditString();
+
m_inlinePosition = aPositionOfInsertionPointInInlineText;
QList<QInputMethodEvent::Attribute> attributes;
@@ -694,6 +696,12 @@ void QCoeFepInputContext::SetInlineEditingCursorVisibilityL(TBool aCursorVisibil
void QCoeFepInputContext::CancelFepInlineEdit()
{
+ // We are not supposed to ever have a tempPreeditString and a real preedit string
+ // from S60 at the same time, so it should be safe to rely on this test to determine
+ // whether we should honor S60's request to clear the text or not.
+ if (m_hasTempPreeditString)
+ return;
+
QList<QInputMethodEvent::Attribute> attributes;
QInputMethodEvent event(QLatin1String(""), attributes);
event.setCommitString(QLatin1String(""), 0, 0);
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index dc8d938..0d9819e 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -782,14 +782,14 @@ void QSortFilterProxyModelPrivate::source_items_inserted(
if (orthogonal_source_to_proxy.isEmpty()) {
const int ortho_end = (orient == Qt::Horizontal) ? model->rowCount(source_parent) : model->columnCount(source_parent);
+ orthogonal_source_to_proxy.resize(ortho_end);
+
for (int ortho_item = 0; ortho_item < ortho_end; ++ortho_item) {
if ((orient == Qt::Horizontal) ? q->filterAcceptsRow(ortho_item, source_parent)
: q->filterAcceptsColumn(ortho_item, source_parent)) {
orthogonal_proxy_to_source.append(ortho_item);
}
}
- orthogonal_source_to_proxy.resize(orthogonal_proxy_to_source.size());
-
if (orient == Qt::Horizontal) {
// We're reacting to columnsInserted, but we've just inserted new rows. Sort them.
sort_source_rows(orthogonal_proxy_to_source, source_parent);
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index a4ae46b..b4ff7c4 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -1101,6 +1101,9 @@ QApplication::~QApplication()
QApplicationPrivate::is_app_closing = true;
QApplicationPrivate::is_app_running = false;
+ delete QWidgetPrivate::mapper;
+ QWidgetPrivate::mapper = 0;
+
// delete all widgets
if (QWidgetPrivate::allWidgets) {
QWidgetSet *mySet = QWidgetPrivate::allWidgets;
@@ -1130,9 +1133,6 @@ QApplication::~QApplication()
delete d->ignore_cursor; d->ignore_cursor = 0;
#endif
- delete QWidgetPrivate::mapper;
- QWidgetPrivate::mapper = 0;
-
delete QApplicationPrivate::app_pal;
QApplicationPrivate::app_pal = 0;
delete QApplicationPrivate::sys_pal;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 8596563..81fa4e6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1633,6 +1633,13 @@ void qt_cleanup()
//Change mouse pointer back
S60->wsSession().SetPointerCursorMode(EPointerCursorNone);
+#ifdef Q_WS_S60
+ // Clear CBA
+ CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(0);
+ delete S60->buttonGroupContainer();
+ S60->setButtonGroupContainer(0);
+#endif
+
if (S60->qtOwnsS60Environment) {
// Restore the S60 framework trap handler. See qt_init().
User::SetTrapHandler(S60->s60InstalledTrapHandler);
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index ddf1a27..1e2e71b 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -182,7 +182,7 @@ QT_END_NAMESPACE
bool handled = false;
// sometimes need to redirect mouse events to the popup.
QWidget *popup = qAppInstance()->activePopupWidget();
- if (popup) {
+ if (popup && popup != widget) {
switch([event type])
{
case NSLeftMouseDown:
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index 515c6d3..dc926e0 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -844,7 +844,7 @@ static void setChildrenWorksWhenModal(QWidget *widget, bool worksWhenModal)
NSWindow *window = qt_mac_window_for(dialogs[i]);
if (window && [window isKindOfClass:[NSPanel class]]) {
[static_cast<NSPanel *>(window) setWorksWhenModal:worksWhenModal];
- if (worksWhenModal && dialogs[i]->isVisible()){
+ if (worksWhenModal && [window isVisible]){
[window orderFront:window];
}
}
@@ -856,6 +856,7 @@ void QEventDispatcherMacPrivate::updateChildrenWorksWhenModal()
// Make the dialog children of the widget
// active. And make the dialog children of
// the previous modal dialog unactive again:
+ QMacCocoaAutoReleasePool pool;
int size = cocoaModalSessionStack.size();
if (size > 0){
if (QWidget *prevModal = cocoaModalSessionStack[size-1].widget)
diff --git a/src/gui/kernel/qeventdispatcher_s60_p.h b/src/gui/kernel/qeventdispatcher_s60_p.h
index c14fef0..539a21c 100644
--- a/src/gui/kernel/qeventdispatcher_s60_p.h
+++ b/src/gui/kernel/qeventdispatcher_s60_p.h
@@ -75,6 +75,13 @@ public:
void complete();
private:
+ // Workaround for a BC break from S60 3.2 -> 5.0, where the CEikonEnv override was removed.
+ // To avoid linking to that when we build against 3.2, define an empty body here.
+ // Reserved_*() have been verified to be empty in the S60 code.
+ void Reserved_1() {}
+ void Reserved_2() {}
+
+private:
int m_lastIterationCount;
TInt m_savedStatusCode;
bool m_hasAlreadyRun;
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 997419b..b89cb88 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2822,23 +2822,31 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
if (NSWindow *pwin = [qt_mac_nativeview_for(parent) window]) {
if (set) {
Qt::WindowType ptype = parent->window()->windowType();
- if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow])
+ if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow]) {
+ NSInteger level = [qwin level];
[pwin addChildWindow:qwin ordered:NSWindowAbove];
+ if ([qwin level] < level)
+ [qwin setLevel:level];
+ }
} else {
[pwin removeChildWindow:qwin];
}
}
}
- QList<QWidget *> widgets = q->findChildren<QWidget *>();
+ QObjectList widgets = q->children();
for (int i=0; i<widgets.size(); ++i) {
- QWidget *child = widgets.at(i);
+ QWidget *child = qobject_cast<QWidget *>(widgets.at(i));
if (child && child->isWindow()) {
if (NSWindow *cwin = [qt_mac_nativeview_for(child) window]) {
if (set) {
Qt::WindowType ctype = child->window()->windowType();
- if ([cwin isVisible] && (ctype == Qt::Window || ctype == Qt::Dialog) && ![cwin parentWindow])
+ if ([cwin isVisible] && (ctype == Qt::Window || ctype == Qt::Dialog) && ![cwin parentWindow]) {
+ NSInteger level = [cwin level];
[qwin addChildWindow:cwin ordered:NSWindowAbove];
+ if ([cwin level] < level)
+ [cwin setLevel:level];
+ }
} else {
[qwin removeChildWindow:qt_mac_window_for(child)];
}
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 609307c..d6ad3c3 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -504,7 +504,7 @@ void QWidgetPrivate::show_sys()
CEikButtonGroupContainer *cba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba,
CEikButtonGroupContainer::EHorizontal,ui,R_AVKON_SOFTKEYS_EMPTY_WITH_IDS);
- CEikButtonGroupContainer *oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(cba);
+ CEikButtonGroupContainer *oldCba = factory->SwapButtonGroup(cba);
Q_ASSERT(!oldCba);
S60->setButtonGroupContainer(cba);
@@ -513,7 +513,7 @@ void QWidgetPrivate::show_sys()
menuBar->SetMenuType(CEikMenuBar::EMenuOptions);
S60->appUi()->AddToStackL(menuBar,ECoeStackPriorityMenu,ECoeStackFlagRefusesFocus);
- CEikMenuBar *oldMenu = CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(menuBar);
+ CEikMenuBar *oldMenu = factory->SwapMenuBar(menuBar);
Q_ASSERT(!oldMenu);
)
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index a4ab278..024a69d 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -6432,6 +6432,8 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp
int px = int(tx) - (tx < 0);
int py = int(ty) - (ty < 0);
+ px %= image_width;
+ py %= image_height;
if (px < 0)
px += image_width;
if (py < 0)
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 0cc2e40..33fd21e 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1684,9 +1684,7 @@ QT_TRIVIAL_MEMCONVERT_IMPL(qrgb888)
QT_TRIVIAL_MEMCONVERT_IMPL(qargb6666)
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb666)
QT_TRIVIAL_MEMCONVERT_IMPL(quint16)
-#ifdef Q_WS_QWS
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb565)
-#endif
QT_TRIVIAL_MEMCONVERT_IMPL(qargb8565)
QT_TRIVIAL_MEMCONVERT_IMPL(qargb8555)
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb555)
@@ -1783,9 +1781,7 @@ QT_RECTCONVERT_TRIVIAL_IMPL(quint32)
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb888)
QT_RECTCONVERT_TRIVIAL_IMPL(qargb6666)
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb666)
-#ifdef Q_WS_QWS
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb565)
-#endif
QT_RECTCONVERT_TRIVIAL_IMPL(qargb8565)
QT_RECTCONVERT_TRIVIAL_IMPL(quint16)
QT_RECTCONVERT_TRIVIAL_IMPL(qargb8555)
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index ec9ebeb..001345f 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -963,49 +963,53 @@
const QT_FT_Vector* control2,
const QT_FT_Vector* to )
{
+ TPos dx, dy, da, db;
int top, level;
int* levels;
QT_FT_Vector* arc;
- int mid_x = ( DOWNSCALE( ras.x ) + to->x +
- 3 * (control1->x + control2->x ) ) / 8;
- int mid_y = ( DOWNSCALE( ras.y ) + to->y +
- 3 * (control1->y + control2->y ) ) / 8;
- TPos dx = DOWNSCALE( ras.x ) + to->x - ( mid_x << 1 );
- TPos dy = DOWNSCALE( ras.y ) + to->y - ( mid_y << 1 );
+ dx = DOWNSCALE( ras.x ) + to->x - ( control1->x << 1 );
if ( dx < 0 )
dx = -dx;
+ dy = DOWNSCALE( ras.y ) + to->y - ( control1->y << 1 );
if ( dy < 0 )
dy = -dy;
if ( dx < dy )
dx = dy;
+ da = dx;
+
+ dx = DOWNSCALE( ras.x ) + to->x - 3 * ( control1->x + control2->x );
+ if ( dx < 0 )
+ dx = -dx;
+ dy = DOWNSCALE( ras.y ) + to->y - 3 * ( control1->y + control2->y );
+ if ( dy < 0 )
+ dy = -dy;
+ if ( dx < dy )
+ dx = dy;
+ db = dx;
level = 1;
- dx /= ras.cubic_level;
- while ( dx > 0 )
+ da = da / ras.cubic_level;
+ db = db / ras.conic_level;
+ while ( da > 0 || db > 0 )
{
- dx >>= 2;
+ da >>= 2;
+ db >>= 3;
level++;
}
if ( level <= 1 )
{
- TPos to_x, to_y;
+ TPos to_x, to_y, mid_x, mid_y;
to_x = UPSCALE( to->x );
to_y = UPSCALE( to->y );
-
- /* Recalculation of midpoint is needed only if */
- /* UPSCALE and DOWNSCALE have any effect. */
-
-#if ( PIXEL_BITS != 6 )
mid_x = ( ras.x + to_x +
3 * UPSCALE( control1->x + control2->x ) ) / 8;
mid_y = ( ras.y + to_y +
3 * UPSCALE( control1->y + control2->y ) ) / 8;
-#endif
gray_render_line( RAS_VAR_ mid_x, mid_y );
gray_render_line( RAS_VAR_ to_x, to_y );
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index a17b7c1..5060ad6 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -868,9 +868,9 @@ QWingedEdge::QWingedEdge() :
}
QWingedEdge::QWingedEdge(const QPainterPath &subject, const QPainterPath &clip) :
- m_edges(subject.length()),
- m_vertices(subject.length()),
- m_segments(subject.length())
+ m_edges(subject.elementCount()),
+ m_vertices(subject.elementCount()),
+ m_segments(subject.elementCount())
{
m_segments.setPath(subject);
m_segments.addPath(clip);
@@ -1405,9 +1405,9 @@ bool QPathClipper::intersect()
else if (clipIsRect)
return subjectPath.intersects(r2);
- QPathSegments a(subjectPath.length());
+ QPathSegments a(subjectPath.elementCount());
a.setPath(subjectPath);
- QPathSegments b(clipPath.length());
+ QPathSegments b(clipPath.elementCount());
b.setPath(clipPath);
QIntersectionFinder finder;
@@ -1450,9 +1450,9 @@ bool QPathClipper::contains()
if (clipIsRect)
return subjectPath.contains(r2);
- QPathSegments a(subjectPath.length());
+ QPathSegments a(subjectPath.elementCount());
a.setPath(subjectPath);
- QPathSegments b(clipPath.length());
+ QPathSegments b(clipPath.elementCount());
b.setPath(clipPath);
QIntersectionFinder finder;
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 5e168c6..9a77a7a 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -116,7 +116,6 @@ public:
const QSymbianTypeFaceExtras *extras(const QString &typeface, bool bold, bool italic) const;
void addFontFileToFontStore(const QFileInfo &fontFileInfo);
-#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
struct CFontFromFontStoreReleaser {
static inline void cleanup(CFont *font)
{
@@ -127,7 +126,6 @@ public:
dbExtras->m_store->ReleaseFont(font);
}
};
-#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
struct CFontFromScreenDeviceReleaser {
static inline void cleanup(CFont *font)
@@ -138,37 +136,38 @@ public:
}
};
-#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
+// m_heap, m_store, m_rasterizer and m_extras are used if Symbian
+// does not provide the Font Table API
RHeap* m_heap;
CFontStore *m_store;
COpenFontRasterizer *m_rasterizer;
mutable QList<const QSymbianTypeFaceExtras *> m_extras;
-#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
+
mutable QHash<QString, const QSymbianTypeFaceExtras *> m_extrasHash;
};
QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementation()
{
-#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
- QStringList filters;
- filters.append(QLatin1String("*.ttf"));
- filters.append(QLatin1String("*.ccc"));
- filters.append(QLatin1String("*.ltt"));
- const QFileInfoList fontFiles = alternativeFilePaths(QLatin1String("resource\\Fonts"), filters);
-
- const TInt heapMinLength = 0x1000;
- const TInt heapMaxLength = qMax(0x20000 * fontFiles.count(), heapMinLength);
- m_heap = User::ChunkHeap(NULL, heapMinLength, heapMaxLength);
- QT_TRAP_THROWING(
- m_store = CFontStore::NewL(m_heap);
- m_rasterizer = COpenFontRasterizer::NewL(TUid::Uid(0x101F7F5E));
- CleanupStack::PushL(m_rasterizer);
- m_store->InstallRasterizerL(m_rasterizer);
- CleanupStack::Pop(m_rasterizer););
-
- foreach (const QFileInfo &fontFileInfo, fontFiles)
- addFontFileToFontStore(fontFileInfo);
-#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
+ if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
+ QStringList filters;
+ filters.append(QLatin1String("*.ttf"));
+ filters.append(QLatin1String("*.ccc"));
+ filters.append(QLatin1String("*.ltt"));
+ const QFileInfoList fontFiles = alternativeFilePaths(QLatin1String("resource\\Fonts"), filters);
+
+ const TInt heapMinLength = 0x1000;
+ const TInt heapMaxLength = qMax(0x20000 * fontFiles.count(), heapMinLength);
+ m_heap = User::ChunkHeap(NULL, heapMinLength, heapMaxLength);
+ QT_TRAP_THROWING(
+ m_store = CFontStore::NewL(m_heap);
+ m_rasterizer = COpenFontRasterizer::NewL(TUid::Uid(0x101F7F5E));
+ CleanupStack::PushL(m_rasterizer);
+ m_store->InstallRasterizerL(m_rasterizer);
+ CleanupStack::Pop(m_rasterizer););
+
+ foreach (const QFileInfo &fontFileInfo, fontFiles)
+ addFontFileToFontStore(fontFileInfo);
+ }
}
void qt_cleanup_symbianFontDatabaseExtras()
@@ -177,26 +176,26 @@ void qt_cleanup_symbianFontDatabaseExtras()
static_cast<const QSymbianFontDatabaseExtrasImplementation*>(privateDb()->symbianExtras);
if (!dbExtras)
return; // initializeDb() has never been called
-#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
- qDeleteAll(dbExtras->m_extrasHash);
-#else // Q_SYMBIAN_HAS_FONTTABLE_API
- typedef QList<const QSymbianTypeFaceExtras *>::iterator iterator;
- for (iterator p = dbExtras->m_extras.begin(); p != dbExtras->m_extras.end(); ++p) {
- dbExtras->m_store->ReleaseFont((*p)->fontOwner());
- delete *p;
+ if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
+ qDeleteAll(dbExtras->m_extrasHash);
+ } else {
+ typedef QList<const QSymbianTypeFaceExtras *>::iterator iterator;
+ for (iterator p = dbExtras->m_extras.begin(); p != dbExtras->m_extras.end(); ++p) {
+ dbExtras->m_store->ReleaseFont((*p)->fontOwner());
+ delete *p;
+ }
+ dbExtras->m_extras.clear();
}
- dbExtras->m_extras.clear();
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API
dbExtras->m_extrasHash.clear();
}
QSymbianFontDatabaseExtrasImplementation::~QSymbianFontDatabaseExtrasImplementation()
{
qt_cleanup_symbianFontDatabaseExtras();
-#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
- delete m_store;
- m_heap->Close();
-#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
+ if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
+ delete m_store;
+ m_heap->Close();
+ }
}
#ifndef FNTSTORE_H_INLINES_SUPPORT_FMM
@@ -228,44 +227,45 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c
searchSpec.iFontStyle.SetPosture(EPostureItalic);
CFont* font = NULL;
-#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
- const TInt err = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec);
- Q_ASSERT(err == KErrNone && font);
- QScopedPointer<CFont, CFontFromScreenDeviceReleaser> sFont(font);
- QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font);
- sFont.take();
- m_extrasHash.insert(searchKey, extras);
-#else // Q_SYMBIAN_HAS_FONTTABLE_API
- const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, searchSpec);
- Q_ASSERT(err == KErrNone && font);
- const CBitmapFont *bitmapFont = static_cast<CBitmapFont*>(font);
- COpenFont *openFont =
-#ifdef FNTSTORE_H_INLINES_SUPPORT_FMM
- bitmapFont->OpenFont();
-#else // FNTSTORE_H_INLINES_SUPPORT_FMM
- OpenFontFromBitmapFont(bitmapFont);
-#endif // FNTSTORE_H_INLINES_SUPPORT_FMM
- const TOpenFontFaceAttrib* const attrib = openFont->FaceAttrib();
- const QString foundKey =
- QString((const QChar*)attrib->FullName().Ptr(), attrib->FullName().Length());
- if (!m_extrasHash.contains(foundKey)) {
- QScopedPointer<CFont, CFontFromFontStoreReleaser> sFont(font);
- QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font, openFont);
+ if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
+ const TInt err = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec);
+ Q_ASSERT(err == KErrNone && font);
+ QScopedPointer<CFont, CFontFromScreenDeviceReleaser> sFont(font);
+ QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font);
sFont.take();
- m_extras.append(extras);
m_extrasHash.insert(searchKey, extras);
- m_extrasHash.insert(foundKey, extras);
} else {
- m_store->ReleaseFont(font);
- m_extrasHash.insert(searchKey, m_extrasHash.value(foundKey));
+ const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, searchSpec);
+ Q_ASSERT(err == KErrNone && font);
+ const CBitmapFont *bitmapFont = static_cast<CBitmapFont*>(font);
+ COpenFont *openFont =
+#ifdef FNTSTORE_H_INLINES_SUPPORT_FMM
+ bitmapFont->OpenFont();
+#else // FNTSTORE_H_INLINES_SUPPORT_FMM
+ OpenFontFromBitmapFont(bitmapFont);
+#endif // FNTSTORE_H_INLINES_SUPPORT_FMM
+ const TOpenFontFaceAttrib* const attrib = openFont->FaceAttrib();
+ const QString foundKey =
+ QString((const QChar*)attrib->FullName().Ptr(), attrib->FullName().Length());
+ if (!m_extrasHash.contains(foundKey)) {
+ QScopedPointer<CFont, CFontFromFontStoreReleaser> sFont(font);
+ QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font, openFont);
+ sFont.take();
+ m_extras.append(extras);
+ m_extrasHash.insert(searchKey, extras);
+ m_extrasHash.insert(foundKey, extras);
+ } else {
+ m_store->ReleaseFont(font);
+ m_extrasHash.insert(searchKey, m_extrasHash.value(foundKey));
+ }
}
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API
}
return m_extrasHash.value(searchKey);
}
void QSymbianFontDatabaseExtrasImplementation::addFontFileToFontStore(const QFileInfo &fontFileInfo)
{
+ Q_ASSERT(!QSymbianTypeFaceExtras::symbianFontTableApiAvailable());
const QString fontFile = QDir::toNativeSeparators(fontFileInfo.absoluteFilePath());
TPtrC fontFilePtr(qt_QString2TPtrC(fontFile));
QT_TRAP_THROWING(m_store->AddFileL(fontFilePtr));
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index bf30e1c..f8e5b4a 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -46,114 +46,115 @@
#include <private/qapplication_p.h>
#include "qimage.h"
#include <private/qt_s60_p.h>
+#include <private/qpixmap_s60_p.h>
#include <e32base.h>
#include <e32std.h>
#include <eikenv.h>
#include <gdi.h>
-#if defined(Q_SYMBIAN_HAS_FONTTABLE_API) || defined(Q_SYMBIAN_HAS_GLYPHOUTLINE_API)
+#if defined(Q_SYMBIAN_HAS_GLYPHOUTLINE_API)
#include <graphics/gdi/gdiplatapi.h>
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API || Q_SYMBIAN_HAS_GLYPHOUTLINE_API
+#endif // Q_SYMBIAN_HAS_GLYPHOUTLINE_API
+
+// Replication of TGetFontTableParam & friends.
+// There is unfortunately no compile time flag like SYMBIAN_FONT_TABLE_API
+// that would help us to only replicate these things for Symbian versions
+// that do not yet have the font table Api. Symbian's public SDK does
+// generally not define any usable macros.
+class QSymbianTGetFontTableParam
+{
+public:
+ TUint32 iTag;
+ TAny *iContent;
+ TInt iLength;
+};
+const TUid QSymbianKFontGetFontTable = {0x102872C1};
+const TUid QSymbianKFontReleaseFontTable = {0x2002AC24};
QT_BEGIN_NAMESPACE
-#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont)
: m_cFont(cFont)
, m_symbolCMap(false)
+ , m_openFont(openFont)
{
- Q_UNUSED(openFont)
+ if (!symbianFontTableApiAvailable()) {
+ TAny *trueTypeExtension = NULL;
+ m_openFont->ExtendedInterface(KUidOpenFontTrueTypeExtension, trueTypeExtension);
+ m_trueTypeExtension = static_cast<MOpenFontTrueTypeExtension*>(trueTypeExtension);
+ Q_ASSERT(m_trueTypeExtension);
+ }
}
QSymbianTypeFaceExtras::~QSymbianTypeFaceExtras()
{
- S60->screenDevice()->ReleaseFont(m_cFont);
+ if (symbianFontTableApiAvailable())
+ S60->screenDevice()->ReleaseFont(m_cFont);
}
QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const
{
- RFontTable fontTable;
- if (fontTable.Open(*m_cFont, tag) != KErrNone)
+ if (symbianFontTableApiAvailable()) {
+ QSymbianTGetFontTableParam fontTableParams = { tag, 0, 0 };
+ if (m_cFont->ExtendedFunction(QSymbianKFontGetFontTable, &fontTableParams) == KErrNone) {
+ const char* const fontTableContent =
+ static_cast<const char *>(fontTableParams.iContent);
+ const QByteArray fontTable(fontTableContent, fontTableParams.iLength);
+ m_cFont->ExtendedFunction(QSymbianKFontReleaseFontTable, &fontTableParams);
+ return fontTable;
+ }
return QByteArray();
- const QByteArray byteArray(reinterpret_cast<const char *>
- (fontTable.TableContent()),fontTable.TableLength());
- fontTable.Close();
- return byteArray;
+ } else {
+ Q_ASSERT(m_trueTypeExtension->HasTrueTypeTable(tag));
+ TInt error = KErrNone;
+ TInt tableByteLength = 0;
+ TAny *table = q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength));
+ const QByteArray result(static_cast<const char*>(table), tableByteLength);
+ m_trueTypeExtension->ReleaseTrueTypeTable(table);
+ return result;
+ }
}
bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *length) const
{
- RFontTable fontTable;
- if (fontTable.Open(*m_cFont, tag) != KErrNone)
- return false;
-
bool result = true;
- const TInt tableByteLength = fontTable.TableLength();
-
- if (*length > 0 && *length < tableByteLength) {
- result = false; // Caller did not allocate enough memory
+ if (symbianFontTableApiAvailable()) {
+ QSymbianTGetFontTableParam fontTableParams = { tag, 0, 0 };
+ if (m_cFont->ExtendedFunction(QSymbianKFontGetFontTable, &fontTableParams) == KErrNone) {
+ if (*length > 0 && *length < fontTableParams.iLength) {
+ result = false; // Caller did not allocate enough memory
+ } else {
+ *length = fontTableParams.iLength;
+ if (buffer)
+ memcpy(buffer, fontTableParams.iContent, fontTableParams.iLength);
+ }
+ m_cFont->ExtendedFunction(QSymbianKFontReleaseFontTable, &fontTableParams);
+ } else {
+ result = false;
+ }
} else {
- *length = tableByteLength;
- if (buffer)
- memcpy(buffer, fontTable.TableContent(), tableByteLength);
- }
-
- fontTable.Close();
- return result;
-}
-
-#else // Q_SYMBIAN_HAS_FONTTABLE_API
-QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont)
- : m_cFont(cFont)
- , m_symbolCMap(false)
- , m_openFont(openFont)
-{
- TAny *trueTypeExtension = NULL;
- m_openFont->ExtendedInterface(KUidOpenFontTrueTypeExtension, trueTypeExtension);
- m_trueTypeExtension = static_cast<MOpenFontTrueTypeExtension*>(trueTypeExtension);
- Q_ASSERT(m_trueTypeExtension);
-}
-
-QSymbianTypeFaceExtras::~QSymbianTypeFaceExtras()
-{
-}
-
-QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const
-{
- Q_ASSERT(m_trueTypeExtension->HasTrueTypeTable(tag));
- TInt error = KErrNone;
- TInt tableByteLength = 0;
- TAny *table = q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength));
- QByteArray result(static_cast<const char*>(table), tableByteLength);
- m_trueTypeExtension->ReleaseTrueTypeTable(table);
- return result;
-}
+ if (!m_trueTypeExtension->HasTrueTypeTable(tag))
+ return false;
-bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *length) const
-{
- if (!m_trueTypeExtension->HasTrueTypeTable(tag))
- return false;
+ TInt error = KErrNone;
+ TInt tableByteLength;
+ TAny *table =
+ q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength));
- bool result = true;
- TInt error = KErrNone;
- TInt tableByteLength;
- TAny *table =
- q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength));
+ if (error != KErrNone) {
+ return false;
+ } else if (*length > 0 && *length < tableByteLength) {
+ result = false; // Caller did not allocate enough memory
+ } else {
+ *length = tableByteLength;
+ if (buffer)
+ memcpy(buffer, table, tableByteLength);
+ }
- if (error != KErrNone) {
- return false;
- } else if (*length > 0 && *length < tableByteLength) {
- result = false; // Caller did not allocate enough memory
- } else {
- *length = tableByteLength;
- if (buffer)
- memcpy(buffer, table, tableByteLength);
+ m_trueTypeExtension->ReleaseTrueTypeTable(table);
}
-
- m_trueTypeExtension->ReleaseTrueTypeTable(table);
return result;
}
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API
const uchar *QSymbianTypeFaceExtras::cmap() const
{
@@ -195,6 +196,39 @@ QFixed QSymbianTypeFaceExtras::unitsPerEm() const
return m_unitsPerEm;
}
+bool QSymbianTypeFaceExtras::symbianFontTableApiAvailable()
+{
+ enum FontTableApiAvailability {
+ Unknown,
+ Available,
+ Unavailable
+ };
+ static FontTableApiAvailability availability =
+ QSysInfo::symbianVersion() < QSysInfo::SV_SF_3 ?
+ Unavailable : Unknown;
+ if (availability == Unknown) {
+ // Actually, we should ask CFeatureDiscovery::IsFeatureSupportedL()
+ // with FfFontTable here. But since at the time of writing, the
+ // FfFontTable flag check either gave false positives or false
+ // negatives. Here comes an implicit check via CFont::ExtendedFunction.
+ QSymbianTGetFontTableParam fontTableParams = {
+ MAKE_TAG('O', 'S', '/', '2'), 0, 0 };
+ QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
+ CFont *font;
+ const TInt getFontErr = S60->screenDevice()->GetNearestFontInTwips(font, TFontSpec());
+ Q_ASSERT(getFontErr == KErrNone);
+ if (font->ExtendedFunction(QSymbianKFontGetFontTable, &fontTableParams) == KErrNone) {
+ font->ExtendedFunction(QSymbianKFontReleaseFontTable, &fontTableParams);
+ availability = Available;
+ } else {
+ availability = Unavailable;
+ }
+ S60->screenDevice()->ReleaseFont(font);
+ lock.relock();
+ }
+ return availability == Available;
+}
+
// 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 c65ce55..cdf2185 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -58,13 +58,11 @@
#include "qsize.h"
#include <openfont.h>
-#ifdef SYMBIAN_GDI_GLYPHDATA
-#define Q_SYMBIAN_HAS_FONTTABLE_API
-#endif
-
-#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
+// The glyph outline code is intentionally disabled. It will be reactivated as
+// soon as the glyph outline API is backported from Symbian(^4) to Symbian(^3).
+#if 0
#define Q_SYMBIAN_HAS_GLYPHOUTLINE_API
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API
+#endif
class CFont;
@@ -83,16 +81,18 @@ public:
CFont *fontOwner() const;
bool isSymbolCMap() const;
QFixed unitsPerEm() const;
+ static bool symbianFontTableApiAvailable();
private:
CFont* m_cFont;
mutable bool m_symbolCMap;
mutable QByteArray m_cmapTable;
mutable QFixed m_unitsPerEm;
-#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
+
+ // m_openFont and m_openFont are used if Symbian does not provide
+ // the Font Table API
COpenFont *m_openFont;
mutable MOpenFontTrueTypeExtension *m_trueTypeExtension;
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API
};
class QFontEngineS60 : public QFontEngine
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index c35069f..77e6aa1 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -596,8 +596,10 @@ void QTextDocument::markContentsDirty(int from, int length)
Q_D(QTextDocument);
d->documentChange(from, length);
if (!d->inContentsChange) {
- d->lout->documentChanged(d->docChangeFrom, d->docChangeOldLength, d->docChangeLength);
- d->docChangeFrom = -1;
+ if (d->lout) {
+ d->lout->documentChanged(d->docChangeFrom, d->docChangeOldLength, d->docChangeLength);
+ d->docChangeFrom = -1;
+ }
}
}
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 7859bdc..5a4e507 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -398,7 +398,7 @@ void QComboBoxPrivateContainer::leaveEvent(QEvent *)
#ifdef Q_WS_MAC
QStyleOptionComboBox opt = comboStyleOption();
if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo))
- view->clearSelection();
+ view->setCurrentIndex(QModelIndex());
#endif
}
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index 42be03b..011b07a 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -682,7 +682,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const
bool tryWidth = (w < 0) && (align & Qt::TextWordWrap);
if (tryWidth)
- w = fm.averageCharWidth() * 80;
+ w = qMin(fm.averageCharWidth() * 80, q->maximumSize().width());
else if (w < 0)
w = 2000;
w -= (hextra + contentsMargin.width());
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index f338f40..5ea9dc4 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1308,6 +1308,15 @@ void QLineControl::setCursorBlinkPeriod(int msec)
m_blinkPeriod = msec;
}
+void QLineControl::resetCursorBlinkTimer()
+{
+ if (m_blinkPeriod == 0 || m_blinkTimer == 0)
+ return;
+ killTimer(m_blinkTimer);
+ m_blinkTimer = startTimer(m_blinkPeriod / 2);
+ m_blinkStatus = 1;
+}
+
void QLineControl::timerEvent(QTimerEvent *event)
{
if (event->timerId() == m_blinkTimer) {
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index 7068f62..d881acf 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -296,6 +296,7 @@ public:
int cursorBlinkPeriod() const { return m_blinkPeriod; }
void setCursorBlinkPeriod(int msec);
+ void resetCursorBlinkTimer();
QString cancelText() const { return m_cancelText; }
void setCancelText(const QString &text) { m_cancelText = text; }
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 4bea6de..74c2a9e 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1320,6 +1320,9 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
Conversely, actions can be added to widgets with the addAction(),
addActions() and insertAction() functions.
+ \warning To make QMenu visible on the screen, exec() or popup() should be
+ used instead of show().
+
\section1 QMenu on Qt for Windows CE
If a menu is integrated into the native menubar on Windows Mobile we
@@ -1795,10 +1798,12 @@ QSize QMenu::sizeHint() const
void QMenu::popup(const QPoint &p, QAction *atAction)
{
Q_D(QMenu);
+#ifndef Q_OS_SYMBIAN
if (d->scroll) { // reset scroll state from last popup
d->scroll->scrollOffset = 0;
d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
+#endif
d->tearoffHighlighted = 0;
d->motions = 0;
d->doChildEffects = true;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index cf6e674..3d1df06 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -271,8 +271,8 @@ void QNetworkReplyImplPrivate::_q_networkSessionConnected()
void QNetworkReplyImplPrivate::_q_networkSessionFailed()
{
- // Abort waiting replies.
- if (state == WaitingForSession) {
+ // Abort waiting and working replies.
+ if (state == WaitingForSession || state == Working) {
state = Working;
error(QNetworkReplyImpl::UnknownNetworkError,
QCoreApplication::translate("QNetworkReply", "Network session error."));
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 3ddc15a..668a3f0 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -163,6 +163,8 @@ void QGL2PaintEngineExPrivate::setBrush(const QBrush& brush)
Q_ASSERT(newStyle != Qt::NoBrush);
currentBrush = brush;
+ if (!currentBrushPixmap.isNull())
+ currentBrushPixmap = QPixmap();
brushUniformsDirty = true; // All brushes have at least one uniform
if (newStyle > Qt::SolidPattern)
@@ -221,10 +223,14 @@ void QGL2PaintEngineExPrivate::updateBrushTexture()
updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform);
}
else if (style == Qt::TexturePattern) {
- const QPixmap& texPixmap = currentBrush.texture();
+ currentBrushPixmap = currentBrush.texture();
+
+ int max_texture_size = ctx->d_func()->maxTextureSize();
+ if (currentBrushPixmap.width() > max_texture_size || currentBrushPixmap.height() > max_texture_size)
+ currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
- QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA,
+ QGLTexture *tex = ctx->d_func()->bindTexture(currentBrushPixmap, GL_TEXTURE_2D, GL_RGBA,
QGLContext::InternalBindOption |
QGLContext::CanFlipNativePixmapBindOption);
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
@@ -1305,13 +1311,30 @@ void QGL2PaintEngineEx::transformChanged()
}
+static const QRectF scaleRect(const QRectF &r, qreal sx, qreal sy)
+{
+ return QRectF(r.x() * sx, r.y() * sy, r.width() * sx, r.height() * sy);
+}
+
void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, const QRectF & src)
{
Q_D(QGL2PaintEngineEx);
+ QGLContext *ctx = d->ctx;
+
+ int max_texture_size = ctx->d_func()->maxTextureSize();
+ if (pixmap.width() > max_texture_size || pixmap.height() > max_texture_size) {
+ QPixmap scaled = pixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+
+ const qreal sx = scaled.width() / qreal(pixmap.width());
+ const qreal sy = scaled.height() / qreal(pixmap.height());
+
+ drawPixmap(dest, scaled, scaleRect(src, sx, sy));
+ return;
+ }
+
ensureActive();
d->transferMode(ImageDrawingMode);
- QGLContext *ctx = d->ctx;
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
QGLTexture *texture =
ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA,
@@ -1334,11 +1357,24 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const
Qt::ImageConversionFlags)
{
Q_D(QGL2PaintEngineEx);
+ QGLContext *ctx = d->ctx;
+
+ int max_texture_size = ctx->d_func()->maxTextureSize();
+ if (image.width() > max_texture_size || image.height() > max_texture_size) {
+ QImage scaled = image.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+
+ const qreal sx = scaled.width() / qreal(image.width());
+ const qreal sy = scaled.height() / qreal(image.height());
+
+ drawImage(dest, scaled, scaleRect(src, sx, sy));
+ return;
+ }
+
ensureActive();
d->transferMode(ImageDrawingMode);
- QGLContext *ctx = d->ctx;
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
+
QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
GLuint id = texture->id;
@@ -1464,6 +1500,7 @@ namespace {
QSize cacheSize;
QGL2PEXVertexArray vertexCoordinateArray;
QGL2PEXVertexArray textureCoordinateArray;
+ QFontEngineGlyphCache::Type glyphType;
};
}
@@ -1477,22 +1514,29 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
QOpenGL2PaintEngineState *s = q->state();
+ bool recreateVertexArrays = false;
+
QGLTextureGlyphCache *cache =
(QGLTextureGlyphCache *) staticTextItem->fontEngine()->glyphCache(ctx, glyphType, QTransform());
if (!cache || cache->cacheType() != glyphType) {
cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform());
staticTextItem->fontEngine()->setGlyphCache(ctx, cache);
+ recreateVertexArrays = true;
} else if (cache->context() == 0) { // Old context has been destroyed, new context has same ptr value
cache->setContext(ctx);
}
- bool recreateVertexArrays = false;
- if (staticTextItem->userDataNeedsUpdate)
+ if (staticTextItem->userDataNeedsUpdate) {
recreateVertexArrays = true;
- else if (staticTextItem->userData() == 0)
+ } else if (staticTextItem->userData() == 0) {
recreateVertexArrays = true;
- else if (staticTextItem->userData()->type != QStaticTextUserData::OpenGLUserData)
+ } else if (staticTextItem->userData()->type != QStaticTextUserData::OpenGLUserData) {
recreateVertexArrays = true;
+ } else {
+ QOpenGLStaticTextUserData *userData = static_cast<QOpenGLStaticTextUserData *>(staticTextItem->userData());
+ if (userData->glyphType != glyphType)
+ recreateVertexArrays = true;
+ }
// We only need to update the cache with new glyphs if we are actually going to recreate the vertex arrays.
// If the cache size has changed, we do need to regenerate the vertices, but we don't need to repopulate the
@@ -1504,8 +1548,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
// No space in cache. We need to clear the cache and try again
cache->clear();
cache->populate(staticTextItem->fontEngine(), staticTextItem->numGlyphs,
- staticTextItem->glyphs, staticTextItem->glyphPositions);
- }
+ staticTextItem->glyphs, staticTextItem->glyphPositions);
+ }
}
if (cache->width() == 0 || cache->height() == 0)
@@ -1535,6 +1579,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
userData = static_cast<QOpenGLStaticTextUserData*>(staticTextItem->userData());
}
+ userData->glyphType = glyphType;
+
// Use cache if backend optimizations is turned on
vertexCoordinates = &userData->vertexCoordinateArray;
textureCoordinates = &userData->textureCoordinateArray;
@@ -1727,7 +1773,13 @@ void QGL2PaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *frag
}
ensureActive();
- d->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
+ int max_texture_size = d->ctx->d_func()->maxTextureSize();
+ if (pixmap.width() > max_texture_size || pixmap.height() > max_texture_size) {
+ QPixmap scaled = pixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+ d->drawPixmapFragments(fragments, fragmentCount, scaled, hints);
+ } else {
+ d->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
+ }
}
@@ -2139,7 +2191,11 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
const QPointF* const points = reinterpret_cast<const QPointF*>(path.points());
QRectF rect(points[0], points[2]);
- if (state()->matrix.type() <= QTransform::TxScale) {
+ if (state()->matrix.type() <= QTransform::TxScale
+ || (state()->matrix.type() == QTransform::TxRotate
+ && qFuzzyIsNull(state()->matrix.m11())
+ && qFuzzyIsNull(state()->matrix.m22())))
+ {
state()->rectangleClip = state()->rectangleClip.intersected(state()->matrix.mapRect(rect).toRect());
d->updateClipScissorTest();
return;
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index b255e75..02b737b 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -274,6 +274,8 @@ public:
QBrush currentBrush; // May not be the state's brush!
const QBrush noBrush;
+ QPixmap currentBrushPixmap;
+
QGL2PEXVertexArray vertexCoordinateArray;
QGL2PEXVertexArray textureCoordinateArray;
QVector<GLushort> elementIndices;
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 705ad09..66445cd 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -128,14 +128,17 @@ void QGLTextureGlyphCache::createTextureData(int width, int height)
m_width = width;
m_height = height;
- QVarLengthArray<uchar> data(width * height);
- for (int i = 0; i < data.size(); ++i)
- data[i] = 0;
-
- if (m_type == QFontEngineGlyphCache::Raster_RGBMask)
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, &data[0]);
- else
+ if (m_type == QFontEngineGlyphCache::Raster_RGBMask) {
+ QVarLengthArray<uchar> data(width * height * 4);
+ for (int i = 0; i < data.size(); ++i)
+ data[i] = 0;
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
+ } else {
+ QVarLengthArray<uchar> data(width * height);
+ for (int i = 0; i < data.size(); ++i)
+ data[i] = 0;
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, &data[0]);
+ }
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@ -287,7 +290,7 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph)
if (mask.format() == QImage::Format_RGB32) {
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits());
} else {
-#ifdef QT_OPENGL_ES2
+#ifdef QT_OPENGL_ES_2
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits());
#else
// glTexSubImage2D() might cause some garbage to appear in the texture if the mask width is
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index bbb98d0..f64b93c 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -377,7 +377,18 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
if (widgetPrivate->extraData()->glContext)
return;
- QGLContext *ctx = new QGLContext(surfaceFormat, widget);
+ QGLContext *ctx = NULL;
+
+ // For translucent top-level widgets we need alpha in the format.
+ if (widget->testAttribute(Qt::WA_TranslucentBackground)) {
+ QGLFormat modFormat(surfaceFormat);
+ modFormat.setSampleBuffers(false);
+ modFormat.setSamples(0);
+ modFormat.setAlpha(true);
+ ctx = new QGLContext(modFormat, widget);
+ } else
+ ctx = new QGLContext(surfaceFormat, widget);
+
ctx->create(qt_gl_share_widget()->context());
#ifndef QT_NO_EGL
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index b8e8bad..13156d7 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3210,8 +3210,7 @@ void QVGPaintEngine::drawTiledPixmap
(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
{
QBrush brush(state()->pen.color(), pixmap);
- QTransform xform;
- xform.translate(-s.x(), -s.y());
+ QTransform xform = QTransform::fromTranslate(r.x() - s.x(), r.y() - s.y());
brush.setTransform(xform);
fillRect(r, brush);
}
diff --git a/src/plugins/bearer/icd/proxyconf.cpp b/src/plugins/bearer/icd/proxyconf.cpp
index 37501fb..efe2da7 100644
--- a/src/plugins/bearer/icd/proxyconf.cpp
+++ b/src/plugins/bearer/icd/proxyconf.cpp
@@ -306,12 +306,12 @@ QList<QNetworkProxy> ProxyConfPrivate::flush(const QNetworkProxyQuery &query)
if (isHostExcluded(query.peerHostName()))
return result; // no proxy for this host
- if (mode == "auto") {
+ if (mode == QLatin1String("AUTO")) {
// TODO: pac currently not supported, fix me
return result;
}
- if (mode == "manual") {
+ if (mode == QLatin1String("MANUAL")) {
bool isHttps = false;
QString protocol = query.protocolTag().toLower();
diff --git a/src/plugins/graphicssystems/meego/dithering.cpp b/src/plugins/graphicssystems/meego/dithering.cpp
index 1a2e3fa..ca303a8 100644
--- a/src/plugins/graphicssystems/meego/dithering.cpp
+++ b/src/plugins/graphicssystems/meego/dithering.cpp
@@ -154,7 +154,10 @@ unsigned short* convertRGB32_to_RGB565(const unsigned char *in, int width, int h
// Add the diffusion for this pixel we stored in the accumulator.
// >> 7 because the values in accumulator are stored * 128
- component[c] += accumulator[c][x] >> 7;
+ if (x != 0 && x != (width - 1)) {
+ if (accumulator[c][x] >> 7 != 0)
+ component[c] += rand() % accumulator[c][x] >> 7;
+ }
// Make sure we're not over the boundaries.
CLAMP_256(component[c]);
@@ -172,10 +175,10 @@ unsigned short* convertRGB32_to_RGB565(const unsigned char *in, int width, int h
// Distribute the difference according to the matrix in the
// accumulation bufffer.
- ACCUMULATE(accumulator[c], x + 1, 0, width, diff * 7);
- ACCUMULATE(accumulator[c], x - 1, 1, width, diff * 3);
+ ACCUMULATE(accumulator[c], x + 1, 0, width, diff * 3);
+ ACCUMULATE(accumulator[c], x - 1, 1, width, diff * 5);
ACCUMULATE(accumulator[c], x, 1, width, diff * 5);
- ACCUMULATE(accumulator[c], x + 1, 1, width, diff * 1);
+ ACCUMULATE(accumulator[c], x + 1, 1, width, diff * 3);
}
// Write the newly produced pixel
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index 507f70b..4a86082 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -124,8 +124,10 @@ QPixmapData* QMeeGoGraphicsSystem::wrapPixmapData(QPixmapData *pmd)
void QMeeGoGraphicsSystem::setSurfaceFixedSize(int /*width*/, int /*height*/)
{
- if (QMeeGoGraphicsSystem::surfaceWasCreated)
+ if (QMeeGoGraphicsSystem::surfaceWasCreated) {
qWarning("Trying to set surface fixed size but surface already created!");
+ return;
+ }
#ifdef QT_WAS_PATCHED
QEglProperties *properties = new QEglProperties();
@@ -143,6 +145,11 @@ void QMeeGoGraphicsSystem::setSurfaceScaling(int x, int y, int width, int height
void QMeeGoGraphicsSystem::setTranslucent(bool translucent)
{
+ if (QMeeGoGraphicsSystem::surfaceWasCreated) {
+ qWarning("Trying to set translucency but surface already created!");
+ return;
+ }
+
QGLWindowSurface::surfaceFormat.setSampleBuffers(false);
QGLWindowSurface::surfaceFormat.setSamples(0);
QGLWindowSurface::surfaceFormat.setAlpha(translucent);
diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro
index 691fc80..5d7b61d 100644
--- a/src/plugins/phonon/mmf/mmf.pro
+++ b/src/plugins/phonon/mmf/mmf.pro
@@ -103,7 +103,7 @@ symbian {
exists($${EPOCROOT}epoc32/include/mw/downloadmgrclient.h) {
HEADERS += $$PHONON_MMF_DIR/download.h
SOURCES += $$PHONON_MMF_DIR/download.cpp
- LIBS += -ldownloadmgr
+ LIBS += -lDownloadMgr
DEFINES += PHONON_MMF_PROGRESSIVE_DOWNLOAD
}
}
@@ -125,7 +125,7 @@ symbian {
LIBS += -lmediaclientaudiostream # For CMdaAudioOutputStream
# These are for effects.
- LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
+ LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerbase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
# This is needed for having the .qtplugin file properly created on Symbian.
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 6a33fc3..bf4d99f 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -2725,7 +2725,7 @@ EXPORTS
?clearSelection@QTextCursor@@QAEXXZ @ 2724 NONAME ; void QTextCursor::clearSelection(void)
?clearSpans@QTableView@@QAEXXZ @ 2725 NONAME ; void QTableView::clearSpans(void)
?clearString@QLineControl@@ABE?AVQString@@II@Z @ 2726 NONAME ; class QString QLineControl::clearString(unsigned int, unsigned int) const
- ?clearSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 2727 NONAME ; void QGraphicsItemPrivate::clearSubFocus(class QGraphicsItem *)
+ ?clearSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 2727 NONAME ABSENT ; void QGraphicsItemPrivate::clearSubFocus(class QGraphicsItem *)
?clearUndo@QLineControl@@QAEXXZ @ 2728 NONAME ; void QLineControl::clearUndo(void)
?click@QAbstractButton@@QAEXXZ @ 2729 NONAME ; void QAbstractButton::click(void)
?clicked@QAbstractButton@@IAEX_N@Z @ 2730 NONAME ; void QAbstractButton::clicked(bool)
@@ -9914,7 +9914,7 @@ EXPORTS
?setStyleSheet@QWidget@@QAEXABVQString@@@Z @ 9913 NONAME ; void QWidget::setStyleSheet(class QString const &)
?setStyleStrategy@QFont@@QAEXW4StyleStrategy@1@@Z @ 9914 NONAME ; void QFont::setStyleStrategy(enum QFont::StyleStrategy)
?setStyle_helper@QWidgetPrivate@@QAEXPAVQStyle@@_N1@Z @ 9915 NONAME ; void QWidgetPrivate::setStyle_helper(class QStyle *, bool, bool)
- ?setSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9916 NONAME ; void QGraphicsItemPrivate::setSubFocus(class QGraphicsItem *)
+ ?setSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9916 NONAME ABSENT ; void QGraphicsItemPrivate::setSubFocus(class QGraphicsItem *)
?setSubTitle@QWizardPage@@QAEXABVQString@@@Z @ 9917 NONAME ; void QWizardPage::setSubTitle(class QString const &)
?setSubTitleFormat@QWizard@@QAEXW4TextFormat@Qt@@@Z @ 9918 NONAME ; void QWizard::setSubTitleFormat(enum Qt::TextFormat)
?setSubmitPolicy@QDataWidgetMapper@@QAEXW4SubmitPolicy@1@@Z @ 9919 NONAME ; void QDataWidgetMapper::setSubmitPolicy(enum QDataWidgetMapper::SubmitPolicy)
@@ -12905,4 +12905,7 @@ EXPORTS
?reactivateDeferredActiveObjects@QEventDispatcherS60@@UAEXXZ @ 12904 NONAME ; void QEventDispatcherS60::reactivateDeferredActiveObjects(void)
?userData@QStaticTextItem@@QBEPAVQStaticTextUserData@@XZ @ 12905 NONAME ; class QStaticTextUserData * QStaticTextItem::userData(void) const
?populate@QTextureGlyphCache@@QAE_NPAVQFontEngine@@HPBIPBUQFixedPoint@@@Z @ 12906 NONAME ; bool QTextureGlyphCache::populate(class QFontEngine *, int, unsigned int const *, struct QFixedPoint const *)
+ ?resetCursorBlinkTimer@QLineControl@@QAEXXZ @ 12907 NONAME ; void QLineControl::resetCursorBlinkTimer(void)
+ ?setSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@0@Z @ 12908 NONAME ; void QGraphicsItemPrivate::setSubFocus(class QGraphicsItem *, class QGraphicsItem *)
+ ?clearSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@0@Z @ 12909 NONAME ; void QGraphicsItemPrivate::clearSubFocus(class QGraphicsItem *, class QGraphicsItem *)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 54768a1..48976a1 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -4658,11 +4658,11 @@ EXPORTS
_ZN20QGraphicsEllipseItemD1Ev @ 4657 NONAME
_ZN20QGraphicsEllipseItemD2Ev @ 4658 NONAME
_ZN20QGraphicsItemPrivate11removeChildEP13QGraphicsItem @ 4659 NONAME
- _ZN20QGraphicsItemPrivate11setSubFocusEP13QGraphicsItem @ 4660 NONAME
+ _ZN20QGraphicsItemPrivate11setSubFocusEP13QGraphicsItem @ 4660 NONAME ABSENT
_ZN20QGraphicsItemPrivate12remapItemPosEP6QEventP13QGraphicsItem @ 4661 NONAME
_ZN20QGraphicsItemPrivate12resolveDepthEv @ 4662 NONAME
_ZN20QGraphicsItemPrivate12setPosHelperERK7QPointF @ 4663 NONAME
- _ZN20QGraphicsItemPrivate13clearSubFocusEP13QGraphicsItem @ 4664 NONAME
+ _ZN20QGraphicsItemPrivate13clearSubFocusEP13QGraphicsItem @ 4664 NONAME ABSENT
_ZN20QGraphicsItemPrivate14setFocusHelperEN2Qt11FocusReasonEb @ 4665 NONAME ABSENT
_ZN20QGraphicsItemPrivate15resetFocusProxyEv @ 4666 NONAME
_ZN20QGraphicsItemPrivate16setEnabledHelperEbbb @ 4667 NONAME
@@ -12105,4 +12105,7 @@ EXPORTS
_ZN15QStaticTextItemD1Ev @ 12104 NONAME
_ZN15QStaticTextItemD2Ev @ 12105 NONAME
_ZN19QEventDispatcherS6031reactivateDeferredActiveObjectsEv @ 12106 NONAME
+ _ZN20QGraphicsItemPrivate11setSubFocusEP13QGraphicsItemS1_ @ 12107 NONAME
+ _ZN20QGraphicsItemPrivate13clearSubFocusEP13QGraphicsItemS1_ @ 12108 NONAME
+ _ZN12QLineControl21resetCursorBlinkTimerEv @ 12109 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index ff67bcf..5a435cd 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -132,7 +132,7 @@ symbian: {
codecs_plugins.path = c:$$QT_PLUGINS_BASE_DIR/codecs
contains(QT_CONFIG, phonon-backend) {
- phonon_backend_plugins.sources += $$QMAKE_LIBDIR_QT/phonon_mmf$${QT_LIBINFIX}.dll
+ phonon_backend_plugins.sources += $$QT_BUILD_TREE/plugins/phonon_backend/phonon_mmf$${QT_LIBINFIX}.dll
phonon_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/phonon_backend
DEPLOYMENT += phonon_backend_plugins