QT/WIN32: VC Patches

Ralf Habacker ralf.habacker at freenet.de
Sun Apr 25 20:35:21 CEST 2004


On Saturday 24 April 2004 23:43, Ralf Habacker wrote:
> On Saturday 24 April 2004 23:04, Peter Kuemmel wrote:
> > Hello,
> > the patches are
> > - the diff file
> > - the files I've added (I'm not familary with diff)
> >    (too much for the mailing list 100kB, the email came back)
>
> If a message is too big it will be redirected to the mailing list admin
> (me), who can lead this through. the mail with the QT VC Patches III will
> be available on the list in short.
>
> > I'm not sure if gcc will work with this patches (maybe I've destroyed
> > someone others work).
> >
> > To compile the headers must be in the /inlude directory, the links
> > generated by "make -f Makefile.cvs" don't work with vc: copy all *.h to
> > /include and then move all *_p.h to /private.
> > The most changes of existing code I've #ifdef ed with the MSC macro.
> > Qt  compiles without an without the UNICODE macro; when UNICODE is
> > enabled the text is gone (textirs), maybe my typecasts are too stupid.
> > All these casts are marked with #if defined (MSC) && (UNICODE).
> >
> > I have to say, that come code is from the Wolfpack Emu project,
> > http://sourceforge.net/projects/wpdev/.
> > Their gui-less port compiles with the command line tools of ms.

Can you explain which code you have taken from this project ? The easist would 
be submit a link to the used dir/files based on 
http://cvs.sourceforge.net/viewcvs.py/wpdev


> > My setup is Win2k and Visual c++ 6 Sp6.
> >
> > Compiling with the free as beer Toolkit leads to some template related
> > errors.
>
> I will take a look on your patches in the next time and how to incoporate
> them into the cvs. Thanks for you efforts.

After taking a deeper look I recognized three topics: 

1. cygwin related replacements like qsocketdevice_win.cpp 
2. unicode related changes 
3. msvc related changes

for each topic I have some notes rsp questions: 

1. QT defines some already defined macros for os an compilers. For Vc you 
should use Q_CC_MSVC instead of MSC (this is an information for further 
patches)

2. I've seen some unicode relating fixes. There are already defined macros, 
which may help you. The are named QT_WA and QT_WA_INLINE and are designed to 
switch between unicode and nonunicode code on runtime.

#if defined(UNICODE)
#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )

One question: Are the unicode patches complete ? 

3. qthread_win.cpp  -
 How much is this complete. How stable is this implementation ? 

4. qsocketdevice_win.cpp - 
question like above: How much is this complete. How stable is this 
implementation ? 
Additional: Would it not be easier to add #define E... WSAE... at the 
beginning of the file and to leave the E message in the source, which makes 
it easier to compare the implementation with the unix one.? 

5. I found some qt3.2 related os specific files. Does this mean that your port 
is based on the QT_WIN32_3_2_BRANCH ? 
You have answered this in another email in an manner, that you are using 
qt3.3.1 from ??? 
 
6. The qfontengine_win.cpp implementation isn't complete. I assume have you 
make a msvc compilable qt version without gui functionality. 

Resume: As you have stated in another email is you patch more a "proof of 
design" and not complete. (That doesn't matter, important is that there are 
some steps in this direction). Because there are some more actions required 
to release a real msvc port, I suggest to concentrate on the non gui porting 
efforts yet.  Fortunally I have a vc license, so I can check and improve this 
build from time to time to see what goes wrong. Because one of the goals of 
the native qt port is to support a mingw based build system, supporting a 
msvc build system too seems to me not to be very much complicated. 

Ralf 
 




More information about the kde-cygwin mailing list