On Thursday 12 September 2002 3:03 pm, Angus Leeming wrote: > On Thursday 12 September 2002 2:52 pm, John Levon wrote: > > No. The FIXME means what it says. Can you please collaborate > > with Angus to get a working test here. > > You mean that moc -v line should be > > moc -v | \ > sed -e '/Qt [mM]eta/ ! d' -e 's/.*(\(.*\))/\1/' | \ > grep "Qt 3" >/dev/null > > ? Looks like overkill to me. Your test should work fine. > > The only problem is that "moc -v" prints its stuff to console > here. > > Qt meta object compiler > moc: Invalid argument > Usage: moc [options] <header-file> > -o file Write output to file rather than stdout > -i Do not generate an #include statement > -f[file] Force #include, optional file name > -p path Path prefix for included file > -k Do not stop on errors > -nw Do not display warnings > > How do you pipe stderr too? Other than > moc -v > testmoc 2>&1; cat testmoc | ... ; rm -f testmoc > of course. > > Angus
Of course if Qt3's moc -v prints to stdout (because -v is a recognised command), then this test will be fine: moc -v 2> /dev/null | grep 'Qt' Here (with Qt2), echo $? prints '1' to console because the test failed. What happens with Qt3? Angus