Board index » kylix » Re: Comming up: Qt3 support for Kylix

Re: Comming up: Qt3 support for Kylix


2004-08-02 08:36:38 PM
kylix0
Andreas Hausladen wrote:
Quote
Bob Goddard wrote:

>What was the point in that?

The reason was, that I have joined the Qt# project. And the APILoader
that loads the xml files, generates C and C# code is written in C#. I
have almost rewritten all methods and added a KylixWriter.
Okay. Somehow I think you have taken the wrong decision. Most people
do not have mono installed and are unlikely to do so.
B
 
 

Re:Re: Comming up: Qt3 support for Kylix

Bob Goddard wrote:
Quote
Okay. Somehow I think you have taken the wrong decision. Most people
do not have mono installed and are unlikely to do so.
That is no problem because I the deploy package would contain the
generated .cpp and .pas files. So only gcc is required in the final step.
I do not think that most people want to change the generated .cpp and .pas
files. They want to use them. And if someone wants to change something
then, and only then, he must install Mono. Or start the generator under
Windows (C#Builder Personal Edition or plain MS.NET SDK is all you need
under Windows).
--
Regards,
Andreas Hausladen
(www.kylix-patch.de.vu - unofficial Kylix 3 patches)
 

Re:Re: Comming up: Qt3 support for Kylix

Andreas Hausladen wrote:
Quote
So I hope I can release the first Kylix Qt 3 class framework on monday.
(depends on the bugs I will find).
A date I was not able to hold. There are lots of issus that must be
fixed. At the moment the whole override and signal system is missing,
but the Delphi code does not compile. An issue I try to fix.
Unfortunatelly has doxygen (which is used for the C++ file parsing) some
bugs that I must work around. (for example the "const" could be assigned
to the type's name instead of the C++ type itself...
I'll post here when the first public alpha is released.
Andreas Hausladen.
 

{smallsort}

Re:Re: Comming up: Qt3 support for Kylix

In article <410e1adf$ XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says...
Quote
Bob Goddard wrote:

>What was the point in that?

The reason was, that I have joined the Qt# project. And the APILoader that
loads the xml files, generates C and C# code is written in C#. I have
almost rewritten all methods and added a KylixWriter.
Glad to hear it! The moment I heard about Gtk# coming out, the only thing
I could think of (as a KDE fan) was... "oh god, I hope someone out there
is planning a Qt#"
Thanks :)
-- Ritchie Annand
Senior Software Architect
Malibu Software & Engineering Ltd.
Business: www.malibugroup.com
Personal: nimble.nimblebrain.net
Wiki: wiki.nimblebrain.net
 

Re:Re: Comming up: Qt3 support for Kylix

Andreas Hausladen wrote:
Quote
You had not heard something about new VisualCLX patches because I was
working on a Qt 3 C-wrapper shared object. Now the shared object is
created and my next step is to write/generate the Kylix import classes
?
The first release is there.
unvclx.sourceforge.net/kylixbindings
These files are under GPL. The binding files are all autogenerated without
any hand written code.
At the moment the signal hooks are missing and the classes that should allow
(Delphi) inheritance are not generated.
The C wrapper shared object has a size of 6 MB (gcc -Os). The gcc -O2 file
would be 1 MB more. The wrapper shared object contains the signal hooks but
the QtLibrary.pas does not import it. As the QtLibrary.pas does not depend
on the signal hooks I will place these to another unit because the
QtLibrary.pas already has a size of 5 MB (ca. 65000 lines) and the (fast)
dcc needs lots of time to compile it.
Regards,
Andreas Hausladen
 

Re:Re: Comming up: Qt3 support for Kylix

Andreas Hausladen wrote:
Quote
Andreas Hausladen wrote:

>You had not heard something about new VisualCLX patches because I was
>working on a Qt 3 C-wrapper shared object. Now the shared object is
>created and my next step is to write/generate the Kylix import classes

The first release is there.
unvclx.sourceforge.net/kylixbindings
bzip2 files are corrupted.Downloaded with wget.
libqtc:
.....
.....
clib/QDomDocumentFragment_ex.cpp
clib/SignalHooks.cpp
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Inappropriate ioctl for device
Input file = (stdin), output file = (stdout)
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
tar: Child returned status 2
tar: Error exit delayed from previous errors
 

Re:Re: Comming up: Qt3 support for Kylix

zeljko wrote:
Quote
bzip2 files are corrupted.Downloaded with wget.

libqtc:
.....
.....
clib/QDomDocumentFragment_ex.cpp
clib/SignalHooks.cpp
I had no problems decompressing the files. But as Midnight Commander hang
after the upload, I have uploaded the files again with scp, now.
The qt3forKylix.tar.bz2 contains a precompiled libqtc.so (because it needs 7
minutes to compile on my 3GHz 512MB with havy swap usage.
The Kylix unit is not stable at the moment. There meight be some wrong
Pointer <->var/const parameter issues, or even completely wrong parameter
modifiers.
And I plan to generate a third unit (the second is the signal hook unit)
that is a wrapper for the QtLibrary unit and allows normal Delphi class
with inheritance and overriding.
Such a class would look like this:
type
TWrapperHelper = class(TObject)
protected
FHandle: TImportLibraryBase;
procedure InitOverride; virtual;
procedure DestroyHandle; virtual;
public
constructor Create(AHandle: TImportLibraryBase); // invokes InitOverride
destructor Destroy; override; // invokes DestroyHandle
end;
QObject = class(TWrapperHelper)
private
function GetHandle: QObjectH;
protected
procedure InitOverride; override;
procedure DestroyHandle; override;
public
constructor Create(parent: QObject; const name: string);
...
procedure eventFilter(sender: QObject; event: QEvent); virtual;
property Handle: QObjectH read GetHandle;
end;
type
QObjectHAccess = class(QObjectH);
constructor QObject.Create(parent: QObject; const name: string);
begin
inherited Create(QObjectH.New(parent.Handle, PChar(name));
end;
procedure QObject.DestroyHandle;
begin
Handle.Delete;
end;
procedure QObject_eventFilter(Handle: QObjectH; sender: QObjectH; event:
QEventH); cdecl;
begin
QObject(MakeQtObject(Handle),
QObjectH).eventFilter(QObject(MakeQtObject(sender, QObjectH)),
QEvent(MakeQtObject(event, QEventH));
end;
procedure QObject.InitOverride;
begin
inherited InitOverride;
with QObjectHAccess(Handle) do
begin
eventFilter(TQObject
end;
end;
procedure QObject.eventFilter(sender: QObject; event: QEvent);
begin
base_eventFilter(sender, event);
end;
Regards,
Andreas Hausladen
 

Re:Re: Comming up: Qt3 support for Kylix

Andreas Hausladen wrote:
Now the QtSignalHook.pas unit is complete. The Test3.dpr uses it to hook
into the "QPushButton::clicked()" signal.
Now the third unit that makes life easier must be written...
Regards,
Andreas Hausladen
 

Re:Re: Comming up: Qt3 support for Kylix

Andreas Hausladen wrote:
Quote
I have a design question: How should the destruction of a Qt 3 object
look?
Now It works this way:
var
w: QWidgetH;
begin
w := QWidgetH.New(nil, nil, 0);
w.Delete; // deletes w
w.Free; // deletes w only "if Self <>nil"
end;
--
Regards,
Andreas Hausladen
(www.kylix-patch.de.vu - unofficial Kylix 3 patches)