BA 1461 then BA 476 at Heathrow
Edinburgh → London → Barcelona
Timetable, London time
08:30BA 1461 from Edinburgh at the gate
08:10BA 476 to Barcelona leaves the gate
23 h 40 apart on the timetable, overnight
BA 476 leaves 23 h 40 after BA 1461 arrives on the timetable: more than half a day, so not a connection we count.