FR 2527 then QR 150 at Madrid
Berlin → Madrid → Doha
Timetable, Madrid time
23:10FR 2527 from Berlin at the gate
15:20QR 150 to Doha leaves the gate
16 h 10 apart on the timetable, overnight
QR 150 leaves 16 h 10 after FR 2527 arrives on the timetable: more than half a day, so not a connection we count.