QR 3522 then AT 961 at Barcelona
Málaga → Barcelona → Casablanca
Timetable, Barcelona time
01:20QR 3522 from Málaga at the gate
19:10AT 961 to Casablanca leaves the gate
17 h 50 apart on the timetable
AT 961 leaves 17 h 50 after QR 3522 arrives on the timetable: more than half a day, so not a connection we count.