It's unlikely a leaking valve cover gasket will directly cause an engine to idle roughly. However, oil from a valve cover gasket leak can drip into the ignition coil and spark plug holes. As oil builds up on ignition coils or spark plugs then it can lead to engine misfires and a rough idle.