QR 151 then FR 9430 at Madrid
Doha → Madrid → Marrakesh
Timetable, Madrid time
20:35QR 151 from Doha at the gate
13:10FR 9430 to Marrakesh leaves the gate
16 h 35 apart on the timetable, overnight
FR 9430 leaves 16 h 35 after QR 151 arrives on the timetable: more than half a day, so not a connection we count.