[Kde-windows] KDE/kdelibs/win

Jarosław Staniek js at iidea.pl
Mon Oct 17 20:12:38 CEST 2005


Ralf Habacker said the following, On 2005-10-17 19:41:

> Am Montag, 17. Oktober 2005 18:34 schrieb Jarosław Staniek:
> 
>>Ralf Habacker said the following, On 2005-10-17 18:06:
>>
>>>Am Montag, 17. Oktober 2005 16:59 schrieb Jarosław Staniek:
>>>
>>>>Ralf Habacker said the following, On 2005-10-17 16:47:
>>>>
>>>>>SVN commit 471384 by habacker:
>>>>>
>>>>>don't need this stuff for qt4, dcopserver runs without it
>>>>>
>>>>>D             bootstrap.cpp
>>>>
>>>>Hm?
>>>>bootstrap.cpp is not only for qeventloop. Look at the code and docs...
>>>>More code like this will go here too. Or have you moved this somewhere?
>>>
>>>You mean this bootstrap stuff which is called  before main and requires
>>>special hacking of the main function ?
>>>
>>>The eventloop startup is obsolate , but I have overseen that there will
>>>be directories created and the HOME var set in win95 case, sorry. I have
>>>readded this file without the qeventloop stuff.
>>>
>>>BTW: Should KDE really  support win95 ?
>>
>>KDE? I never worked on KDE for windows but on kdelibs.
>>Read explanation here, again (hmm, offline currently):
>>http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32
>>
>>
>>>And what about the network startup
>>>stuff ? KICE calls it too and QT as far as I can see too ?
>>
>>which one 'network startup'?
>>
> 
> 
> KDEWIN32_EXPORT void kde_bootstrap()
> {
> 	...
> 	WSADATA wsadata;
> 	WSAStartup(MAKEWORD(2,2),&wsadata);
> 
> This function starts up networking.

I guess this was for dcop. So now can be removed (better: commented out).

> See 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/wsastartup_2.asp
> 
> 
>>>BTW2: I think that there is a better way to create pre/after main
>>>functions. You can create a class and create a global instance of this.
>>>This instance will be created and the constructor be called before main.
>>>
>>>
>>>#include <stdio.h>
>>>
>>>class KDEbootstrap {
>>>public:
>>>	KDEbootstrap();
>>>	~KDEbootstrap();
>>>};
>>>
>>>
>>>KDEbootstrap::KDEbootstrap()
>>>{
>>>	printf("bootstrap created\n");
>>>	// stuff called before main
>>>}
>>>
>>>KDEbootstrap::~KDEbootstrap()
>>>{
>>>	printf("bootstrap delete\n");
>>>	// stuff called after main
>>>}
>>>
>>>KDEbootstrap bootstrap;
>>
>>We dont want to require devs to put
>>
>>KDEbootstrap bootstrap;
>>
>>into application code (e.g. main.cpp).
>>
>>
>>So where do you want to put it? My candidate could be KInstance....
> 
> 
> See the updated bootsrap.cpp (kde_bootstrap() may be directly included into 
> the constructor and kde_destroy() in the destructor)
> 

First, read dfaure answer - existing solution doesn't break anything: 
developers cannot see a difference...

Now note it's dangerous to rely on static members destruction: you never know 
in which order destructors are called. With kdemain() it's always 
deterministic. SO here I'd vote for not using KDEbootstrap object, unles you 
know something annoing our devs..

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska
  Kexi Developer:
      http://www.kexi-project.org | http://koffice.org/kexi
  KDE3, KDE4 libraries for developing MS Windows applications:
      http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32




More information about the Kde-windows mailing list