]> git.lyx.org Git - features.git/commit
Seed Qt's random generator
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 19 May 2013 11:59:07 +0000 (13:59 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 19 May 2013 11:59:45 +0000 (13:59 +0200)
commit327f7ed90dbcaad92511b962a8d1d14b46ef552a
tree2ce2f7a02de7f745588af1adccd4e980f5911d88
parent30f518707009150cbe6ef13d717d535b61f584df
Seed Qt's random generator

LyX uses QTemporaryFile to create a unique temporary directory. This
temporary directory will consist of two random characters and the process
identifier (PID).

Currently, the two random characters are often the same because Qt's
random generator was not seeded. If there are a lot of lyx temporary
directories accumulated, the chance of failing to find a unique temporary
directory is (N/100)%.

The temporary directories can be left behind if either LyX crashes, or
when a file in the temporary directory is opened in another viewer when
LyX closes. This can be a pdf that is viewed in a reader that disallows
the file to be removed while viewing it.
src/frontends/qt4/GuiApplication.cpp