2010-04-12 08:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbide/ideprojmanager.prg
! Properly fixed old problem with executable name extraction,
leaving the ending delimiter in the extracted string.
! Added -width= hbmk2 option to cmdline to avoid splitting
the output to multiple lines (thus breaking executable name
extraction).
* contrib/hbqt/generator2/hbqtgen2.prg
+ Added more, very rudamentary code to parse QT headers.
This commit is contained in:
@@ -17,6 +17,17 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-04-12 08:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
! Properly fixed old problem with executable name extraction,
|
||||
leaving the ending delimiter in the extracted string.
|
||||
! Added -width= hbmk2 option to cmdline to avoid splitting
|
||||
the output to multiple lines (thus breaking executable name
|
||||
extraction).
|
||||
|
||||
* contrib/hbqt/generator2/hbqtgen2.prg
|
||||
+ Added more, very rudamentary code to parse QT headers.
|
||||
|
||||
2010-04-12 23:25 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
|
||||
! Little formatting.
|
||||
@@ -50,12 +61,12 @@
|
||||
! Changed the way project is launched. hope it will be useful for *nixes.
|
||||
|
||||
+ Implemented user-defined keyboard macros with following functionality:
|
||||
New : whatever definition is typed-in the relevant fields is validated
|
||||
New : whatever definition is typed-in the relevant fields is validated
|
||||
with existing ones and if unique is appended at the end of list.
|
||||
The macro is also validated for compilation.
|
||||
Set : current hilighted macro is redefined from values from fields
|
||||
Set : current hilighted macro is redefined from values from fields
|
||||
after duplicate validation. The macro is also validated for compilation.
|
||||
Test : Attempts to compile the macro as a block and reports back if
|
||||
Test : Attempts to compile the macro as a block and reports back if
|
||||
successful or not. It just compiles but not evaluates.
|
||||
delete : deletes the highlighted macro after confirmation.
|
||||
Load : loads macros from a disk-file and merges them with existing ones.
|
||||
@@ -64,9 +75,9 @@
|
||||
Save As: Saves the macros in a disk-file with any name but with .scu extension.
|
||||
|
||||
Any change is visible instantly,
|
||||
Unless <Save> is clicked, current loaded macros are not saved on disk.
|
||||
Unless <Save> is clicked, current loaded macros are not saved on disk.
|
||||
This allows to use temporary created macros for current session.
|
||||
|
||||
|
||||
More info at http://hbide.vouch.info/ ( Topic: Keyboard Mappings )
|
||||
|
||||
2010-04-12 22:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
|
||||
@@ -1181,6 +1181,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
|
||||
aadd( aHbp, "-trace" )
|
||||
aadd( aHbp, "-info" )
|
||||
aadd( aHbp, "-lang=en" )
|
||||
aadd( aHbp, "-width=512" )
|
||||
IF lRebuild
|
||||
aadd( aHbp, "-rebuild" )
|
||||
ENDIF
|
||||
@@ -1227,7 +1228,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
|
||||
::oIDE:oEV := IdeEnvironments():new():create( ::oIDE, hbide_pathFile( ::aINI[ INI_HBIDE, PathEnv ], "hbide.env" ) )
|
||||
::cBatch := ::oEV:prepareBatch( ::cWrkEnvironment )
|
||||
|
||||
cExeHbMk2 := "hbmk2" /* Needs that path is already set before calling hbmk2 */
|
||||
cExeHbMk2 := "hbmk2"
|
||||
|
||||
IF ! Empty( ::oProject:cPathMk2 )
|
||||
cExeHbMk2 := hbide_DirAddPathSep( ::oProject:cPathMk2 ) + cExeHbMk2
|
||||
@@ -1276,7 +1277,7 @@ METHOD IdeProjManager:showOutput( cOutput, mp2, oProcess )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
|
||||
LOCAL cTmp, n, n1, cTkn, cExe, cT
|
||||
LOCAL cTmp, n, n1, cTkn, cExe
|
||||
|
||||
hbide_justACall( oProcess )
|
||||
|
||||
@@ -1294,19 +1295,15 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
|
||||
IF empty( cExe )
|
||||
cTkn := "hbmk2: Linking... "
|
||||
IF ( n := at( cTkn, cTmp ) ) > 0
|
||||
cT := Chr( 10 )
|
||||
n1 := hb_at( cT, cTmp, n + len( cTkn ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) + len( cT ) ), Chr( 13 ), "" )
|
||||
cExe := StrTran( cExe, Chr( 10 ), "" )
|
||||
n1 := hb_at( Chr( 10 ), cTmp, n + len( cTkn ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) ), Chr( 13 ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF empty( cExe )
|
||||
cTkn := "hbmk2: Target up to date: "
|
||||
IF ( n := at( cTkn, cTmp ) ) > 0
|
||||
cT := Chr( 10 )
|
||||
n1 := hb_at( cT, cTmp, n + len( cTkn ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) + len( cT ) ), Chr( 13 ), "" )
|
||||
cExe := StrTran( cExe, Chr( 10 ), "" )
|
||||
n1 := hb_at( Chr( 10 ), cTmp, n + len( cTkn ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) ), Chr( 13 ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -9,10 +9,15 @@
|
||||
|
||||
#define F_NAME 1 /* File name */
|
||||
|
||||
#define QM_ENUM 1
|
||||
#define QM_METHOD 2
|
||||
#define QM_SLOT 3
|
||||
#define QM_SIGNAL 4
|
||||
|
||||
PROCEDURE Main()
|
||||
LOCAL cName
|
||||
LOCAL cHeaderDir
|
||||
LOCAL tmp, tmp1
|
||||
LOCAL tmp, tmp1, tmp2
|
||||
LOCAL aStuff
|
||||
|
||||
FOR EACH tmp IN Directory( "*.txt" )
|
||||
@@ -22,6 +27,10 @@ PROCEDURE Main()
|
||||
IF ! Empty( tmp1 ) .AND. ! ( Left( tmp1, 1 ) == "#" )
|
||||
aStuff := {}
|
||||
ProcessHeader( aStuff, cHeaderDir + hb_osPathSeparator() + tmp1 )
|
||||
FOR EACH tmp2 IN aStuff
|
||||
? tmp2[ 1 ], tmp2[ 2 ]
|
||||
NEXT
|
||||
Inkey( 0 )
|
||||
ENDIF
|
||||
NEXT
|
||||
NEXT
|
||||
@@ -51,6 +60,8 @@ STATIC PROCEDURE ProcessHeader( aStuff, cFileName )
|
||||
ProcessHeader( aStuff, DirAddPathSep( cDir ) + cHeader )
|
||||
ENDIF
|
||||
|
||||
LoadStuff( aStuff, cFile )
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION DirAddPathSep( cDir )
|
||||
@@ -60,3 +71,71 @@ STATIC FUNCTION DirAddPathSep( cDir )
|
||||
ENDIF
|
||||
|
||||
RETURN cDir
|
||||
|
||||
STATIC PROCEDURE LoadStuff( aStuff, cFile )
|
||||
LOCAL cLine
|
||||
LOCAL tmp, tmp1, tmp2
|
||||
LOCAL nMode := 0
|
||||
LOCAL nType
|
||||
LOCAL cInfo
|
||||
|
||||
LOCAL aLine := hb_ATokens( StrTran( cFile, Chr( 13 ) ), Chr( 10 ) )
|
||||
|
||||
FOR tmp := 1 TO Len( aLine )
|
||||
cLine := AllTrim( aLine[ tmp ] )
|
||||
IF ! Empty( cLine )
|
||||
DO CASE
|
||||
CASE cLine == "public:"
|
||||
nMode := QM_METHOD
|
||||
LOOP
|
||||
CASE cLine == "public Q_SLOTS:"
|
||||
nMode := QM_SLOT
|
||||
LOOP
|
||||
CASE cLine == "Q_SIGNALS:"
|
||||
nMode := QM_SIGNAL
|
||||
LOOP
|
||||
CASE cLine == "private:"
|
||||
nMode := 0
|
||||
LOOP
|
||||
ENDCASE
|
||||
IF ! Empty( nMode )
|
||||
nType := 0
|
||||
DO CASE
|
||||
CASE nMode == QM_METHOD
|
||||
IF Left( cLine, Len( "enum " ) ) == "enum "
|
||||
nType := QM_ENUM
|
||||
ELSE
|
||||
tmp1 := At( "(", cLine )
|
||||
IF tmp1 > 0 .AND. hb_At( ")", cLine, tmp1 + Len( "(" ) ) > 0
|
||||
nType := nMode
|
||||
ENDIF
|
||||
ENDIF
|
||||
CASE nMode == QM_SLOT
|
||||
nType := nMode
|
||||
CASE nMode == QM_SIGNAL
|
||||
nType := nMode
|
||||
ENDCASE
|
||||
IF ! Empty( nType )
|
||||
cInfo := GetLine( aLine, @tmp )
|
||||
IF ! Empty( cInfo )
|
||||
AAdd( aStuff, { nType, cInfo } )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION GetLine( aLine, /* @ */ nPos )
|
||||
LOCAL cLine := ""
|
||||
|
||||
DO WHILE nPos <= Len( aLine )
|
||||
cLine += AllTrim( aLine[ nPos ] )
|
||||
IF Right( cLine, 1 ) == ";"
|
||||
RETURN hb_StrShrink( cLine, 1 )
|
||||
ENDIF
|
||||
++nPos
|
||||
ENDDO
|
||||
|
||||
RETURN ""
|
||||
|
||||
Reference in New Issue
Block a user