Replace obsolete QFontMetrics::width with QFontMetrics::horizontalAdvance

Authored by gengisdave on Sep 13 2019, 7:43 PM.

Description

Replace obsolete QFontMetrics::width with QFontMetrics::horizontalAdvance

In Qt 5.11 was introduced horizontalAdvance() to replace width().
In version 5.13, the old method is marked as obsolete.

A macro was created in compat.h to keep to code cleaner.

Differential revision : https://phabricator.kde.org/D22434