2012-04-20 23:18 UTC+0200 Francesco Perillo ( fperillo at gmail.com )
* contrib/hbqt/hbmk2_qt.hbs
Typo that generated wrong cpp code
*HBQT USERS PLEASE READ*
Please note that this patch introduces parameter checking on hbQt
methods when parameter is a hbQt object.
Up to now you could do some weird (and illegal) things like
passing a QLabel when a QToolbar was expected. These lead to GPF, also
random. Now hbQt checks that the object passed is of the expected type
or of a subclass. If the method expects a QToolbar as parameter now an
error is generated if we pass a QLabel. If the method expects a QWidget,
it is possible to pass a QWidget, a QLabel, or any other hbQt object
derived from QWidget, also user-defined ones.
It may be that this patch breaks old *WRONG* code that just for
casualty was not generating GPF. So if your program starts to report
errors for wrong parameters, please check your code.
Another change is that when a hbQt goes out of scope a disconnect() is
forced immediately in the destructor. This will prevent that
events/signals are activated by Qt for that object while it waits
for harbour GC to delete it. This was common during window closing step
or program end.
This commit is contained in:
@@ -16,6 +16,30 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-04-20 23:18 UTC+0200 Francesco Perillo ( fperillo at gmail.com )
|
||||
|
||||
* contrib/hbqt/hbmk2_qt.hbs
|
||||
Typo that generated wrong cpp code
|
||||
*HBQT USERS PLEASE READ*
|
||||
Please note that this patch introduces parameter checking on hbQt
|
||||
methods when parameter is a hbQt object.
|
||||
Up to now you could do some weird (and illegal) things like
|
||||
passing a QLabel when a QToolbar was expected. These lead to GPF, also
|
||||
random. Now hbQt checks that the object passed is of the expected type
|
||||
or of a subclass. If the method expects a QToolbar as parameter now an
|
||||
error is generated if we pass a QLabel. If the method expects a QWidget,
|
||||
it is possible to pass a QWidget, a QLabel, or any other hbQt object
|
||||
derived from QWidget, also user-defined ones.
|
||||
It may be that this patch breaks old *WRONG* code that just for
|
||||
casualty was not generating GPF. So if your program starts to report
|
||||
errors for wrong parameters, please check your code.
|
||||
|
||||
Another change is that when a hbQt goes out of scope a disconnect() is
|
||||
forced immediately in the destructor. This will prevent that
|
||||
events/signals are activated by Qt for that object while it waits
|
||||
for harbour GC to delete it. This was common during window closing step
|
||||
or program end.
|
||||
|
||||
2012-04-20 21:22 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* include/harbour.hbx
|
||||
* set formatting for new functions
|
||||
|
||||
@@ -2320,9 +2320,9 @@ STATIC FUNCTION hbqtgen_paramCheckStrCpp( cType, nArg, cCast )
|
||||
CASE "P" //TODO
|
||||
RETURN "HB_ISPOINTER( " + hb_ntos( nArg ) + " )"
|
||||
CASE "O"
|
||||
RETURN "hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ", " + '"HB_' + cCast + '"' + " )"
|
||||
RETURN "hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ', "' + upper( cCast ) +'" )'
|
||||
CASE "CO"
|
||||
RETURN "( hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ", " + '"HB_' + cCast +'"' + " ) || HB_ISCHAR( " + hb_ntos( nArg ) + " ) )"
|
||||
RETURN "( hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ', "' + upper( cCast ) + '" )' + " || HB_ISCHAR( " + hb_ntos( nArg ) + " ) )"
|
||||
CASE "N*"
|
||||
RETURN "HB_ISBYREF( " + hb_ntos( nArg ) + " )"
|
||||
CASE "N"
|
||||
|
||||
Reference in New Issue
Block a user