summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_qtscript.js
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-05 08:57:19 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-08-17 15:52:21 (GMT)
commitd71d3b1ce31ffc585258330d825ff8ea535254ef (patch)
tree2058c6a30106731da937b3b253d30db1a73c7b9b /doc/src/snippets/code/doc_src_qtscript.js
parent63bb67d3107b03f399cddf4c9cca9c7eb347b62d (diff)
downloadQt-d71d3b1ce31ffc585258330d825ff8ea535254ef.zip
Qt-d71d3b1ce31ffc585258330d825ff8ea535254ef.tar.gz
Qt-d71d3b1ce31ffc585258330d825ff8ea535254ef.tar.bz2
Use QStringBuilder when copying template for modification
This avoids modifying the original string in the case where a placeholder marker is not found. By marking the variable const we further avoid checks on the reference count and detaches, also allowing us to safely reuse it later in the function. The new approach also fixes an issue where suffix wasn't empty, but the toLocal8Bit conversion would be. This resulted in a buffer overflow inside createFileFromTemplate. Reviewed-by: Shane Kearns
Diffstat (limited to 'doc/src/snippets/code/doc_src_qtscript.js')
0 files changed, 0 insertions, 0 deletions