EW 2520 then CA 840 at Barcelona
Stuttgart → Barcelona → Shanghai
Timetable, Barcelona time
14:25EW 2520 from Stuttgart at the gate
10:40CA 840 to Shanghai leaves the gate
20 h 15 apart on the timetable, overnight
CA 840 leaves 20 h 15 after EW 2520 arrives on the timetable: more than half a day, so not a connection we count.