From kde-commits Thu May 05 12:20:30 2011 From: Khudyakov Alexey Date: Thu, 05 May 2011 12:20:30 +0000 To: kde-commits Subject: =?utf-8?q?=5Bkstars=5D_kstars=3A_Do_not_spam_to_stderr_with_=22t?= Message-Id: <20110505122030.9B9AEA60C4 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=130459808002568 Git commit b3a150cec8bc84cdef994f395500a62baf58b2fd by Khudyakov Alexey. Committed on 05/05/2011 at 13:04. Pushed by khudyakov into branch 'master'. Do not spam to stderr with "texture not found messages" Also add few FIXME entries M +2 -1 kstars/texturemanager.cpp http://commits.kde.org/kstars/b3a150cec8bc84cdef994f395500a62baf58b2fd diff --git a/kstars/texturemanager.cpp b/kstars/texturemanager.cpp index eedeeca..53c00e5 100644 --- a/kstars/texturemanager.cpp +++ b/kstars/texturemanager.cpp @@ -52,6 +52,7 @@ const QImage& TextureManager::getImage(const QString& name) } } +// FIXME: should be cache images which are not found? TextureManager::CacheIter TextureManager::findTexture(const QString& name) { Create(); @@ -65,7 +66,6 @@ TextureManager::CacheIter TextureManager::findTexture(const QString& name) if( !filename.isNull() ) { return m_p->m_textures.insert( name, QImage(filename) ); } else { - qWarning() << "Could not find texture: " << name; return m_p->m_textures.end(); } } @@ -78,6 +78,7 @@ static void bindImage(const QImage& img, QGLWidget* cxt) glBindTexture(GL_TEXTURE_2D, tid); } +// FIXME: should we check that image have appropriate size as bindFromImage do? void TextureManager::bindTexture(const QString& name, QGLWidget* cxt) { Create();