Andre Poenitz a écrit :
On Tue, Dec 27, 2005 at 11:43:05AM +0100, Abdel wrote:
Dear developpers,
I could not sleep last night so I tried as an exercise to see if lyx
could be ported easily to the fresh Qt-4.1. As you might guess it was
more difficult than I originally thought. But after much work it
compiles and loads!
Whohey.
It tool me almost two weeks to covert less than 100 kLOC from
Qt 3.3. to 4.0.
There is a problem QImage which doesn't support any image format. I
suspect the Painter is not correctly started. Because of that, the
program could not load any document (more on that later). But the
menubar, the "Browse file" dialog and the about box are functional.
I don't know if this is interesting to you and if you planned already to
port to Qt4.1 sometimes in the future.
I've even heard somebody at Trolltech pondering that issue ;-}
I resolved the problem by using QImageReader instead.
If so, I am willing to help completing this port if someone more
knowledgeable than me take lead. If not, it was fun anyway and I
learned a bit about Qt4 in the process. IMO it is much cleaner that
Qt3
It really is.
(Disclaimer: I knew close to nothing on these two before yesterday). I
could send my qt4 directory to anyone interested in any case.
What I did:
1) copy "src/frontends/qt2" to "src/frontends/qt4" 2) launch qt3to4
porting tool to all .C and .h 3) replace uic with uic3 in all
Makefiles 4) remove "-tr qt_" from UICFLAGS in all Makefiles 5)
compile and fix...
So this uses the Q3* suport classes?
I think we should get rid of them in the long run and favour 'proper'
Qt 4 classes (even if the Q3* stuff is officially part of Qt4)
I am getting rid of most of them right now.
In any case, getting the beast up and running is a big step forward in
this area.
Thanks. But all the credits goes to you all and specially John Levon who
wrote portable code. By the way is there a rule concerning the \author
field in the source?
I know nothing about the auto-tools so I just modified the Makefile,
sorry about that.
The big remaining problem is with QPicture. In order to let lyx start,
I had to comment line "src/graphics/GraphicsCacheItem.C":340
_QPicture_? We should not have used this at all?
[...]
displayed filename:
D:\msys\home\yns\src\lyx-devel\lib\images\banner.ppm Recognised
Fileformat: ppm
The file contains ppm format data.
Just convert the ppm to png and use this. Less hassle than anything
else.
I have resolved that problem but it's true that a format change would be
probably better. I would say SVG instead.
Thanks for taking the time to answer this,
Abdel.
Andre'