Verify presence of "magic cookie" before more expensive reads
authorJoão Abecasis <joao.abecasis@nokia.com>
Wed, 28 Mar 2012 13:10:52 +0000 (15:10 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 30 Mar 2012 11:24:00 +0000 (13:24 +0200)
commit26d12ecd27d10cd7ca4515badfe39919a191fbf0
tree5cea47abde5051f03b00b0d4ba5f7981110ff0cb
parent4ef5a6269c1465662ea3872596ba284a13cce25e
Verify presence of "magic cookie" before more expensive reads

Moved this simple sanitation out of do_load as it will prevent us from
loading misplaced (or misfound) files into memory in the first place.

We'll still load anything minimally looking like a translation file.

Change-Id: Ia138be010979d4a66d330f7414fce3df20727e68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/corelib/kernel/qtranslator.cpp