1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| void FenPrincipale::miseAJour()
{
m_actionMiseAJour->setDisabled(1);
const QNetworkRequest requete(QUrl("peuimporteladresse.fr/version"));
QNetworkAccessManager acces;
QNetworkReply *r = acces.get(requete);
connect(r, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(messageErreur(QNetworkReply::NetworkError)));
connect(r, SIGNAL(finished()), this, SLOT(reponseMaj()));
//QMessageBox::about(this, "test", "test");
}
void FenPrincipale::messageErreur()
{
QMessageBox::about(this, "test", "Erreur");
}
void FenPrincipale::reponseMaj()
{
m_actionMiseAJour->setDisabled(0);
QMessageBox::about(this, "test", "Fini");
} |