...725 inline QString::QString(const QString &other) : d(other.d)726 { Q_ASSERT(&other != this); d->ref.ref(); }...
timer = new QTimer(); connect(this, SIGNAL(startTimer()),timer,SLOT(start())); connect(this, SIGNAL(stopTimer()),timer,SLOT(stop())); connect(timer, SIGNAL(timeout()), this, SLOT(checkWork())); timer->setInterval(30000); // 30 sec
if(!sManagerWasCreated) { manager = new QNetworkAccessManager(); // тут утечки памяти sManagerWasCreated = true; } emit startTimer(); connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(checkSiteFinished(QNetworkReply*))); replyWasDeleted = false; reply = manager->get(QNetworkRequest(QUrl(sDomain,QUrl::TolerantMode))); //qDebug()<<"4"; connect(reply,SIGNAL(destroyed()),this,SLOT(replyDestroyed()));
if(!mtx.tryLock()) return; emit stopTimer(); //qDebug()<<"finished begin"; // if(isFinished()) // { // return; // } QByteArray data; try { data = reply->read(reply->bytesAvailable()); } catch(int e) { //qDebug()<<"error read"; emit siteErrorSig(); try { if(!replyWasDeleted) { reply->abort(); reply->deleteLater(); } } catch(int e) { //qDebug()<<"Error deleting reply"; } //manager->deleteLater(); offNode(); return; } try { reply->abort();//qDebug()<<"6"; reply->deleteLater(); } catch(int e) { //qDebug()<<"Error deleting reply"; }
if(!mtx.tryLock()) return; emit stopTimer(); try { if(!replyWasDeleted) { reply->abort(); reply->deleteLater(); } } catch(int e) { //qDebug()<<"Error deleting reply"; } //manager->deleteLater();
reply->abort();reply->deleteLater();
reply = manager->get(QNetworkRequest(QUrl(sDomain,QUrl::TolerantMode)));
connect(reply,SIGNAL(destroyed()),this,SLOT(replyDestroyed()));