FR 3977 then QR 3515 at Barcelona
Dublin → Barcelona → Madrid
Timetable, Barcelona time
21:10FR 3977 from Dublin at the gate
16:30QR 3515 to Madrid leaves the gate
19 h 20 apart on the timetable, overnight
QR 3515 leaves 19 h 20 after FR 3977 arrives on the timetable: more than half a day, so not a connection we count.