From e9d680f79d963870ab70efdcff92fb5a38aecffc Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 9 Jul 2012 07:47:24 +0000 Subject: [PATCH] 2012-07-09 00:44 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbmk2_qt.hb ! Fixed: to identify and set the object's name. Though it was not doing any harm, but it is a futuristic move where we would be able to retrieve an object given its name. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbqt/hbmk2_qt.hb | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 04bb1ed4a7..48b94cc514 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-09 00:44 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/hbmk2_qt.hb + ! Fixed: to identify and set the object's name. + Though it was not doing any harm, but it is a futuristic + move where we would be able to retrieve an object given its name. + 2012-07-08 10:56 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbmk2_qt.hb + Added: few more Qt defined variable types. diff --git a/harbour/contrib/hbqt/hbmk2_qt.hb b/harbour/contrib/hbqt/hbmk2_qt.hb index 05ce1ed747..a73ba31670 100644 --- a/harbour/contrib/hbqt/hbmk2_qt.hb +++ b/harbour/contrib/hbqt/hbmk2_qt.hb @@ -634,6 +634,9 @@ STATIC FUNCTION hbqtui_gen_prg( cFile, cFuncName ) IF "setupUi" $ s lCreateFinished := .T. + ELSEIF Left( s, 4 ) == "if (" + // It is the test for main widget's objectName, leave it. + ELSEIF Left( s, 1 ) == "Q" .AND. ! lCreateFinished .AND. ( n := At( "*", s ) ) > 0 // We will deal later - just skip @@ -651,9 +654,6 @@ STATIC FUNCTION hbqtui_gen_prg( cFile, cFuncName ) ELSEIF hbqtui_isNonImplementedMethod( s ) // DO nothing - ELSEIF hbqtui_isObjectNameSet( s ) /* This is needed as it is not being set in class construction */ - // Skip - we already know the object name and will set after construction - ELSEIF ! Empty( cText := hbqtui_pullSetToolTip( aLines, s:__enumIndex() ) ) n := At( "->", cText ) cNam := AllTrim( SubStr( cText, 1, n - 1 ) ) @@ -3402,9 +3402,14 @@ STATIC FUNCTION qth_is_QObject( cWidget ) aadd( aQObjects, "QGLWidget" ) aadd( aQObjects, "QGraphicsSvgItem" ) + aadd( aQObjects, "QSvgRenderer" ) aadd( aQObjects, "QScriptEngine" ) aadd( aQObjects, "QScriptExtensionPlugin" ) + + aadd( aQObjects, "QAudioInput" ) + aadd( aQObjects, "QAudioOutput" ) + ENDIF RETURN ascan( aQObjects, {|e| e == cWidget } ) > 0