Declarative: Compile on Windows.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Wed, 28 Sep 2011 14:43:20 +0000 (16:43 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Sep 2011 11:24:11 +0000 (13:24 +0200)
- 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>
src/declarative/items/context2d/qsgcontext2d.cpp
src/declarative/items/context2d/qsgcontext2dtexture.cpp
src/declarative/items/context2d/qsgcontext2dtexture_p.h
src/declarative/particles/qsgparticlegroup_p.h
src/declarative/particles/qsgparticlepainter.cpp

index e98c614..2058098 100644 (file)
@@ -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;
     }
index 4833c13..3f7692c 100644 (file)
@@ -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)
index 0fb3154..c91d3fb 100644 (file)
@@ -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;
index d0ac41c..a809b63 100644 (file)
@@ -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);
index 53f2421..fe689ee 100644 (file)
@@ -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))
 {
 }