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



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



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



  • Waiting for some help...


  • Moderators

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.