[LyX/master] Replace QFontMetrics::width() by horizontalAdvance() in Qt>=5.11

Scott Kostyshak skostysh at lyx.org
Sun Dec 20 04:36:56 UTC 2020


On Thu, Dec 17, 2020 at 09:52:02AM -0500, Scott Kostyshak wrote:
> On Thu, Dec 17, 2020 at 11:39:17AM +0100, Jean-Marc Lasgouttes wrote:
> > Le 30/10/2020 à 13:13, Jean-Marc Lasgouttes a écrit :
> > > Le 25/10/2020 à 03:58, Richard Kimberly Heck a écrit :
> > > > On 10/24/20 2:17 PM, Jean-Marc Lasgouttes wrote:
> > > > > Le 24/10/2020 à 19:38, Jean-Marc Lasgouttes a écrit :
> > > > > > commit 21422dd6527754d8b7876a6e11b686cd726321ed
> > > > > > Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
> > > > > > Date:   Sat Oct 24 19:29:34 2020 +0200
> > > > > > 
> > > > > >       Replace QFontMetrics::width() by horizontalAdvance() in Qt>=5.11
> > > > > >            The method horizontalAdvance() replaces width() starting
> > > > > > with Qt 5.11.
> > > > > >       To handle this, all direct calls to QFontMetrics::width() are
> > > > > > replaced
> > > > > >       by calls to GuiFontMetrics::width(), and the code for
> > > > > >       GuiFontMetrics::width(QChar) uses horizontalAdvance on newer Qt
> > > > > >       versions.
> > > > > 
> > > > > If this turns out to work well, it will be candidate for branch.
> > > > 
> > > > Keep me posted.
> > > 
> > > This can wait until after 2.3.6.
> > 
> > I backported this to branch at f4314b6461a. Scott, you should backport your
> > own changes, since compiling branch is quite painful right now on recent Qt.
> 
> OK I'll look into this. I'll make a list of specific commits to backport to propose to Riki.

Riki, the following command backports most of the commits I worked on
that fix Qt warnings:

git cherry-pick -x 24926b2e2399624ca6a1290349e9070a0d880dee 14f369b47f9d05a27f3b854eeb7c5b7e79fd790f 273af8803dd14ffa1b1454c263fa3ac80c9798a6 b38a452efb81cd0f4429aed7ae0fbe947e7e348e 1c78b563ff47cafbd2c1622342ca3c639e4738ca 1045020e05f926bbfdddf3e4fd0c2735bbbee2d4 690c671b1d74aea566f7b4c952059afef2d4904a c6f4682b7521c9733aa6a6de3b319f7648ef0d20 2cfcd706ab92f0e4175f40ed931293802cd5a623 8583410617c756e072ee997f918395d6f29b8246

OK to proceed?

There are still three other commits on master that are not included
above, but I need to backport them manually. I will look at them later.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201219/efd55eb3/attachment.asc>


More information about the lyx-devel mailing list