diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-24 13:54:31 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-24 13:54:31 (GMT) |
commit | 57f2890a28f5bed8476019d4f280e75e982cfe25 (patch) | |
tree | 240141ac035020f005c633c2c839f8e2e0efd4bd /tools | |
parent | 59a35a794e433f9526aff72025c0899e76ef362e (diff) | |
download | Qt-57f2890a28f5bed8476019d4f280e75e982cfe25.zip Qt-57f2890a28f5bed8476019d4f280e75e982cfe25.tar.gz Qt-57f2890a28f5bed8476019d4f280e75e982cfe25.tar.bz2 |
Ensured that an uninitialized output codec is never used.
See task for contributor information.
Task-number: QTBUG-16462
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/pagegenerator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index e9566ee..89ec6fe 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE Nothing to do in the constructor. */ PageGenerator::PageGenerator() + : outputCodec(0) { // nothing. } @@ -294,7 +295,9 @@ void PageGenerator::beginSubPage(const Location& location, if (!outFile->open(QFile::WriteOnly)) location.fatal(tr("Cannot open output file '%1'").arg(outFile->fileName())); QTextStream* out = new QTextStream(outFile); - out->setCodec(outputCodec); + + if (outputCodec) + out->setCodec(outputCodec); outStreamStack.push(out); } |