Hmm... That's odd. I wonder why even the Qt examples are so filled with "bugs" ie. missing delete statements. Apparently they rely on some sort of auto-cleanup of resources.
@alfkil Btw, as i check in all that QT examples, looks like with default QT menus, we can't spawn a menu just by pressing RMB on any working area ? (as we can do with native programms). It is QT itself designed like this, or need to add handler ? (just some annoing about one more pluse for native menus :) )
here is a new archive of qterminal, i have ran the get_qtermwidget.sh and build.sh script on my ubuntu machine, as they wouldn't work from the amiga, so the files are in place and patched, ready to be built. should make things a lot easier. qterminal.zip - 0.24MB
About the garbage collect thing then yes, on Ubuntu at least there is no such thing as c++ garbage collection (just tested). This is strange, though: On mac os, there is some kind of garbage collection implemented in objective c, so why not in c++?
@spotup I tryed , and that what we have when trying to build qwidgetterm.so :
1. <sys/mman.h> (all those mmap, READ_PROT, MAP_PRIVATE, etc). Uses in 2 files, pretty easy to replace on malloc() & co.
2. Pty.cpp use <termios.h>. What mean all those: IXOFF, IXON, IXOFF, VERASE, tcgetpgrp() and + some stuff from termios (like struct ::termios blabla). Kpty.cpp also uses all that stuff , + some other (which i think KDE related). After that i not going futher, because its understanable that easy port will not be done, and need some reall rewriting.
@alkfil Found some info about qt-garbage-collection (here link )
Quote:
This is just a QT beginner question. In samples in example here: http://doc.qt.nokia.com/4.6/widgets-lineedits.html ...we can see, that there are lots of Q** components allocated with "new" but never deleted with "delete[]".
And answer for him:
Quote:
Q_OBJECT handles deletion of its children. ( explained in docs , about QOBJECT) , but this is only true for the classes that are derived from QOBJECT. classes which does not have parents or if they are top level widgets , we have to care of deleting them.
Some more info (10 year old, but still), on trolltech site:
Quote:
> Hi, > Does anyone know about the garbage collection mechanism in Qt or give me > some clue about it? thanks. There is none. C++ does no garbage collection, so qt doesn't either. But if you delete a Q_OBJECT, all subobjects are deleted (you remember, all Q_OBJECTs have a "parent" parameter in the constructor: if the parent gets destructed, the object gets destructed too).
Just try easyPaint but here it crash at startup so it doesn't work, any tips ?
Quote:
Crash log for task "easyPaint" Generated by GrimReaper 53.2 Crash occured in module libQtGui.so at address 0x6C988BAC Type of crash: DSI (Data Storage Interrupt) exception
@samo79 Stack size imho (i not put stack-cookie in the code itself, because it was not for release, just for internal testings). Do something like stack 2000000 in the shell, and then try.
For sure every QT port later should have stack cookie all the time (if we will not found a way to put it to sobjes), and that should be noted to some "qt-porting-on-amigaos4.txt" file (i already works on such text).
So... First step with menus complete: There is now an actual menu with the right text in the right places. Unfortunately it is not possible for sgrab to capture menus... :(
@alfkil Yeah !! Imho hardest part are done, the nextly are cosmetic imho ? (like handling RMB, or its automatically already ?).
Btw, menu for now are only dynamic ? I mean for example you have "File" words in the menu at top of window, its is now reaction button, or its the same as before, or there is none at all now ?
But its all really cool :) Maybe can upload libqtgui.so separately (if changes only here?), so we can test the stuff already :)
@samo79 Corruptions of textures as i know happens because of unfixed-public warp3d, and corruptions of text happens because of something like:
Quote:
2) Trashed text rendering [HELP NEEDED] This is because of an api "discrepancy" in minigl. I need to look at the minigl sources again to see, if I can fix it.
3) Trashed textures [WAIT FOR WARP3D] As far as I know, this has already been fixed in Warp3D, correct?
I only recompile that program, without any kind of changes :) All the answers about only alfkil have :)
So QT use that library (MiniGL) in all the part of the interface (?)... didn't know that and maybe now i'm understand why all things remain a bit slow (very slow in certain case), well just hope in new update maybe there will be a new MiniGL 2.6 on CD
So QT use that library (MiniGL) in all the part of the interface (?)... didn't know that and maybe now i'm understand why all things remain a bit slow (very slow in certain case),
Yep, alfkil say somethere in that thread, that everything use MiniGL. Dunno if it possible at all for him to swith it off/on on current stage.
Quote:
well just hope in new update maybe there will be a new MiniGL 2.6
Hans say, that MiniGL2.5 was the latest one from MiniGL series (except if someone else, but not him, will add something to it, then he will release an update). For now everything will be concetrated on finishing of radeonHd drivers and working with 3d (galium/mesa).
About the garbage collect thing then yes, on Ubuntu at least there is no such thing as c++ garbage collection (just tested). This is strange, though: On mac os, there is some kind of garbage collection implemented in objective c, so why not in c++?
Dunno, maybe different language design philosophy?
I'm sure you'll find more missing deletes or free() calls in nix software.