qmake is called directly in src_test, but there's no guarantee to which version of Qt that will point. Please inherit qmake-utils and call $(qt4_get_bindir)/qmake instead.
Good point, easy fix is underway..
discussion and fix attempt at: https://github.com/gentoo/gentoo/pull/500
The changes were merged by Ian, so this is now fixed.
commit 537312b16550a72b3881d79377a670bc3b29e7e8 Author: Antti Jarvinen <antti.jarvinen@katiska.org> Date: Sat Dec 26 03:47:16 2015 +0200 net-p2p/classified-ads: Bug 568874 - use correct qmake version Due to comments at https://github.com/gentoo/gentoo/pull/500 simplified src_test somewhat. Tried out with sandbox and without, with failing test case and all-passing case: seems to work. commit 6575f8afba024acbe3fec867d0368fab7ac53eb8 Author: Antti Jarvinen <antti.jarvinen@katiska.org> Date: Tue Dec 22 19:57:11 2015 +0200 net-p2p/classified-ads: Fix bug 568874 - use correct qmake version Changes due to comments at https://github.com/gentoo/gentoo/pull/500