Hi All,

Some other discoveries, which should probably be fixed:

1) QSyntaxHighlighter is not a wrapper of QT class with same name, 
   but a customized Harbour version, named HbSyntaxHighlighter. 
   This is wrong, such special class should be added as such on 
   .prg level with alternate wrappers.
2) HbSyntaxHighlighter is stored in hbqt_slots.cpp instead of 
   local file next to wrappers. This violates separation of 
   components by placing local stuff to central file.

3) Same goes (with possible differences in details) to these classes:

- MyMainWindow
- MyDrawingArea
- HbDbfModel
- HbTableView

MyMainWindow and MyDrawingArea should be given some 
more meaningful name, like HBQTMainWindow, HBQTDrawingArea.

4) We should define a common prefix for extended QT classes, 
   could be "HBQT". This means these should also be renamed:

MyMainWindow -> HBQTMainWindow
MyDrawingArea -> HBQTDrawingArea
HbSyntaxHighlighter -> HBQTSyntaxHighlighter
HbDbfModel -> HBQTDbfModel
HbTableView -> HBQTTableView

Of course by knowing the exact purpose of these inherited 
classes, we can give them even more meaningful names, 
like HBQTDbfModelXBP, or HBQTSyntaxHighlighterIDE.

Which leads to the next point: 

5) Why HBXBP and HBIDE specific stuff is present in HBQT?

I know we agreed not to add C/C++ stuff to HBXBP 
(and possibly not to HBIDE), but it's not solution to 
trick this rule by placing HBXBP/HBIDE specific C++ stuff 
to HBQT lib. HBQT is generic lib, should never contain 
app specific stuff like that.

Possible good solution is to extend wrappers in HBQT so 
that such features can be implemented on .prg level.

6) Several functions are not marked as static, while they are.

7) listBlock.clear() will clear a list of PHB_ITEMs stored 
   in a container, but nothing ensures that these items are 
   actually freed with hb_itemRelease().

I tried to fix some of these, but it's just scratching the 
surface.

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to