summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-19 10:06:55 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-19 10:10:24 (GMT)
commit83525ca84ba7adadaeeb65ffa55a6d0f2630caaa (patch)
tree83a26fc42ba3811baf38776d266d4bf600684715 /src/plugins
parentb115770cc3bba68740a6848c7ccaed932399aca9 (diff)
parent4082e4711a1c54947429b15504caf778c6da22d0 (diff)
downloadQt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.zip
Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.tar.gz
Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/gui/kernel/qgesturemanager.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf Changes in qmake/generators/win32/msvc_objectmodel.cpp come from commit 4ba3dadcae97bfde6216c32cfa339f8f0e0253c7
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp6
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp41
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h6
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp42
4 files changed, 64 insertions, 31 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index c5a39e1..53a5b4d 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -1151,10 +1151,10 @@ void QNetworkSessionPrivateImpl::RunL()
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::InvalidConfigurationError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- Cancel();
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
+ Cancel();
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
case KErrCancel: // Connection attempt cancelled
@@ -1173,10 +1173,10 @@ void QNetworkSessionPrivateImpl::RunL()
iError = QNetworkSession::UnknownSessionError;
}
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- Cancel();
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
+ Cancel();
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
}
@@ -1268,10 +1268,10 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::SessionAbortedError;
emit QNetworkSessionPrivate::error(iError);
- Cancel();
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
+ Cancel();
// Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
iHandleStateNotificationsFromManager = true;
emitSessionClosed = true; // Emit SessionClosed after state change has been reported
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index b4dfc4d..33fa508 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -135,10 +135,9 @@ void SymbianEngine::initialize()
updateConfigurations();
updateStatesToSnaps();
- updateAvailableAccessPoints(); // On first time updates synchronously (without WLAN scans)
+ updateAvailableAccessPoints(); // On first time updates (without WLAN scans)
// Start monitoring IAP and/or SNAP changes in Symbian CommsDB
startCommsDatabaseNotifications();
- iFirstUpdate = false;
}
SymbianEngine::~SymbianEngine()
@@ -790,6 +789,12 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn
mutex.unlock();
emit updateCompleted();
mutex.lock();
+ } else {
+ iFirstUpdate = false;
+ if (iScanInQueue) {
+ iScanInQueue = EFalse;
+ updateAvailableAccessPoints();
+ }
}
}
@@ -976,7 +981,7 @@ void SymbianEngine::RunL()
QMutexLocker locker(&mutex);
if (iStatus != KErrCancel) {
- // By default, start relistening notifications. Stop only if interesting event occurred.
+ // By default, start relistening notifications. Stop only if interesting event occured.
iWaitingCommsDatabaseNotifications = true;
RDbNotifier::TEvent event = STATIC_CAST(RDbNotifier::TEvent, iStatus.Int());
switch (event) {
@@ -1356,27 +1361,39 @@ AccessPointsAvailabilityScanner::~AccessPointsAvailabilityScanner()
void AccessPointsAvailabilityScanner::DoCancel()
{
iConnectionMonitor.CancelAsyncRequest(EConnMonGetPckgAttribute);
+ iScanActive = EFalse;
+ iOwner.iScanInQueue = EFalse;
}
void AccessPointsAvailabilityScanner::StartScanning()
{
- if (iOwner.iFirstUpdate) {
- // On first update (the mgr is being instantiated) update only those bearers who
- // don't need time-consuming scans (WLAN).
- // Note: EBearerIdWCDMA covers also GPRS bearer
- iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus);
+ if (!iScanActive) {
+ iScanActive = ETrue;
+ if (iOwner.iFirstUpdate) {
+ // On first update (the mgr is being instantiated) update only those bearers who
+ // don't need time-consuming scans (WLAN).
+ // Note: EBearerIdWCDMA covers also GPRS bearer
+ iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus);
+ } else {
+ iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus);
+ }
+
+ if (!IsActive()) {
+ SetActive();
+ }
} else {
- iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus);
+ // Queue scan for getting WLAN info after first request returns
+ if (iOwner.iFirstUpdate) {
+ iOwner.iScanInQueue = ETrue;
+ }
}
-
- if (!IsActive())
- SetActive();
}
void AccessPointsAvailabilityScanner::RunL()
{
QMutexLocker locker(&iOwner.mutex);
+ iScanActive = EFalse;
if (iStatus.Int() != KErrNone) {
iIapBuf().iCount = 0;
QT_TRYCATCH_LEAVING(iOwner.accessPointScanningReady(false,iIapBuf()));
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index 7c1076e..337d4d1 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -207,6 +207,7 @@ private: // Data
TBool iInitOk;
TBool iUpdateGoingOn;
TBool iUpdatePending;
+ TBool iScanInQueue;
AccessPointsAvailabilityScanner* ipAccessPointsAvailabilityScanner;
@@ -234,9 +235,10 @@ protected: // From CActive
void DoCancel();
private: // Data
- SymbianEngine& iOwner;
+ SymbianEngine& iOwner;
RConnectionMonitor& iConnectionMonitor;
- TConnMonIapInfoBuf iIapBuf;
+ TConnMonIapInfoBuf iIapBuf;
+ TBool iScanActive;
};
QT_END_NAMESPACE
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index c16a242..ceed7ae 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -68,6 +68,15 @@ public:
Matrix_BlitsUnsupported = (Matrix_NegativeScale|Matrix_RectsUnsupported)
};
+ inline static uint getTransformationType(const QTransform &transform)
+ {
+ int ret = transform.type();
+ if (qMin(transform.m11(), transform.m22()) < 0) {
+ ret |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale;
+ }
+ return ret;
+ }
+
enum CompositionModeStatus {
PorterDuff_None = 0x0,
PorterDuff_Supported = 0x1,
@@ -99,7 +108,7 @@ public:
inline bool isSimpleBrush(const QBrush &brush) const;
- void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos);
+ void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos, const QTransform &pixmapTransform);
void blit(const QRectF &dest, IDirectFBSurface *surface, const QRectF &src);
inline bool supportsStretchBlit() const;
@@ -707,7 +716,8 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r,
const QPixmap pix(data);
QRasterPaintEngine::drawTiledPixmap(r, pix, offset);
} else {
- CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset));
+ QTransform transform(state()->matrix);
+ CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset, transform));
}
}
@@ -827,9 +837,14 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
return; }
case Qt::TexturePattern: {
+ const QPointF &brushOrigin = state()->brushOrigin;
+ const QTransform stateTransform = state()->matrix;
+ QTransform transform(stateTransform);
+ transform.translate(brushOrigin.x(), brushOrigin.y());
+ transform = brush.transform() * transform;
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)
- || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
- || (!d->supportsStretchBlit() && state()->matrix.isScaling())) {
+ || (QDirectFBPaintEnginePrivate::getTransformationType(transform) & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
+ || (!d->supportsStretchBlit() && transform.isScaling())) {
break;
}
@@ -837,7 +852,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
if (texture.pixmapData()->classId() != QPixmapData::DirectFBClass)
break;
- CLIPPED_PAINT(d->drawTiledPixmap(rect, texture, rect.topLeft() - state()->brushOrigin));
+ CLIPPED_PAINT(d->drawTiledPixmap(stateTransform.mapRect(rect), texture, rect.topLeft() - brushOrigin, transform));
return; }
default:
break;
@@ -948,10 +963,7 @@ void QDirectFBPaintEnginePrivate::unlock(QDirectFBPaintDevice *device)
void QDirectFBPaintEnginePrivate::setTransform(const QTransform &transform)
{
- transformationType = transform.type();
- if (qMin(transform.m11(), transform.m22()) < 0) {
- transformationType |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale;
- }
+ transformationType = getTransformationType(transform);
setPen(q->state()->pen);
}
@@ -1153,10 +1165,12 @@ static inline qreal fixCoord(qreal rect_pos, qreal pixmapSize, qreal offset)
return pos;
}
-void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &off)
+void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap,
+ const QPointF &off, const QTransform &pixmapTransform)
{
- Q_ASSERT(!(transformationType & Matrix_BlitsUnsupported));
const QTransform &transform = q->state()->matrix;
+ Q_ASSERT(!(getTransformationType(transform) & Matrix_BlitsUnsupported) &&
+ !(getTransformationType(pixmapTransform) & Matrix_BlitsUnsupported));
const QRect destinationRect = transform.mapRect(dest).toRect().normalized();
QRect newClip = destinationRect;
if (!currentClip.isEmpty())
@@ -1173,7 +1187,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix
};
surface->SetClip(surface, &clip);
- QPointF offset = off;
+ QPointF offset = pixmapTransform.inverted().map(off);
Q_ASSERT(transform.type() <= QTransform::TxScale);
QPixmapData *data = pixmap.pixmapData();
Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
@@ -1187,13 +1201,13 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix
prepareForBlit(blitFlags);
QDirectFBPaintEnginePrivate::unlock(dfbData);
const QSize pixmapSize = dfbData->size();
- if (transform.isScaling()) {
+ if (transform.isScaling() || pixmapTransform.isScaling()) {
Q_ASSERT(supportsStretchBlit());
Q_ASSERT(qMin(transform.m11(), transform.m22()) >= 0);
offset.rx() *= transform.m11();
offset.ry() *= transform.m22();
- const QSizeF mappedSize(pixmapSize.width() * transform.m11(), pixmapSize.height() * transform.m22());
+ const QSizeF mappedSize(pixmapSize.width() * pixmapTransform.m11(), pixmapSize.height() * pixmapTransform.m22());
qreal y = fixCoord(destinationRect.y(), mappedSize.height(), offset.y());
const qreal startX = fixCoord(destinationRect.x(), mappedSize.width(), offset.x());
while (y <= destinationRect.bottom()) {