Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15

QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 503 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.
  • P Offline
    P Offline
    PhysicsX
    wrote on last edited by
    #1

    I am trying to simple get request like:

    #include "firebase.h"
    #include <QNetworkRequest>
    #include <QDebug>
    
    firebase::firebase(QObject *parent):QObject(parent)
    {
        m_networkManager = new QNetworkAccessManager(this);
        m_networkReply = m_networkManager->get(QNetworkRequest(QUrl("https://google.com")));
    
        connect(m_networkReply, &QNetworkReply::finished, this, &firebase::NetworkReplyRead);
    }
    
    firebase::~firebase()
    {
        m_networkManager->deleteLater();
    }
    
    void firebase::NetworkReplyRead()
    {
        qDebug()<<m_networkReply->readAll();
    }
    
    
    

    Which is working really well with qt 5.12. I installed qt 5.12 with apt-get.
    And I already installed 5.15 by hand as submodules from here https://download.qt.io/archive/qt/5.15/5.15.0/submodules/

    Interesting thing I can not get anything with 5.15 for this simple code. It returns empty.
    But it is working with 5.12

    These are the dependencies from the binary which is compiled with 5.12
    linux-vdso.so.1 (0x00007ffd0e537000)
    libQt5Network.so.5 => /lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007fe30ed3c000)
    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fe30e7f3000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe30e612000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe30e5f7000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe30e405000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe30e3e2000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe30e3c4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe30e3be000)
    libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007fe30e0bf000)
    libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007fe30ded9000)
    libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007fe30de56000)
    libdouble-conversion.so.3 => /lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007fe30de40000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fe30dd15000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe30dbc6000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fe30ef1f000)
    libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007fe30c105000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fe30c092000)

    And this one from 5.15
    linux-vdso.so.1 (0x00007ffc898e3000)
    libQt5Network.so.5 => /usr/local/Qt-5.15.0/lib/libQt5Network.so.5 (0x00007f8a9358f000)
    libQt5Core.so.5 => /usr/local/Qt-5.15.0/lib/libQt5Core.so.5 (0x00007f8a92f65000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8a92d6a000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8a92d4f000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8a92b5d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8a92b3a000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8a92b1c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8a92b16000)
    libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f8a92a93000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f8a9296a000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8a9281b000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8a936f7000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f8a927a6000)

    How it can be possible. What can be the problem here ?

    Thank you.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Prime suspect is OpenSSL missing. connect a slot to sslError and see if it tells you what's going wrong

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      P 1 Reply Last reply
      0
      • VRoninV VRonin

        Prime suspect is OpenSSL missing. connect a slot to sslError and see if it tells you what's going wrong

        P Offline
        P Offline
        PhysicsX
        wrote on last edited by
        #3

        @VRonin said in QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15:

        sslError

        After your command, I checked the configuration and yes I compiled it without ssl. Is there any way without ssl to make it work ?

        OpenSSL ................................ no
        Qt directly linked to OpenSSL ........ no
        OpenSSL 1.1 ............................ no

        jsulmJ SGaistS 2 Replies Last reply
        0
        • P PhysicsX

          @VRonin said in QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15:

          sslError

          After your command, I checked the configuration and yes I compiled it without ssl. Is there any way without ssl to make it work ?

          OpenSSL ................................ no
          Qt directly linked to OpenSSL ........ no
          OpenSSL 1.1 ............................ no

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @PhysicsX said in QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15:

          Is there any way without ssl to make it work ?

          Not if the website you're accessing is using HTTPS

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • P PhysicsX

            @VRonin said in QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15:

            sslError

            After your command, I checked the configuration and yes I compiled it without ssl. Is there any way without ssl to make it work ?

            OpenSSL ................................ no
            Qt directly linked to OpenSSL ........ no
            OpenSSL 1.1 ............................ no

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            @PhysicsX said in QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15:

            @VRonin said in QNetworkAccessManager get different behavior on Qt 5.12 and Qt 5.15:

            sslError

            After your command, I checked the configuration and yes I compiled it without ssl. Is there any way without ssl to make it work ?

            OpenSSL ................................ no
            Qt directly linked to OpenSSL ........ no
            OpenSSL 1.1 ............................ no

            Since you are compiling it yourself, why not just install the OpenSSL dev package from your distribution ?

            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
            1

            • Login

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