Misuse of K_GLOBAL_STATIC?

Jaroslaw Staniek js at iidea.pl
Wed May 14 12:40:03 BST 2008


Thiago Macieira said the following, On 2008-05-14 13:28:
> On Wednesday 14 May 2008 13:21:47 Jarosław Staniek wrote:
>> Hi, shouldn't we move K_GLOBAL_STATIC out of the bodies in such cases?
>>
>>
>> KIMProxy * KIMProxy::instance()
>> {
>> 	K_GLOBAL_STATIC(KIMProxy, s_instance)
>> 	return s_instance;
>> }
> 
> Yes, they should be out of function bodies. The use above is not what 
> K_GLOBAL_STATIC was intended to be. I recommend not doing it even though it 
> works. Something might change in the future.

If so, please read my other post in this thread: we have many private ctors...

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
  KDE Libraries for MS Windows (http://windows.kde.org)




More information about the kde-core-devel mailing list