diff options
author | Chris Adams <christopher.adams@nokia.com> | 2011-08-08 15:00:29 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-17 03:49:58 +0200 |
commit | cc01e0b1e112aac3a0e515f7accbd05ca5a55ecd (patch) | |
tree | 33eb2c369c26226ed8e4e91110dcb9145fbb4c30 /tests | |
parent | 953843800b0c7fa946e8b203d4cbe34978e02895 (diff) |
Allow borderimage .sci source to be a quoted filename
Previously, attempting to set the source property of a border image
via a .sci file to a quoted filename would fail. This commit adds
support for quoted source filenames.
Task-number: QTBUG-20709
Change-Id: Ida54ef42bc07081457fd945bb279f3cc82c26e10
Reviewed-on: http://codereview.qt.nokia.com/2724
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests')
4 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci b/tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci new file mode 100644 index 0000000000..294f3cfe48 --- /dev/null +++ b/tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci @@ -0,0 +1,7 @@ +border.left:10 +border.top:20 +border.right:30 +border.bottom:40 +horizontalTileRule:Round +verticalTileRule:Repeat +source:"colors.png" diff --git a/tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp b/tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp index 75cc6a0b4a..d1fe084df2 100644 --- a/tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp +++ b/tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp @@ -324,8 +324,10 @@ void tst_qsgborderimage::sciSource_data() QTest::addColumn<bool>("valid"); QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors-round.sci").toString() << true; + QTest::newRow("local quoted filename") << QUrl::fromLocalFile(SRCDIR "/data/colors-round-quotes.sci").toString() << true; QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.sci").toString() << false; QTest::newRow("remote") << SERVER_ADDR "/colors-round.sci" << true; + QTest::newRow("remote filename quoted") << SERVER_ADDR "/colors-round-quotes.sci" << true; QTest::newRow("remote image") << SERVER_ADDR "/colors-round-remote.sci" << true; QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.sci" << false; } diff --git a/tests/auto/qtquick1/qdeclarativeborderimage/data/colors-round-quotes.sci b/tests/auto/qtquick1/qdeclarativeborderimage/data/colors-round-quotes.sci new file mode 100644 index 0000000000..294f3cfe48 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativeborderimage/data/colors-round-quotes.sci @@ -0,0 +1,7 @@ +border.left:10 +border.top:20 +border.right:30 +border.bottom:40 +horizontalTileRule:Round +verticalTileRule:Repeat +source:"colors.png" diff --git a/tests/auto/qtquick1/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/qtquick1/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index d5631469a5..9ef2aaeb56 100644 --- a/tests/auto/qtquick1/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/qtquick1/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -333,8 +333,10 @@ void tst_qdeclarativeborderimage::sciSource_data() QTest::addColumn<bool>("valid"); QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors-round.sci").toString() << true; + QTest::newRow("local quoted filename") << QUrl::fromLocalFile(SRCDIR "/data/colors-round-quotes.sci").toString() << true; QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.sci").toString() << false; QTest::newRow("remote") << SERVER_ADDR "/colors-round.sci" << true; + QTest::newRow("remote filename quoted") << SERVER_ADDR "/colors-round-quotes.sci" << true; QTest::newRow("remote image") << SERVER_ADDR "/colors-round-remote.sci" << true; QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.sci" << false; } |