reduce calls to DependencyManager::get<> where possible

This commit is contained in:
ZappoMan 2014-12-15 11:43:30 -08:00
parent 3bc1321549
commit 94cf8b3384

View file

@ -466,17 +466,19 @@ void ModelUploader::processCheck() {
_timer.stop(); _timer.stop();
switch (reply->error()) { switch (reply->error()) {
case QNetworkReply::NoError: case QNetworkReply::NoError: {
QMessageBox::information(NULL, QMessageBox::information(NULL,
QString("ModelUploader::processCheck()"), QString("ModelUploader::processCheck()"),
QString("Your model is now available in the browser."), QString("Your model is now available in the browser."),
QMessageBox::Ok); QMessageBox::Ok);
DependencyManager::get<GeometryCache>()->refresh(_url); DependencyManager::get<GeometryCache>()->refresh(_url);
TextureCache* textureCache = DependencyManager::get<TextureCache>();
foreach (const QByteArray& filename, _textureFilenames) { foreach (const QByteArray& filename, _textureFilenames) {
DependencyManager::get<TextureCache>()->refresh(_textureBase + filename); textureCache->refresh(_textureBase + filename);
} }
deleteLater(); deleteLater();
break; break;
}
case QNetworkReply::ContentNotFoundError: case QNetworkReply::ContentNotFoundError:
if (--_numberOfChecks) { if (--_numberOfChecks) {
_timer.start(TIMEOUT); _timer.start(TIMEOUT);