He wasnt cleaning it he was playing with it. Step one to cleaning any firearm: drop the magizine, clear the chamber and lock action open (if posibile). If he was cleaning it it never would have went off.
Not only do I clear the weapon, but I gather up all the ammo in the area and put it in another room. That way there's no way myself or someone else could load a way without it being completely intentional.
As dumb as this guy may be, I feel deep pity for him, and pain for his daughter. I don't think I could survive that acident. Say a prayer for them both and the rest of their family. They must be in hell right now.