File indexing completed on 2025-01-19 03:55:39
0001 0002 #include "o1timedreply.h" 0003 0004 O1TimedReply::O1TimedReply(QNetworkReply *parent, int pTimeout): QTimer(parent) { 0005 setSingleShot(true); 0006 setInterval(pTimeout); 0007 connect(this, SIGNAL(timeout()), this, SLOT(onTimeout())); 0008 connect(parent, SIGNAL(finished()), this, SLOT(onFinished())); 0009 } 0010 0011 void O1TimedReply::onFinished() { 0012 stop(); 0013 Q_EMIT finished(); 0014 } 0015 0016 void O1TimedReply::onTimeout() { 0017 Q_EMIT error(QNetworkReply::TimeoutError); 0018 } 0019 0020 #include "moc_o1timedreply.cpp"