What matters is what is on the e-ticket.
If it states EK on the e-ticket then it will not earn on BA.
My point was you can have a ticket issued by one carrier, and flights on that ticket marketed and operated by different carriers. The marketing/operating carrier matters for FF earning.
...and I am guessing that EK will not be able to plate tickets where QF flights are booked as QF flights, but will always use the EK code. And if the itinerary involved flights on which EK didn't codeshare (are there any?), then QF would have been the plating carrier, and the e-ticket would have been issued as an 081 ticket, with most likely all flights as QF rather than EK flights.