diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2011-08-05 08:57:19 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-08-17 15:52:21 (GMT) |
commit | d71d3b1ce31ffc585258330d825ff8ea535254ef (patch) | |
tree | 2058c6a30106731da937b3b253d30db1a73c7b9b /doc/src/snippets/sqldatabase/sqldatabase.cpp | |
parent | 63bb67d3107b03f399cddf4c9cca9c7eb347b62d (diff) | |
download | Qt-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/sqldatabase/sqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions