| 261 | } |
| 262 | |
| 263 | void |
| 264 | AppInstance::checkForNewVersion() const |
| 265 | { |
| 266 | FileDownloader* downloader = new FileDownloader( QUrl( QString::fromUtf8(NATRON_LATEST_VERSION_URL) ), false ); |
| 267 | QObject::connect( downloader, SIGNAL(downloaded()), this, SLOT(newVersionCheckDownloaded()) ); |
| 268 | QObject::connect( downloader, SIGNAL(error()), this, SLOT(newVersionCheckError()) ); |
| 269 | |
| 270 | ///make the call blocking |
| 271 | QEventLoop loop; |
| 272 | |
| 273 | connect( downloader->getReply(), SIGNAL(finished()), &loop, SLOT(quit()) ); |
| 274 | loop.exec(); |
| 275 | } |
| 276 | |
| 277 | //return -1 if a < b, 0 if a == b and 1 if a > b |
| 278 | //Returns -2 if not understood |