>> Could we perhaps make some of these functions export-only? >> Just remove the dllimport side of things, only export the symbol.
I tried (removing Q_CORE_EXPORT on the class itself and adding it only for the non-inlined functions), but it does not work (build is Ok, but function are still not inlined). Using Qt 6.11.1. But the most incredible thing: I have justed tested with Qt 6.9.1, without changes. And it is the same thing: QRect / QPoint methods are not inlined, though QCheckedInt is not used. It's incomprehensible. So yes, MSVC is definitely bad for inlining :( I am using almost the last MSVC 2022 version (17.14.32) Philippe On Mon, 8 Jun 2026 15:28:34 +0000 Mårten Nordheim via Development <[email protected]> wrote: > > Testing this with the inline debugging things from MSVC it is simply listing > the reason for not inlining as 'dllimport check failed'. > So it seems to not inline solely based on it being marked dllimport. > > Could we perhaps make some of these functions export-only? Just remove the > dllimport side of things, only export the symbol. > > Mårten > > ________________________________________ > From: Development <[email protected]> on behalf of Philippe > <[email protected]> > Sent: Monday, June 8, 2026 16:05 > To: [email protected] > Subject: Re: [Development] MSVC not inlining QRect inline functions (anymore?) > > I have just verified that not only QRect, but QPoint, QSize and QMargins are > also affected :( > > QCheckedInt overflow checks only manifest as assertions in debug builds. > Yet, this debug-only feature has a negative impact on the MSVC release > version :( > Not exactly, "Pay Only For What You Use"... > > Philippe > > On Sun, 7 Jun 2026 17:48:33 +0200 > Christian Ehrlicher via Development <[email protected]> wrote: > > > Hi, > > > > I recently found out that none of the QRect inline functions are inlined by > > msvc no matter what compiler options I pass. Tested with recent cl > > (19.51.36244) but also saw this with older msvc2022 compilers. > > Is this known and should/can we do something against this? > > > > > > Christian > > -- Development mailing list > > [email protected] > > https://lists.qt-project.org/listinfo/development > > > -- > Development mailing list > [email protected] > https://lists.qt-project.org/listinfo/development > -- > Development mailing list > [email protected] > https://lists.qt-project.org/listinfo/development -- Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
