Fix build with Qt 5.9
ClosedPublic

Authored by wbauer on Jul 12 2019, 9:17 AM.

Details

Summary

QFontMetrics::horizontalAdvance() only exists since Qt 5.11.
So switch back to QFontMetrics::width() when building with lower versions.

BUG: 409737

Test Plan

Builds fine now with Qt 5.9.x and 5.13.0.

Diff Detail

Repository
R220 Subversion Client (KDE SVN)
Lint
Lint Skipped
Unit
Unit Tests Skipped
wbauer requested review of this revision.Jul 12 2019, 9:17 AM
wbauer created this revision.

Btw, on an unrelated note:
I just noticed that it doesn't actually specify a minimum Qt version, even though it seems to be the intention:

set(QT_MIN_VERSION 5.9.0)
find_package(Qt5 REQUIRED COMPONENTS
    Core DBus Gui Sql Widgets Xml
)
wbauer updated this revision to Diff 61632.Jul 12 2019, 9:36 AM

Remove accidental trailing spaces.

This revision is now accepted and ready to land.Jul 12 2019, 1:47 PM
This revision was automatically updated to reflect the committed changes.