from main gui starting classes with request

Qt Code:
  1. for(int i=0; i< list.count(); i++)
  2. {
  3. ((Class1*)list.at(i))->startProcess();
  4. }
To copy to clipboard, switch view to plain text mode 

staring get requests

Qt Code:
  1. for (int i=0; i< this->list.count(); i++)
  2. {
  3. if(!abort)
  4. {
  5. MyNetworkAccessManager *manager = new MyNetworkAccessManager(this);
  6. manager->i = i;
  7. manager->moveToThread(this->thread());
  8. manager->setParent(this);
  9.  
  10. QString url = list.at(i)->url;
  11.  
  12. //qDebug()<< "get " + url;
  13.  
  14. QNetworkReply* reply = manager->get(QNetworkRequest(QUrl(url)));
  15. connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(replyFinished_listDesc(QNetworkReply*)));
  16. connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(downloadProgress_listDesc(qint64,qint64)));
  17. connect(reply, SIGNAL(finished()), this, SLOT(finished_listDesc()));
  18. connect(reply, SIGNAL(readyRead()), this, SLOT(readyRead_listDesc()));
  19. this->listReplies.append(reply);
  20. }
  21. }
To copy to clipboard, switch view to plain text mode 

trying to delete obejcts

Qt Code:
  1. void Class1::stop()
  2. {
  3. abort = true;
  4.  
  5. for(int i=0; i < listReplies.count(); i++)
  6. {
  7. QNetworkReply *reply = (QNetworkReply *)listReplies.at(i);
  8. reply->disconnect();
  9. reply->manager()->disconnect();
  10. reply->abort();
  11. reply->deleteLater();
  12. reply->manager()->deleteLater();
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 

somewhere about response

Qt Code:
  1. void Class1::replyFinished_listDesc(QNetworkReply* reply)
  2. {
  3. if(abort)
  4. {
  5. return;
  6. }
  7.  
  8. .......
  9.  
  10. }
To copy to clipboard, switch view to plain text mode 


deleting pointers of classes, crashes on delete t; string

Qt Code:
  1. for(int i=0; i< list.count(); i++)
  2. {
  3. Class1* t = (Class1*)list.at(i);
  4. t->stop();
  5. delete t;
  6. }
To copy to clipboard, switch view to plain text mode 

where is problem? which right way to delete QNetworkReply's and QNetworkAccessManagers?