Another porting question -- QLoggingCategory

Halla Rempt halla at valdyas.org
Thu Aug 22 12:55:14 BST 2024


On woensdag 21 augustus 2024 15:42:00 CEST Arjen Hiemstra wrote:

> 
> The error has nothing to do with categorised logging, but is due to 
> `kis_debug.h` redefining `QT_ASSERT()`. The change that happened is that Qt 6 
> at some point added a `QT_ASSERT()` check to `QVector2D::operator/()` which is 
> marked as `inline constexpr`. This works fine with Qt's version of 
> `QT_ASSERT()` but your version adds logging which calls into non-constexpr 
> functions which is not allowed in a constexpr function. Due to the inlining, 
> the compiler uses whatever declaration that can be found at the callsite for 
> the macro.
> 
> I don't think there is a way to make categorised logging work in a constexpr 
> context. Personally I would recommend to not redefine macros like that and 
> instead use a separate macro if you want one with logging.
> 

Ah, thanks for the tip! Let's see what we can do!

Halla




More information about the kimageshop mailing list