Do not delete someone else's QSystemLocale when constructing another
The QSystemLocale constructor remembers the most-recently-constructed instance - a dodgy enough proposition at the best of times - and shares it with much of the rest of QLocale. There is a global static instance, actually of a derived singleton class, to which it is usually set on program start-up. However, the constructor deleted the remembered instance before remembering any new instances; there was no way this could not lead to bad consequences. So let's not do that. Change-Id: Ie8f3d655c9d4f75f6ec00a5861d98d6020ecc633 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
b56c8a3b3d
commit
2c13070162
@ -594,7 +594,6 @@ static QLocalePrivate *c_private()
|
||||
*/
|
||||
QSystemLocale::QSystemLocale()
|
||||
{
|
||||
delete _systemLocale;
|
||||
_systemLocale = this;
|
||||
|
||||
if (system_data)
|
||||
|
Loading…
Reference in New Issue
Block a user