diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-05 16:19:11 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-11 13:39:10 (GMT) |
commit | d82ab0709286f6b6816064affee4705d821830ec (patch) | |
tree | baf3aac1b528e43013888ba7293088afd5db1d16 /tests | |
parent | d117525a4ff8757208231fa77f171c7fd7a30ef9 (diff) | |
download | Qt-d82ab0709286f6b6816064affee4705d821830ec.zip Qt-d82ab0709286f6b6816064affee4705d821830ec.tar.gz Qt-d82ab0709286f6b6816064affee4705d821830ec.tar.bz2 |
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')
-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 b614ab9..bacf7a5 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 1e1a030..7925a33 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> |