QFontMetrics::width breaks building with CMake on Windows, due to a deprecation warning which gets promoted to an error.