Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT_MESSAGE_PATTERN dont understand pattern
Qt 6.12 LTS is out! See what's new in the release blog

QT_MESSAGE_PATTERN dont understand pattern

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 912 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CHIO-CHIO
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      auth is a local variable. It's likely destroyed before the authentication procedure is done.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply
        0
        • SGaistS SGaist

          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.

          C Offline
          C Offline
          CHIO-CHIO
          wrote on last edited by CHIO-CHIO
          #3

          @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.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            auth is a local variable. It's likely destroyed before the authentication procedure is done.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt
            • Unsolved