BA 491 then BA 510 at Heathrow
Gibraltar → London → Lisbon
Timetable, London time
16:05BA 491 from Gibraltar at the gate
14:50BA 510 to Lisbon leaves the gate
22 h 45 apart on the timetable, overnight
BA 510 leaves 22 h 45 after BA 491 arrives on the timetable: more than half a day, so not a connection we count.