aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-09-28 16:43:20 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-29 13:24:11 +0200
commit2ccd293d722a235bf0fe04fcef187d9073422ebe (patch)
tree7f0455dda217923f37ea9e0c7e274d62d822716b
parent489c6ea0ca9cb3cf907832877b6d3250028a7820 (diff)
Declarative: Compile on Windows.
- Remove UTF8 special characters from comments in qsgcontext2d.cpp. Change-Id: I7ba71f7db72d6d31dec115483ff785a0ce79d0e2 Reviewed-on: http://codereview.qt-project.org/5738 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
-rw-r--r--src/declarative/items/context2d/qsgcontext2d.cpp20
-rw-r--r--src/declarative/items/context2d/qsgcontext2dtexture.cpp2
-rw-r--r--src/declarative/items/context2d/qsgcontext2dtexture_p.h2
-rw-r--r--src/declarative/particles/qsgparticlegroup_p.h1
-rw-r--r--src/declarative/particles/qsgparticlepainter.cpp2
5 files changed, 14 insertions, 13 deletions
diff --git a/src/declarative/items/context2d/qsgcontext2d.cpp b/src/declarative/items/context2d/qsgcontext2d.cpp
index e98c614754..205809861b 100644
--- a/src/declarative/items/context2d/qsgcontext2d.cpp
+++ b/src/declarative/items/context2d/qsgcontext2d.cpp
@@ -332,9 +332,8 @@ public:
v8::Persistent<v8::Function> constructorPixelArray;
v8::Persistent<v8::Function> constructorImageData;
};
-V8_DEFINE_EXTENSION(QSGContext2DEngineData, engineData);
-
+V8_DEFINE_EXTENSION(QSGContext2DEngineData, engineData)
class QV8Context2DResource : public QV8ObjectResource
{
@@ -2639,7 +2638,6 @@ v8::Handle<v8::Value> ctx2d_pixelArray_indexed_set(uint32_t index, v8::Local<v8:
const int v = value->Uint32Value();
if (r && index > 0 && index < r->image.width() * r->image.height() * 4 && v > 0 && v <= 255) {
const int w = r->image.width();
- const int h = r->image.height();
const int row = (index / 4) / w;
const int col = (index / 4) % w;
@@ -3082,14 +3080,14 @@ int baseLineOffset(QSGContext2D::TextBaseLineType value, const QFontMetrics &met
{
int offset = 0;
switch (value) {
- case QSGContext2D::QSGContext2D::Top:
+ case QSGContext2D::Top:
break;
- case QSGContext2D::QSGContext2D::Alphabetic:
- case QSGContext2D::QSGContext2D::Middle:
- case QSGContext2D::QSGContext2D::Hanging:
+ case QSGContext2D::Alphabetic:
+ case QSGContext2D::Middle:
+ case QSGContext2D::Hanging:
offset = metrics.ascent();
break;
- case QSGContext2D::QSGContext2D::Bottom:
+ case QSGContext2D::Bottom:
offset = metrics.height();
break;
}
@@ -3104,12 +3102,12 @@ static int textAlignOffset(QSGContext2D::TextAlignType value, const QFontMetrics
else if (value == QSGContext2D::End)
value = QGuiApplication::layoutDirection() == Qt::LeftToRight ? QSGContext2D::Right: QSGContext2D::Left;
switch (value) {
- case QSGContext2D::QSGContext2D::Center:
+ case QSGContext2D::Center:
offset = metrics.width(text)/2;
break;
- case QSGContext2D::QSGContext2D::Right:
+ case QSGContext2D::Right:
offset = metrics.width(text);
- case QSGContext2D::QSGContext2D::Left:
+ case QSGContext2D::Left:
default:
break;
}
diff --git a/src/declarative/items/context2d/qsgcontext2dtexture.cpp b/src/declarative/items/context2d/qsgcontext2dtexture.cpp
index 4833c1301c..3f7692c0ba 100644
--- a/src/declarative/items/context2d/qsgcontext2dtexture.cpp
+++ b/src/declarative/items/context2d/qsgcontext2dtexture.cpp
@@ -155,7 +155,9 @@ bool QSGContext2DTexture::setCanvasWindow(const QRect& r)
{
if (m_canvasWindow != r) {
m_canvasWindow = r;
+ return true;
}
+ return false;
}
bool QSGContext2DTexture::setDirtyRect(const QRect &r)
diff --git a/src/declarative/items/context2d/qsgcontext2dtexture_p.h b/src/declarative/items/context2d/qsgcontext2dtexture_p.h
index 0fb315497a..c91d3fb2ba 100644
--- a/src/declarative/items/context2d/qsgcontext2dtexture_p.h
+++ b/src/declarative/items/context2d/qsgcontext2dtexture_p.h
@@ -100,7 +100,7 @@ public Q_SLOTS:
protected:
void paintWithoutTiles();
- virtual QPaintDevice* beginPainting() {m_painting = true;}
+ virtual QPaintDevice* beginPainting() {m_painting = true; return 0; }
virtual void endPainting() {m_painting = false;}
virtual QSGContext2DTile* createTile() const = 0;
virtual void compositeTile(QSGContext2DTile* tile) = 0;
diff --git a/src/declarative/particles/qsgparticlegroup_p.h b/src/declarative/particles/qsgparticlegroup_p.h
index d0ac41ca79..a809b63e8a 100644
--- a/src/declarative/particles/qsgparticlegroup_p.h
+++ b/src/declarative/particles/qsgparticlegroup_p.h
@@ -57,6 +57,7 @@ class QSGParticleGroup : public QSGStochasticState, public QDeclarativeParserSta
//Intercept children requests and assign to the group & system
Q_PROPERTY(QDeclarativeListProperty<QObject> particleChildren READ particleChildren DESIGNABLE false)//### Hidden property for in-state system definitions - ought not to be used in actual "Sprite" states
Q_CLASSINFO("DefaultProperty", "particleChildren")
+ Q_INTERFACES(QDeclarativeParserStatus)
public:
explicit QSGParticleGroup(QObject* parent = 0);
diff --git a/src/declarative/particles/qsgparticlepainter.cpp b/src/declarative/particles/qsgparticlepainter.cpp
index 53f2421b9c..fe689ee4f7 100644
--- a/src/declarative/particles/qsgparticlepainter.cpp
+++ b/src/declarative/particles/qsgparticlepainter.cpp
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
*/
QSGParticlePainter::QSGParticlePainter(QSGItem *parent) :
QSGItem(parent),
- m_system(0), m_count(0), m_sentinel(new QSGParticleData(0)), m_pleaseReset(true)
+ m_system(0), m_count(0), m_pleaseReset(true), m_sentinel(new QSGParticleData(0))
{
}