summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-12-13 15:02:27 +0100
committerThiago Macieira <thiago.macieira@nokia.com>2010-12-13 15:44:19 +0100
commitbd9d5c80235ce6d1b005df96c3058b75e82bd6f0 (patch)
tree1467ba66629b21fcdf5dc136e3fefea91a3c6f8f /doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
parenta02a747a9d5294127dfe3e676a2759e228257e70 (diff)
downloadqt4-tools-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.tar.gz
Add a small protection against releasing a timer twice.
The cell corresponding to an allocated timer ID in the free list is unused (because the ID isn't free). So use it to store an invalid value that we can check against the user's value. This provides some protection against a given timer being released twice. Since we store the serial counter of the nextFreeTimerId, getting the same ID twice is a 1-in-128 chance. Reviewed-By: Bradley T. Hughes
Diffstat (limited to 'doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp')
0 files changed, 0 insertions, 0 deletions