build error in kdelibs - QTest related
kloecker at kde.org
Mon Dec 7 22:08:28 GMT 2009
On Monday 07 December 2009, Alexander Neundorf wrote:
> kdelibs currently does not build on Solaris with the Sun Studio
> compiler if the tests are enabled:
> This is the error:
> [ 31%] Building CXX object
> "/.../srcdir/kdecore/tests/kjobtest.cpp", line 96: Error: Could not
> find a match for QTest::qCompare<QTest::T>(KJob*, TestJob*, const
> char, const char, const char, int) needed in
> Any idea what's wrong here ?
Excerpt of http://doc.trolltech.com/4.5/qtest.html#QCOMPARE:
QCOMPARE is very strict on the data types. Both actual and expected have
to be of the same type, otherwise the test won't compile. This
prohibits unspecified behavior from being introduced; that is behavior
that usually occurs when the compiler implicitly casts the argument.
Apparently, the Sun Studio compiler is stricter than gcc and does not
cast TestJob* to KJob*, but regards them as different (which they are).
QCOMPARE( processed_spy.at( 0 ).at( 0 ).value<KJob*>(), job );
QCOMPARE( processed_spy.at( 0 ).at( 0 ).value<KJob*>(),
static_cast<KJob*>( job ) );
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel