<div dir="auto">We are officially QT6 only since <a href="https://github.com/qgis/QGIS/pull/64365">https://github.com/qgis/QGIS/pull/64365</a><div dir="auto"><br></div><div dir="auto">Best</div><div dir="auto">Stefanos</div><div dir="auto"><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Dec 23, 2025, 11:43 AM David Koňařík via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I'm glad you've opened this discussion. I'm personally in favour of <br>
moving from the macros to the new string literal operators, since I <br>
think that both have next to no value for a programmer reading the code, <br>
so I favour the less intrusive option.<br>
<br>
Though as far as I know, we still support building QGIS with Qt 5, so <br>
this will have to wait until we're officially Qt 6-only.<br>
<br>
David Koňařík<br>
<br>
On 12/21/25 19:50, Even Rouault via QGIS-Developer wrote:<br>
> Hi,<br>
> <br>
> I personally find that QLiteralString() and QLatin1String()  add <br>
> significant visual noise when reading QGIS source code. Qt 6.4 adds a <br>
> Qt::Literals::StringLiterals namespace (<a href="https://doc.qt.io/qt-6/qt-" rel="noreferrer noreferrer" target="_blank">https://doc.qt.io/qt-6/qt-</a> <br>
> literals-stringliterals.html) with operator"" _s(...) and <br>
> operator""_operator ""_L1(...)<br>
> <br>
> So code like<br>
> <br>
>    wallProperties.insert( QStringLiteral( "geometryModifier" ), <br>
> WALL_EXPRESSION );<br>
>    wallProperties.insert( QStringLiteral( "symbolType" ), <br>
> QStringLiteral( "Fill" ) );<br>
>    if ( renderer->type() == QLatin1String( "25dRenderer" ) ) { ... }<br>
> <br>
> can be simplified as<br>
> <br>
>    wallProperties.insert( u"geometryModifier"_s, WALL_EXPRESSION );<br>
>    wallProperties.insert( u"symbolType"_s, u"Fill"_s );<br>
>    if ( renderer->type() == "25dRenderer"_L1 ) { ... }<br>
> <br>
> For the replacement of QStringLiteral() by ""_s is is a bit unfortunate <br>
> though that we have to put the 'u' prefix to indicate this is a Unicode <br>
> string, but u""_s is still shorter than QStringLiteral( "" )<br>
> <br>
> Thoughts on doing a mass replacement to those new ways?<br>
> <br>
> Even<br>
> <br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>