<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[oauth2 setModifyParametersFunction post qt6]]></title><description><![CDATA[<p dir="auto">Hello Folks</p>
<p dir="auto">Trying to update and compile some of my legacy apps using Qt 6.3....  come across a stumbling block.</p>
<p dir="auto">any ideas on how to make this work on Qt6+ ?</p>
<pre><code>oauth2-&gt;setModifyParametersFunction([](QAbstractOAuth::Stage stage, QVariantMap* parameters) {
       (*parameters)["redirect_uri"] = QUrl("https://localhost:1234");
    });
</code></pre>
<p dir="auto">works absolutly fine as as expected in Qt 5.15.2</p>
<p dir="auto">however on Qt 6.3 erroring out with;</p>
<p dir="auto">no viable conversion from lambda to 'const QAbstractOAuth::ModifyParametersFunction' (aka 'const function&lt;void (QAbstractOAuth::Stage, QMultiMap&lt;QString, QVariant&gt; *)&gt;')</p>
<p dir="auto">Any clues on how to fix this, or is there another way to set redirect_uri on 6.3 ?</p>
<p dir="auto">Thanks</p>
<p dir="auto">Craig</p>
]]></description><link>https://forum.qt.io/topic/139424/oauth2-setmodifyparametersfunction-post-qt6</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 04:05:35 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139424.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Sep 2022 13:46:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to oauth2 setModifyParametersFunction post qt6 on Mon, 19 Sep 2022 17:31:38 GMT]]></title><description><![CDATA[<p dir="auto">thanks again <a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> !</p>
<p dir="auto">I have managed to get the app working.<br />
For completeness;<br />
I used to used to call a redirect in the requestinterceptor and link connect to the signal via --<br />
connect(view, &amp;QWebEngineView::urlChanged, view, &amp;QWebEngineView::reload);</p>
<p dir="auto">in Qt 6.3 this was cause the QWebEnginePage::setUrlRequestInterceptor to backtrace and error out as mentioned with the parsed_headers.Equals error.</p>
<p dir="auto">So after a bit of digging and a few qDebug decided to settle on creating and emitting the newurl instead and changed the connect to ;<br />
connect(interceptor, &amp;RequestInterceptor::newurl, view, &amp;QWebEngineView::setUrl)</p>
]]></description><link>https://forum.qt.io/post/729332</link><guid isPermaLink="true">https://forum.qt.io/post/729332</guid><dc:creator><![CDATA[testmonkey]]></dc:creator><pubDate>Mon, 19 Sep 2022 17:31:38 GMT</pubDate></item><item><title><![CDATA[Reply to oauth2 setModifyParametersFunction post qt6 on Mon, 19 Sep 2022 18:05:22 GMT]]></title><description><![CDATA[<p dir="auto">brilliant thanks JonB; got me a step further....</p>
<p dir="auto">error moved onto the next line;<br />
error: No viable overloaded operator[] for type 'QMultiMap&lt;QString, QVariant&gt;'</p>
<p dir="auto">So I changed the code for insert instead.  That function now works...</p>
<p dir="auto">But looks like the urlrequestinterceptor is failing now... which is another error not relating to setModifyParametersFunction.</p>
<p dir="auto">Probably something else changed in webengine</p>
<p dir="auto">FATAL:navigation_url_loader_impl.cc(1114)] Check failed: parsed_headers.Equals(head-&gt;parsed_headers).</p>
]]></description><link>https://forum.qt.io/post/729317</link><guid isPermaLink="true">https://forum.qt.io/post/729317</guid><dc:creator><![CDATA[testmonkey]]></dc:creator><pubDate>Mon, 19 Sep 2022 18:05:22 GMT</pubDate></item><item><title><![CDATA[Reply to oauth2 setModifyParametersFunction post qt6 on Mon, 19 Sep 2022 14:07:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/testmonkey">@<bdi>testmonkey</bdi></a><br />
Does changing <code>QVariantMap* parameters</code> to <code>QMultiMap&lt;QString, QVariant&gt;* parameters</code> fix this?</p>
]]></description><link>https://forum.qt.io/post/729309</link><guid isPermaLink="true">https://forum.qt.io/post/729309</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 19 Sep 2022 14:07:43 GMT</pubDate></item></channel></rss>