diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-11-11 14:22:49 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-04-04 11:22:46 (GMT) |
commit | 1c09fc7013f0058ff96c52a39637d0167d084dce (patch) | |
tree | e3cf5a70e57b17ab9c1a760a95ebd6af19813d7c /doc/src/snippets/code/doc_src_qtscript.js | |
parent | 83bd00bb75fafa7fa6526e7ef2091227ee35fdc6 (diff) | |
download | Qt-1c09fc7013f0058ff96c52a39637d0167d084dce.zip Qt-1c09fc7013f0058ff96c52a39637d0167d084dce.tar.gz Qt-1c09fc7013f0058ff96c52a39637d0167d084dce.tar.bz2 |
QTemporaryFile: More dead code elimination
There are exactly 2 uses of the _gettemp function: one for windows
platforms, one for all others. Windows requests a file name, others
request a valid file descriptor for that file name.
Despite the 2 distinct use cases, the code was full of #ifdefs to keep
never used code paths compiling.
With this change the qt_mkstemp wrapper is eliminated, together with
dead code inside if (doopen) {} blocks on Windows platforms. The more
proper Q_OS_WIN macro is preferred to Q_WS_WIN.
_gettemp is also changed to return the valid file descriptor on
non-Windows platforms.
Reviewed-by: Olivier Goffart
Reviewed-by: Robin Burchell
Diffstat (limited to 'doc/src/snippets/code/doc_src_qtscript.js')
0 files changed, 0 insertions, 0 deletions