summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-16 01:19:03 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-16 01:19:03 (GMT)
commitb464dba6efe6593ed6a21511f999868dc78a3e9d (patch)
treec9b762af036e5d41ac2262767ccf9f13b298deea /src
parentf7c07892e927a6420bb64a7011312f0a4a5a1fc9 (diff)
parentade18bab3a2c4c877baa9be2a0012d670dafb64a (diff)
downloadQt-b464dba6efe6593ed6a21511f999868dc78a3e9d.zip
Qt-b464dba6efe6593ed6a21511f999868dc78a3e9d.tar.gz
Qt-b464dba6efe6593ed6a21511f999868dc78a3e9d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp187
4 files changed, 91 insertions, 104 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index a747706..2fca09d 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -2392,6 +2392,8 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
d->actions = &data->actions;
} else {
delete data;
+ d->va->setFromSourcedValue(0); //clear previous data
+ d->va->setAnimValue(0, QAbstractAnimation::DeleteWhenStopped); //clear previous data
d->actions = 0;
}
}
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 9e2b85e..ae4d257 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -653,6 +653,8 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
// is the reply associated the currently processing of this channel?
if (channels[i].reply == reply) {
channels[i].reply = 0;
+ channels[i].request = QHttpNetworkRequest();
+ channels[i].resendCurrent = false;
if (!reply->isFinished() && !channels[i].alreadyPipelinedRequests.isEmpty()) {
// the reply had to be prematurely removed, e.g. it was not finished
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index d3576dd..6437f6f 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -647,8 +647,10 @@ void QHttpNetworkConnectionChannel::allDone()
// finished request.
// Note that this may trigger a segfault at some other point. But then we can fix the underlying
// problem.
- if (!resendCurrent)
+ if (!resendCurrent) {
+ request = QHttpNetworkRequest();
reply = 0;
+ }
// move next from pipeline to current request
if (!alreadyPipelinedRequests.isEmpty()) {
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index e4a0135..d5f0d42 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -167,7 +167,6 @@ struct CachedImage
static QCache<qint64, CachedImage> imageCache(4*1024*1024); // 4 MB
#endif
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS || defined QT_DEBUG
#define VOID_ARG() static_cast<bool>(false)
enum PaintOperation {
DRAW_RECTS = 0x0001, DRAW_LINES = 0x0002, DRAW_IMAGE = 0x0004,
@@ -178,88 +177,81 @@ enum PaintOperation {
DRAW_STATICTEXT = 0x8000, ALL = 0xffff
};
-#ifdef QT_DEBUG
-static void initRasterFallbacksMasks(int *warningMask, int *disableMask)
-{
- struct {
- const char *name;
- PaintOperation operation;
- } const operations[] = {
- { "DRAW_RECTS", DRAW_RECTS },
- { "DRAW_LINES", DRAW_LINES },
- { "DRAW_IMAGE", DRAW_IMAGE },
- { "DRAW_PIXMAP", DRAW_PIXMAP },
- { "DRAW_TILED_PIXMAP", DRAW_TILED_PIXMAP },
- { "STROKE_PATH", STROKE_PATH },
- { "DRAW_PATH", DRAW_PATH },
- { "DRAW_POINTS", DRAW_POINTS },
- { "DRAW_ELLIPSE", DRAW_ELLIPSE },
- { "DRAW_POLYGON", DRAW_POLYGON },
- { "DRAW_TEXT", DRAW_TEXT },
- { "FILL_PATH", FILL_PATH },
- { "FILL_RECT", FILL_RECT },
- { "DRAW_COLORSPANS", DRAW_COLORSPANS },
- { "DRAW_ROUNDED_RECT", DRAW_ROUNDED_RECT },
- { "ALL", ALL },
- { 0, ALL }
- };
-
- QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
- QString::SkipEmptyParts);
- QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
- QString::SkipEmptyParts);
- *warningMask = 0;
- *disableMask = 0;
- if (!warning.isEmpty() || !disable.isEmpty()) {
- for (int i=0; operations[i].name; ++i) {
- const QString name = QString::fromLatin1(operations[i].name);
- int idx = warning.indexOf(name);
- if (idx != -1) {
- *warningMask |= operations[i].operation;
- warning.erase(warning.begin() + idx);
- }
- idx = disable.indexOf(name);
- if (idx != -1) {
- *disableMask |= operations[i].operation;
- disable.erase(disable.begin() + idx);
- }
- }
- }
- if (!warning.isEmpty()) {
- qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
- qPrintable(warning.join(QLatin1String("|"))));
- }
- if (!disable.isEmpty()) {
- qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
- qPrintable(disable.join(QLatin1String("|"))));
- }
-
-}
-#endif
-
-static inline int rasterFallbacksMask(bool warn)
+enum { RasterWarn = 1, RasterDisable = 2 };
+static inline uint rasterFallbacksMask(PaintOperation op)
{
+ uint ret = 0;
#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
- if (warn)
- return QT_DIRECTFB_WARN_ON_RASTERFALLBACKS;
+ if (op & QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)
+ ret |= RasterWarn;
#endif
#ifdef QT_DIRECTFB_DISABLE_RASTERFALLBACKS
- if (!warn)
- return QT_DIRECTFB_DISABLE_RASTERFALLBACKS;
+ if (op & QT_DIRECTFB_DISABLE_RASTERFALLBACKS)
+ ret |= RasterDisable;
#endif
-#ifndef QT_DEBUG
- return 0;
-#else
- static int warnMask = -1;
+ static int warningMask = -1;
static int disableMask = -1;
- if (warnMask == -1)
- initRasterFallbacksMasks(&warnMask, &disableMask);
- return warn ? warnMask : disableMask;
-#endif
+ if (warningMask < 0) {
+ struct {
+ const char *name;
+ PaintOperation operation;
+ } const operations[] = {
+ { "DRAW_RECTS", DRAW_RECTS },
+ { "DRAW_LINES", DRAW_LINES },
+ { "DRAW_IMAGE", DRAW_IMAGE },
+ { "DRAW_PIXMAP", DRAW_PIXMAP },
+ { "DRAW_TILED_PIXMAP", DRAW_TILED_PIXMAP },
+ { "STROKE_PATH", STROKE_PATH },
+ { "DRAW_PATH", DRAW_PATH },
+ { "DRAW_POINTS", DRAW_POINTS },
+ { "DRAW_ELLIPSE", DRAW_ELLIPSE },
+ { "DRAW_POLYGON", DRAW_POLYGON },
+ { "DRAW_TEXT", DRAW_TEXT },
+ { "FILL_PATH", FILL_PATH },
+ { "FILL_RECT", FILL_RECT },
+ { "DRAW_COLORSPANS", DRAW_COLORSPANS },
+ { "DRAW_ROUNDED_RECT", DRAW_ROUNDED_RECT },
+ { "ALL", ALL },
+ { 0, ALL }
+ };
+
+ QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
+ QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
+ warningMask = 0;
+ disableMask = 0;
+ if (!warning.isEmpty() || !disable.isEmpty()) {
+ for (int i=0; operations[i].name; ++i) {
+ const QString name = QString::fromLatin1(operations[i].name);
+ int idx = warning.indexOf(name);
+ if (idx != -1) {
+ warningMask |= operations[i].operation;
+ warning.erase(warning.begin() + idx);
+ }
+ idx = disable.indexOf(name);
+ if (idx != -1) {
+ disableMask |= operations[i].operation;
+ disable.erase(disable.begin() + idx);
+ }
+ }
+ }
+ if (!warning.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(warning.join(QLatin1String("|"))));
+ }
+ if (!disable.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(disable.join(QLatin1String("|"))));
+ }
+ }
+ if (op & warningMask)
+ ret |= RasterWarn;
+ if (op & disableMask)
+ ret |= RasterDisable;
+ return ret;
}
-#endif
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DEBUG
template <typename device, typename T1, typename T2, typename T3>
static void rasterFallbackWarn(const char *msg, const char *func, const device *dev,
uint transformationType, bool simplePen,
@@ -267,16 +259,14 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device *
const char *nameOne, const T1 &one,
const char *nameTwo, const T2 &two,
const char *nameThree, const T3 &three);
-#endif
-#if defined QT_DEBUG || (defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS)
#define RASTERFALLBACK(op, one, two, three) \
{ \
- const bool disable = op & rasterFallbacksMask(false); \
- if (op & rasterFallbacksMask(true)) \
- rasterFallbackWarn(disable \
- ? "Disabled raster engine operation" \
- : "Falling back to raster engine for", \
+ static const uint rasterFallbacks = rasterFallbacksMask(op); \
+ switch (rasterFallbacks) { \
+ case 0: break; \
+ case RasterWarn: \
+ rasterFallbackWarn("Falling back to raster engine for", \
__FUNCTION__, \
state()->painter->device(), \
d_func()->transformationType, \
@@ -284,26 +274,20 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device *
d_func()->clipType, \
d_func()->compositionModeStatus, \
#one, one, #two, two, #three, three); \
- if (disable) \
+ break; \
+ case RasterDisable|RasterWarn: \
+ rasterFallbackWarn("Disabled raster engine operation", \
+ __FUNCTION__, \
+ state()->painter->device(), \
+ d_func()->transformationType, \
+ d_func()->simplePen, \
+ d_func()->clipType, \
+ d_func()->compositionModeStatus, \
+ #one, one, #two, two, #three, three); \
+ case RasterDisable: \
return; \
+ } \
}
-#elif defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
-#define RASTERFALLBACK(op, one, two, three) \
- if (op & rasterFallbacksMask(false)) \
- return;
-#elif defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
-#define RASTERFALLBACK(op, one, two, three) \
- if (op & rasterFallbacksMask(true)) \
- rasterFallbackWarn("Falling back to raster engine for", \
- __FUNCTION__, state()->painter->device(), \
- d_func()->transformationType, \
- d_func()->simplePen, \
- d_func()->clipType, \
- d_func()->compositionModeStatus, \
- #one, one, #two, two, #three, three);
-#else
-#define RASTERFALLBACK(op, one, two, three)
-#endif
template <class T>
static inline void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface);
@@ -1362,7 +1346,6 @@ static inline void drawRects(const T *rects, int n, const QTransform &transform,
}
}
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DEBUG
template <typename T> inline const T *ptr(const T &t) { return &t; }
template <> inline const bool* ptr<bool>(const bool &) { return 0; }
template <typename device, typename T1, typename T2, typename T3>
@@ -1403,8 +1386,6 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device *
qWarning("%s", qPrintable(out));
}
-#endif // QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
-
QT_END_NAMESPACE
#endif // QT_NO_QWS_DIRECTFB