[patch] qlibrary_win.cpp

Andy Goossens andygoossens at pandora.be
Thu Oct 9 23:48:14 CEST 2003


Hi,

On Friday 03 October 2003 02:57, Thiago A. Corrêa wrote:
>     This is from my port, I'm not quite sure how I'm supposed to send the
> patches in, so, trying with this smaller one first *smile*.

I was porting a totally different class to Windows and now I have some general 
questions about porting. I'm not a Win32 API wizzard myself and I was just 
wondering how some things are done.


* In Thiago's patch, I saw the use of "LoadLibraryA". I know that several 
Win32 functions have *A and *W variants. (e.g. LoadLibraryA <-> LoadLibraryW) 
Which one should be used? Or... is it better to just use the "LoadLibrary" 
define here? (see /usr/include/w32api/winbase.h:
#ifdef UNICODE
#define LoadLibrary LoadLibraryW
#else
#define LoadLibrary LoadLibraryA
#endif
)
or should the QT_WA/QT_WA_INCLUDE macro be used? (see src/tools/global.h)

* What should be best suited for filenames? I saw Thiago used 
filename.latin1() for the LoadLibraryA function. But doesn't this give 
problems on NT-based systems with a unicode filesystem? Or should we depend 
on QFile::encodeName(filename)? 
This part of the Qt's QFile::encodeName(filename) documentation worries me 
though:
"On Windows NT/2000, Unicode file names are supported directly in the file 
system and this function should be avoided. On Windows 95, non-Latin1 locales 
are not supported."
I'm just afraid I code something for a certain Windows version that breaks for 
someone else :-)

* Which license clauses do we need to have at the start of each file? 
Obviously we need to have the GPL clause since that is our starting point. 
But what about QPL, aren't we obliged too? Until now, I've seen some 
*_win.cpp files with GPL, GPL+QPL or even no license at all.


Greets,
-- 
// Andy Goossens

// Quote of the moment:
A horse!  A horse!  My kingdom for a horse!
		-- Wm. Shakespeare, "Henry VI"



More information about the kde-cygwin mailing list