From 95ef9a3d7eb851d47dabe3248672ea03e5faa0ce Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 29 Oct 2010 15:26:50 +1000 Subject: Regression: horizontal alignment bug with single line text Task-number: QTBUG-14841 --- src/declarative/graphicsitems/qdeclarativetext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 865af2d..03c9765 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -292,12 +292,12 @@ QSize QDeclarativeTextPrivate::setupTextLayout() qreal lineWidth = 0; //set manual width - if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid()) + if (q->widthValid()) lineWidth = q->width(); QTextOption textOption = layout.textOption(); textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); - textOption.setAlignment((Qt::Alignment)hAlign); + textOption.setAlignment(Qt::Alignment(hAlign)); layout.setTextOption(textOption); layout.beginLayout(); @@ -306,7 +306,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout() if (!line.isValid()) break; - if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid()) { + if (q->widthValid()) { line.setLineWidth(lineWidth); line.setPosition(QPointF(0, height)); height += line.height(); -- cgit v0.12 From 3e6349e6b23d1ac5a8991370f0866ebd95556111 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 29 Oct 2010 15:58:48 +1000 Subject: Update visual tests for Mac Task-number: QTBUG-14792 --- .../qdeclarativetext/font/data-MAC/plaintext.0.png | Bin 0 -> 98050 bytes .../qdeclarativetext/font/data-MAC/plaintext.qml | 11 +++++++++++ .../qdeclarativetext/font/data-MAC/richtext.0.png | Bin 0 -> 125068 bytes .../qdeclarativetext/font/data-MAC/richtext.qml | 11 +++++++++++ 4 files changed, 22 insertions(+) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.0.png new file mode 100644 index 0000000..6c610ea Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml new file mode 100644 index 0000000..fdf2310 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "plaintext.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.0.png new file mode 100644 index 0000000..c4c56f3 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml new file mode 100644 index 0000000..3da391d --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "richtext.0.png" + } +} -- cgit v0.12 From 5ad00389fd411992b042c07990dd681018f58c36 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 29 Oct 2010 14:10:11 +1000 Subject: Remove unnecessary QML import project dependency to Symbian deployment pri file used by Qt demos Task-number: QT-4197 Reviewed-by: Jason Barron * breaks compilation of releases that omit Qt demos directory * qt import plugins have different deployment configuration than demo applications * declarative import plugins already get their symbian-related settings from src\imports\qimportbase.pri that is basically a copy from qpluginbase.pri written for plugins --- src/imports/folderlistmodel/folderlistmodel.pro | 1 - src/imports/gestures/gestures.pro | 1 - src/imports/particles/particles.pro | 1 - 3 files changed, 3 deletions(-) diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index b2e5360..8964ab0 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -15,7 +15,6 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ TARGET.UID3 = 0x20021320 - include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) isEmpty(DESTDIR):importFiles.sources = qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro index 18ffcb9..a4c914d 100644 --- a/src/imports/gestures/gestures.pro +++ b/src/imports/gestures/gestures.pro @@ -15,7 +15,6 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ TARGET.UID3 = 0x2002131F - include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) isEmpty(DESTDIR):importFiles.sources = qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro index a3eb0d1..bb9da01 100644 --- a/src/imports/particles/particles.pro +++ b/src/imports/particles/particles.pro @@ -19,7 +19,6 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ TARGET.UID3 = 0x2002131E - include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) isEmpty(DESTDIR):importFiles.sources = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir -- cgit v0.12