initial support of weather

This commit is contained in:
arcan1s
2015-07-22 00:44:39 +03:00
parent a065e96bc3
commit b699095f38
21 changed files with 1220 additions and 62 deletions

View File

@ -0,0 +1,18 @@
#include "qreplytimeout.h"
#include <QTimer>
QReplyTimeout::QReplyTimeout(QNetworkReply *reply, const int timeout)
: QObject(reply)
{
QTimer::singleShot(timeout, this, SLOT(timeout()));
}
void QReplyTimeout::timeout()
{
QNetworkReply *reply = static_cast<QNetworkReply *>(parent());
if (reply->isRunning())
reply->close();
}