QT_MESSAGE_PATTERN dont understand pattern
Solved
General and Desktop
-
I have an error. I try to edit QT_MESSAGE_PATTERN, but it doesnot work
➜ (branch-179) ✗ export QT_MESSAGE_PATTERN="[%{type} | (%{file}:%{line}) - %{message}" ➜ (branch-179) ✗ ./main [warning | (unknown:0) - QObject::connect(QAbstractOAuthReplyHandler, QOAuth2AuthorizationCodeFlow): invalid nullptr parameter
QT_FATAL_WARNINGS=1 same have no effect.
How can i kwow place, where exception was thrown? -
auth is a local variable. It's likely destroyed before the authentication procedure is done.
-
Hi,
The pattern seems to work.
You have a connect statement that is using a nullptr as it seems. Strangely it looks like it might be in Qt's module code. I may wrong though because I do not know what you are doing in your code.
-
@SGaist hi. All i does to do is
QOAuth2AuthorizationCodeFlow oauth(this); connect(&oauth, &QOAuth2AuthorizationCodeFlow::authorizeWithBrowser, &QDesktopServices::openUrl); const QUrl authUri("https://shikimori.one/oauth/authorize"); const QUrl tokenUri("https://shikimori.one/oauth/token"); const auto clientId("123"); const auto clientSecret("234"); oauth.setAuthorizationUrl(authUri); oauth.setClientIdentifier(clientId); oauth.setAccessTokenUrl(tokenUri); oauth.setClientIdentifierSharedKey(clientSecret); oauth.setModifyParametersFunction([](QAbstractOAuth::Stage stage, QVariantMap* parameters) { (*parameters)["redirect_uri"] = QUrl("urn:ietf:wg:oauth:2.0:oob"); }); oauth.grant();
My suspicions about this part. Other part work fine. I detached the parts and falls on this fragment.
-
auth is a local variable. It's likely destroyed before the authentication procedure is done.