CppEditor: Don't try to set mimetype when opening failed

Change-Id: Ie0823acc3dfd216c3f22a93ee39d9919bf95c0a9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>