Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ercp-dev] Linux x86 SWT Qt port...

Comments inlined..

On Wed, Sep 30, 2009 at 4:34 PM, Remy Suen <remysuen@xxxxxxxxxx> wrote:

Hello, I have some questions about the Linux x86 SWT Qt port that the eRCP project is providing. I downloaded the early access build last night and tinkered around with it.
http://www.eclipse.org/ercp/downloads-page.html

It didn't seem very aesthetically pleasing but I think that's because I don't have any Qt themes (I don't use KDE). :P Nonetheless, I was pleasantly surprised by how far it is. Great work! I got a VM crash at one point and I'll try to file a bug later if I can reproduce it.


On my KDE it looks good :), glad that you liked the progress. Please do report anything that you see broken.
 


1. How many .so libraries are there? I tried copying it to my workspace where I have the code checked out from CVS but it was unable to load methods like JniUtils_new (or whatever it's called, I don't have the code in front of me at the moment). Are the libraries included in the 20090909 build already "old" compared to what's in CVS right now?

There is only a single .so file. It is included in the jar file for SWT fragment. You are correct the .so on the CVS goes out of sync with the CVS as we have not yet established a mechanism of updating CVS from our auto-build system. That is something we will do in the future but for now we are updating the native libraries when we refresh the download package. Next one is due next week actually.


2. How do I actually build the x86 port? I couldn't find any Makefiles or .mak files, which the desktop SWT implementations seems to use, unless I was looking in the wrong places. I did see some .pri files though it was not clear to me what those are. Is that for processing by another build system? qmake, perhaps?

We use qmake so basically if you call qmake & make on the library folder it should compile the native parts the .pro file has the build magic in it. Alternatively you can checkout the org.eclipse.ercp.swt.qt.linux.x86 the build.xml inside that project has a target called build.lib which will take care of it. Note that we depend on Qt 4.5 so it probably won't compile for earlier Qt versions. I have also quickly put a wiki page compiled from the Nokia internal instructions http://wiki.eclipse.org/ERCP/build/HowToBuildeSWTforQt . I still need to test the instructions though.
 


3. I noticed in your Control's computeSize(int, int, boolean) implementation that you invoke the sizeHint() method on a QWidget. Are you actually setting QLayouts on the widgets? What kind of layout? I could not seem to find any places in the code where a layout is actually set except in a few cases (like for the menu bar I think). I have tried using similar code in my SWT Qt experiments but I seem to be getting sizes of zeroes, which I presume is because I don't have a QLayout set. It could be that I'm just doing something wrong as I am not familiar with C++.
http://doc.trolltech.com/4.4/qwidget.html#sizeHint-prop

We do not normally use QLayout as you have noticed QLayout is used only for the menu bar, Jussi can fill in the details for it. But Qt widgets (those deriving from QWidget) actually override sizeHint so if you test the sizeHint for a widget such as Label with a text you should get a value different from 0. QWidget by itself does not have a size.
 

At the moment, I have used the SWT JNI generator to generate some bits of code though there are handwritten components here and there like the QObject I had to create for installation as an event filter. Right now, I've barely managed to get a shell opened with a display processing events with the event filter passing back Qt events to the Java side. This isn't much but has been a great learning experience.

This is progress actually. Is SWT JNI generator configurable so that we can mix manual parts and generated code together? We already know that, we will have some code (like the event filter) that needs to be coded.
 


I would be interested in helping generalize the Qt port for usage on x86 Linux systems in addition to swapping out some/most of the handwritten JNI code to generated code by the SWT generator.

That is something we are interested in as well. I can try to help as much as I can. Would you like open a bug report to follow the progress.
 


Thank you for your time.

Regards,
Remy

----------
Remy Suen
Rational Team Concert Developer, Eclipse Platform/UI Committer
IBM Ottawa
613-356-5162


_______________________________________________
ercp-dev mailing list
ercp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ercp-dev



Back to the top