Fix compilation with Qt 5.4: there's no devicePixelRatioF

There's no such function and the commit that introduced it did not
mention a pending or future commit either.

Change-Id: I6a814375ed1411db8d5810a5f616456fc3268c33
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>