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

QNetworkAccessManager throwing qWarning() when internet connection is not available

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P5: Not important
    • None
    • 5.2.1
    • None
    • Windows

    Description

      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...
      http://qt-project.org/forums/viewthread/46394/

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            cad_coding Sumit
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes