summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-06 15:23:02 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-07 09:28:27 +0000
commit251046782631ca13a2df1d23c73fc68691fc77bc (patch)
tree8b1fa6714e1b08dcc2835e7115316d423c0abfb7 /tools
parent6d59b110d0db8ba3b99ee345e88ef4fb5e1d33fb (diff)
qgltf: Fix not including image files in the qrc
Once again, the problem surfaces: when not specifying an output directory, image files are not added to the resource list. Change it to go through the external texture list always. Change-Id: Ic3da5d7f8b1da958c6453f18650f2e50c70a0d1f Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qgltf/qgltf.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qgltf/qgltf.cpp b/tools/qgltf/qgltf.cpp
index 22ab5c84b..14e23939f 100644
--- a/tools/qgltf/qgltf.cpp
+++ b/tools/qgltf/qgltf.cpp
@@ -1191,12 +1191,12 @@ bool Exporter::nodeIsUseful(const Importer::Node *n) const
void Exporter::copyExternalTextures(const QString &inputFilename)
{
- // External textures need copying only when output dir was specified.
- if (!opts.outDir.isEmpty()) {
- foreach (const QString &textureFilename, m_importer->externalTextures()) {
- QString dst = opts.outDir + textureFilename;
- QString src = QFileInfo(inputFilename).path() + QStringLiteral("/") + textureFilename;
- m_files.insert(QFileInfo(dst).fileName());
+ foreach (const QString &textureFilename, m_importer->externalTextures()) {
+ const QString dst = opts.outDir + textureFilename;
+ m_files.insert(QFileInfo(dst).fileName());
+ // External textures need copying only when output dir was specified.
+ if (!opts.outDir.isEmpty()) {
+ const QString src = QFileInfo(inputFilename).path() + QStringLiteral("/") + textureFilename;
if (QFileInfo(src).absolutePath() != QFileInfo(dst).absolutePath()) {
if (opts.showLog)
qDebug().noquote() << "Copying" << src << "to" << dst;