Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131641

QHttpServer 6.8.0 does not emit newWebSocketConnection() to my myclass::myslot() anymore.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.0
    • Qt Http Server
    • None
    • All

    Description

      I had an issue some time ago, described in the QTBUG-121562 (QHttpServer does not emit new WebSocket Connection() to my myclass::myslot()) that was solved (till Qt .6.7.x) with the following solution suggested by Ievgenii Meshcheriakov

      httpServer->route("/ws/", [](QHttpServerResponder &&respond)

      {         auto _respond = std::move(respond); }

      );

      But now (Qt6.8.0) I got the error:

      static assertion failed: ViewHandler arguments error: QHttpServerResponder can only be passed as a reference.

      I did this:

      httpServer->route("/ws/", [](QHttpServerResponder &respond)

      {         auto _respond = std::move(respond); }

      );

      That solved the compiler error, but the SIGNAL is not emitted anymore.

      connect(m_pHttpServer, &QHttpServer::newWebSocketConnection, this, &MyClass::incomingConnection);

       

      I don´t know if it is a bug or just a change the way Qt6.8.0 works.

      Any help is appreciated. Thanks.

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mikhailsvetkin Mikhail Svetkin
            sergio.andrade Sérgio Andrade
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes