Fix crashes in QtHelp when too many connections are made
authorKai Koehne <kai.koehne@digia.com>
Mon, 27 Jan 2014 15:43:40 +0000 (16:43 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 28 Jan 2014 06:01:23 +0000 (07:01 +0100)
commit6481e28ba0d696cf41a2a5bc32b01db85f95b333
tree80cb2c9ee0b31a102bd9c882377eeee02848fd1d
parent5d1d088d65bef8ba3d774366b455661662b564cc
Fix crashes in QtHelp when too many connections are made

Fixes a crash when Qt Creator was registering a large number of .qch
files on first startup: In this case the limit of 1000 connections
within one session will overflow, resulting in conflicting connection
names and crashes later on.

Remove this limitation by keeping separate counters per connection name,
and also not wrapping around after 1000.

It's not clear where the 1000 connection limit stems from: The offending
lines predate the first git import of Qt 4.

Task-number: QTBUG-36480
Change-Id: If00276652644efa854a75407d00ba01069bde02a
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
src/assistant/help/qhelp_global.cpp