Generate a fatal error as appropriate.
authorStephen Kelly <stephen.kelly@kdab.com>
Fri, 13 Jul 2012 17:32:47 +0000 (19:32 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 16 Jul 2012 14:30:55 +0000 (16:30 +0200)
Otherwise, subdirectories under directories which are added to
a resource file generate garbage in the binary.

The easiest way to see this is

 cd tests/auto/corelib/kernel/qvariant
 mkdir stream/qt4.9/somedir
 make && ./tst_qvariant loadQt4Stream

Change-Id: I32630ecb6d515db1d135f0ffc5cf14fd8caa0a4f
Reviewed-by: hjk <qthjk@ovi.com>
src/tools/rcc/rcc.cpp

index 4d9b5e1..32aba07 100644 (file)
@@ -835,8 +835,10 @@ bool RCCResourceLibrary::writeDataBlobs()
                 pending.push(child);
             else {
                 offset = child->writeDataBlob(*this, offset, &errorMessage);
-                if (offset == 0)
+                if (offset == 0) {
                     m_errorDevice->write(errorMessage.toUtf8());
+                    return false;
+                }
             }
         }
     }