Edge voltages and distributed currents in the quantum Hall effect