diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-01-28 14:34:26 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-08 15:02:02 +0000 |
commit | af3eb98b22a83275335d6ac702ed7ba0e8b394bb (patch) | |
tree | 984d41b72e18ed0448b9ecbfdda6c5ad0e27abdc /src/plugins | |
parent | 6ac96d11449769118dc1f5b443fc7112bed3facc (diff) |
Make ctor of QAbstractTextureProvider protected
That enforces to use one of the subclasses.
Change-Id: Idba7300ed322954ba6866c4a262ad4ee74c024e5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sceneparsers/assimp/assimpparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sceneparsers/assimp/assimpparser.cpp b/src/plugins/sceneparsers/assimp/assimpparser.cpp index ea11e3b15..c29226fad 100644 --- a/src/plugins/sceneparsers/assimp/assimpparser.cpp +++ b/src/plugins/sceneparsers/assimp/assimpparser.cpp @@ -593,7 +593,7 @@ void AssimpParser::loadMesh(uint meshIndex) void AssimpParser::loadEmbeddedTexture(uint textureIndex) { aiTexture *assimpTexture = m_scene->m_aiScene->mTextures[textureIndex]; - QAbstractTextureProvider *texture = new QAbstractTextureProvider(QAbstractTextureProvider::Target2D); + QAbstractTextureProvider *texture = new QTexture2D(); TexImageDataPtr textureData(new TexImageData(0, 0)); bool isCompressed = assimpTexture->mHeight == 0; @@ -773,7 +773,7 @@ void AssimpParser::copyMaterialTextures(QMaterial *material, aiMaterial *assimpM // Load texture if not already loaded bool textureLoaded = true; if (!m_scene->m_materialTextures.contains(fullPath)) { - QAbstractTextureProvider *tex = new QAbstractTextureProvider(QAbstractTextureProvider::Target2D); + QAbstractTextureProvider *tex = new QTexture2D(); QImage textureImage; if (!textureImage.load(fullPath) || !textureImage.isNull()) { tex->setFromQImage(textureImage); |