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. [Not Answered Yet] QNetworkAccessManager throwing qWarning() when internet connection is not available?

[Not Answered Yet] QNetworkAccessManager throwing qWarning() when internet connection is not available?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.3k Views
  • 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.
  • CAD_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on last edited by
    #1

    Hi,
    I am using the following code to download a webpage:

    @void CheckUpdates::checkUpdates()
    {
    connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(fileDownloaded(QNetworkReply*)));
    connect(&timer, SIGNAL(timeout()), this, SLOT(killChecking()));
    QNetworkRequest request(QUrl("http://mywebsite.com/index.html"));
    manager.get(request);
    timer.start(10000);
    }@

    In case the PC does not have internet connection then the following message is thrown in qWarning:

    @QIODevice::seek: Cannot call seek on a sequential device
    Category: default
    File: io\qiodevice.cpp
    Function: virtual bool QIODevice::seek(qint64)
    Line: 634
    Version: 1@

    I do not understand why qWarning() should be used for this purpose.
    Can I disable QNetworkAccessManager or QNetworkRequest to not throw this error?
    Or atleast make it to qDebug() instead?
    The message is also not generic so that I could filter it out in my message handler.
    Requesting some workarounds for this issue...

    1 Reply Last reply
    0
    • CAD_codingC Offline
      CAD_codingC Offline
      CAD_coding
      wrote on last edited by
      #2

      It would be really helpful to me if somebody could answer my doubts...

      1 Reply Last reply
      0
      • CAD_codingC Offline
        CAD_codingC Offline
        CAD_coding
        wrote on last edited by
        #3

        Waiting for some help...

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hi,

          I don't know the answer, and maybe nobody else who read this knows either.

          I suggest you subscribe to the "Interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest and ask there. Qt engineers are active in that list, and they might know more.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0

          • Login

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