diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-05 18:19:11 +0200 |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-11 15:39:10 +0200 |
commit | d82ab0709286f6b6816064affee4705d821830ec (patch) | |
tree | baf3aac1b528e43013888ba7293088afd5db1d16 /tests/auto/qicon | |
parent | d117525a4ff8757208231fa77f171c7fd7a30ef9 (diff) | |
download | qt4-tools-d82ab0709286f6b6816064affee4705d821830ec.tar.gz |
Make QIconloader use resource directory as fallback
Instead of using different paths on Mac and Windows we now simply
use ":\icons" on all platforms. It is a little more effort to create
resources but it is certainly the Qt way to do it. :)
Reviewed-by: ogoffart
Diffstat (limited to 'tests/auto/qicon')
-rw-r--r-- | tests/auto/qicon/tst_qicon.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qicon/tst_qicon.qrc | 14 |
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/auto/qicon/tst_qicon.cpp b/tests/auto/qicon/tst_qicon.cpp index b614ab983b..bacf7a5332 100644 --- a/tests/auto/qicon/tst_qicon.cpp +++ b/tests/auto/qicon/tst_qicon.cpp @@ -609,8 +609,7 @@ void tst_QIcon::task184901_badCache() void tst_QIcon::fromTheme() { - const QString prefix = QLatin1String(SRCDIR) + QLatin1String("/"); - QString searchPath = prefix + QLatin1String("/icons"); + QString searchPath = QLatin1String(":/icons"); QIcon::setThemeSearchPaths(QStringList() << searchPath); QVERIFY(QIcon::themeSearchPaths().size() == 1); QCOMPARE(searchPath, QIcon::themeSearchPaths()[0]); diff --git a/tests/auto/qicon/tst_qicon.qrc b/tests/auto/qicon/tst_qicon.qrc index 1e1a030c63..7925a33c84 100644 --- a/tests/auto/qicon/tst_qicon.qrc +++ b/tests/auto/qicon/tst_qicon.qrc @@ -2,5 +2,19 @@ <qresource prefix="/"> <file>image.png</file> <file>rect.png</file> +<file>./icons/testtheme/16x16/actions/appointment-new.png</file> +<file>./icons/testtheme/22x22/actions/appointment-new.png</file> +<file>./icons/testtheme/32x32/actions/appointment-new.png</file> +<file>./icons/testtheme/index.theme</file> +<file>./icons/testtheme/scalable/actions/svg-only.svg</file> +<file>./icons/themeparent/16x16/actions/address-book-new.png</file> +<file>./icons/themeparent/16x16/actions/appointment-new.png</file> +<file>./icons/themeparent/22x22/actions/address-book-new.png</file> +<file>./icons/themeparent/22x22/actions/appointment-new.png</file> +<file>./icons/themeparent/32x32/actions/address-book-new.png</file> +<file>./icons/themeparent/32x32/actions/appointment-new.png</file> +<file>./icons/themeparent/index.theme</file> +<file>./icons/themeparent/scalable/actions/address-book-new.svg</file> +<file>./icons/themeparent/scalable/actions/appointment-new.svg</file> </qresource> </RCC> |