diff --git a/src/declarative/items/qsgcontext2d.cpp b/src/declarative/items/qsgcontext2d.cpp index 2e60de189fd1ddcea5eafe65cde7a5649da4c0ad..9dddc995575bff97b1f55b19b8edc6f0537fd923 100644 --- a/src/declarative/items/qsgcontext2d.cpp +++ b/src/declarative/items/qsgcontext2d.cpp @@ -786,12 +786,15 @@ static QScriptValue ctx2d_isPointInPath(QScriptContext *c, QScriptEngine *e) // text static QScriptValue ctx2d_font(QScriptContext *c, QScriptEngine *e) { + return QScriptValue(); } static QScriptValue ctx2d_textAlign(QScriptContext *c, QScriptEngine *e) { + return QScriptValue(); } static QScriptValue ctx2d_textBaseline(QScriptContext *c, QScriptEngine *e) { + return QScriptValue(); } static QScriptValue ctx2d_fillText(QScriptContext *c, QScriptEngine *e) { @@ -846,53 +849,61 @@ static QScriptValue ctx2d_drawImage(QScriptContext *c, QScriptEngine *e) static QScriptValue ctx2d_createImageData(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } static QScriptValue ctx2d_getImageData(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } static QScriptValue ctx2d_putImageData(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } //Image Data Interface static QScriptValue ctx2d_imageData_data(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } static QScriptValue ctx2d_imageData_height(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } static QScriptValue ctx2d_imageData_width(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } //CanvasPixelArray interface static QScriptValue ctx2d_pixelArray_length(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } //getter/setter by index how to? static QScriptValue ctx2d_pixelArray(QScriptContext *c, QScriptEngine *e) { //#TODO + return QScriptValue(); } //CanvasGradient interface static QScriptValue ctx2d_gradient_addColorStop(QScriptContext *c, QScriptEngine *e) { //#TODO - + return QScriptValue(); } //TextMetrics static QScriptValue ctx2d_textMetrics_width(QScriptContext *c, QScriptEngine *e) { //#TODO - + return QScriptValue(); } diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp index 00114920534cd112d7740c5f24f0807435cee195..e216dd469997590d29df2483a722ab962469cc63 100644 --- a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp +++ b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp @@ -941,7 +941,7 @@ void QSGDistanceFieldGlyphCache::updateCache() QFile file(key); if (file.open(QFile::ReadOnly)) { int fileSize = file.size(); - int dim = sqrt(fileSize); + int dim = sqrt(float(fileSize)); QByteArray blob = file.readAll(); glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, dim, dim, GL_ALPHA, GL_UNSIGNED_BYTE, blob.constData()); continue;