[Telepathy-commits] [telepathy-qt4/master] prototype test: don't use rcc at all, just load the avatar at runtime
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Dec 10 03:39:59 PST 2008
Also remove -Wno-error=missing-declarations now we don't use rcc.
---
tests/prototype/Makefile.am | 12 +++---------
tests/prototype/images.qrc | 5 -----
tests/prototype/prototype.cpp | 5 ++++-
3 files changed, 7 insertions(+), 15 deletions(-)
delete mode 100644 tests/prototype/images.qrc
diff --git a/tests/prototype/Makefile.am b/tests/prototype/Makefile.am
index 105949a..4d70f0d 100644
--- a/tests/prototype/Makefile.am
+++ b/tests/prototype/Makefile.am
@@ -14,16 +14,11 @@ noinst_PROGRAMS = \
$(manual_tests)
BUILT_SOURCES = \
- _gen/resources.cpp \
_gen/prototype.h.moc
-test_prototype_SOURCES = prototype.cpp prototype.h _gen/resources.cpp
+test_prototype_SOURCES = prototype.cpp prototype.h
-EXTRA_DIST = images.qrc avatar.png
-
-_gen/resources.cpp: images.qrc avatar.png
- ( cd @srcdir@ && $(RCC) $< ) > $@.tmp
- mv -f $@.tmp $@
+EXTRA_DIST = avatar.png
DEP_CFLAGS = \
$(QTCORE_CFLAGS) \
@@ -43,8 +38,7 @@ LDADD = \
AM_CXXFLAGS = \
$(ERROR_CXXFLAGS) \
- $(DEP_CFLAGS) \
- -Wno-error=missing-declarations
+ $(DEP_CFLAGS)
TESTS_ENV = \
abs_top_builddir=@abs_top_builddir@ \
diff --git a/tests/prototype/images.qrc b/tests/prototype/images.qrc
deleted file mode 100644
index d251a9f..0000000
--- a/tests/prototype/images.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource prefix="/images">
- <file>avatar.png</file>
- </qresource>
- </RCC>
\ No newline at end of file
diff --git a/tests/prototype/prototype.cpp b/tests/prototype/prototype.cpp
index 8397d5b..321a9cf 100644
--- a/tests/prototype/prototype.cpp
+++ b/tests/prototype/prototype.cpp
@@ -1028,7 +1028,10 @@ void UnitTests::testAvatarManager()
QVERIFY( avatar_requirements.isValid );
// Set own avatar.
- QPixmap avatar( ":/images/avatar.png" );
+ QString abs_top_srcdir = QString::fromLocal8Bit(::getenv("abs_top_srcdir"));
+ QVERIFY2(!abs_top_srcdir.isEmpty(),
+ "Put $abs_top_srcdir in your environment");
+ QPixmap avatar( abs_top_srcdir + "/tests/prototype/avatar.png" );
QVERIFY( !avatar.isNull() );
QByteArray bytes;
--
1.5.6.5
More information about the Telepathy-commits
mailing list