BA 126 then BA 490 at Heathrow
Doha → London → Gibraltar
Timetable, London time
07:25BA 126 from Doha at the gate
07:00BA 490 to Gibraltar leaves the gate
23 h 35 apart on the timetable, overnight
BA 490 leaves 23 h 35 after BA 126 arrives on the timetable: more than half a day, so not a connection we count.