Compiled qtcontribs with Qt 5.14.2 and MinGW GNU 7.3(64-bit) on Windows 10 x64

272 views
Skip to first unread message

WGreg66

unread,
May 1, 2020, 8:22:39 AM5/1/20
to QtContribs
Hi All

After reading previous posts and after making some modifications to hbmk2_qt.hb I was able to compile hbide with QT 5.14.2 and MinGW 7.3(64-bit).

Regards
Grzegorz

WGreg66

unread,
May 1, 2020, 8:27:29 AM5/1/20
to QtContribs


W dniu piątek, 1 maja 2020 14:22:39 UTC+2 użytkownik WGreg66 napisał:

sc165.jpg

Steps:

1. I used file  hbmk2_qt.hb from github.com/tnsr1/qtcontribs/commit/r 481-candidate (Thx alex).


 
2. I changed the line 600 in hbmk2_qt.hb
   to AEval (aLinesPRG, {| cLine | cFile + = strtran (cLine, "** #", "#") + hb_eol ()})
(thx Juan)


3. I modified method THbUIC:pullTranslate in hbmk2_qt.hb. and I fixed problem with undefined reference to `HB_FUN_QCOREAPPLICATION_TRANSLATE' 

METHOD THbUIC:pullTranslate( cLine )
   LOCAL aResult, aArgs
   LOCAL reg := hb_regexComp( "(.+)QCoreApplication::translate(\(.+, 0\))" )
   IF hb_regexHas( reg, cLine )
      aResult    := hb_regex( reg, cLine )
      aArgs      := args2array( aResult[ 3 ] )
      aArgs[ 2 ] := ::ParseString( aArgs[ 2 ] )
      aArgs[ 3 ] := '""'
      cLine      := hb_StrFormat( "%s QApplication().translate(%s))", aResult[ 2 ], ::concatArgs( aArgs ) )
   ELSE
      reg := hb_regexComp( "(.+)QCoreApplication::translate(\(.+, Q_NULLPTR\))" )
      IF hb_regexHas( reg, cLine )
         aResult    := hb_regex( reg, cLine )
         aArgs      := args2array( aResult[ 3 ] )
         aArgs[ 2 ] := ::ParseString( aArgs[ 2 ] )
         aArgs[ 3 ] := '""'
         cLine      := hb_StrFormat( "%s QApplication().translate(%s))", aResult[ 2 ], ::concatArgs( aArgs ) )
      Else
         reg := hb_regexComp( "(.+)QCoreApplication::translate(\(.+, nullptr\))" )
         IF hb_regexHas( reg, cLine )
            aResult    := hb_regex( reg, cLine )
            aArgs      := args2array( aResult[ 3 ] )
            aArgs[ 2 ] := ::ParseString( aArgs[ 2 ] )
            aArgs[ 3 ] := '""'
            cLine      := hb_StrFormat( "%s QApplication().translate(%s))", aResult[ 2 ], ::concatArgs( aArgs ) )
         EndIf
      ENDIF
   ENDIF
   IF " nullptr" $ cLine
      cLine := StrTran( cLine, "nullptr", "0" )
   ENDIF
   RETURN cLine

I don't understand why QCoreApplication.translate doesn't work, that's why I changed to QApplication.translate.

Regards
Grzegorz

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

WGreg66

unread,
May 1, 2020, 8:59:11 AM5/1/20
to QtContribs
I included necessary files.

Remove extention .txt

Regards
Grzegorz
hbmk2_qt.hb.txt
qtcontribs.bat.txt

alex;

unread,
May 1, 2020, 4:29:22 PM5/1/20
to QtContribs
Hi, Grzegorz.

I'm strongly not recomending use change from Juan (strtran (cLine, "** #", "#")) - it break logic of hbmk2_qt.hb

WBR, alex;

пятница, 1 мая 2020 г., 15:59:11 UTC+3 пользователь WGreg66 написал:

WGreg66

unread,
May 1, 2020, 8:15:50 PM5/1/20
to QtContribs
Hi Alex

You're right. I realize that the changes I have introduced do not remove the current causes of problems, but remove their effects.
Perhaps Pritpal will find some time to adjust the code to the current version of Qt.

Regards 
Grzegorz

WGreg66

unread,
May 2, 2020, 10:46:52 AM5/2/20
to QtContribs
Hi 

I compiled the qtcontribs again without any changes in step 2 with success.
The changes in step 2 are unnecessary.

Regards
Grzegorz
hbmk2_qt.hb.txt

Pritpal Bedi

unread,
May 2, 2020, 10:57:33 AM5/2/20
to QtContribs
Hi 

Thanks Alex and Grzegorz. Will commit these changes in the repository soon.


Pritpal Bedi
a student of software analysis & concepts

francolino

unread,
May 9, 2020, 3:35:54 PM5/9/20
to qtcon...@googlegroups.com

Hi  Greg

I compiled with the file hbm2_qt.hb that you attached and it gave me the following errors:

Lines 7274, Functions/Procedures 13
Generating C source output to 'hbide\.hbmk\win\mingw\hbide\hbqtoolbar.c'... Done.
Compiling 'hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg'...
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(519) Error E0013  Error in #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(521) Error E0014  #endif does not match #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(523) Error E0013  Error in #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(525) Error E0014  #endif does not match #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(527) Error E0013  Error in #ifdef

...


If you compile with the -rebuild parameter you will see the problem.


Regards

Juan Francolino

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qtcontribs/b8467a47-fe1d-4478-a139-ac64334771ee%40googlegroups.com.

Libre de virus. www.avast.com

WGreg66

unread,
May 10, 2020, 1:51:42 PM5/10/20
to QtContribs
Hi Juan

Clean the compilation with parameter -clean and compile it once more.
If errors occur, show the code lines where the errors occurred.

Regards Grzegorz

W dniu sobota, 9 maja 2020 21:35:54 UTC+2 użytkownik Juan napisał:

Hi  Greg

I compiled with the file hbm2_qt.hb that you attached and it gave me the following errors:

Lines 7274, Functions/Procedures 13
Generating C source output to 'hbide\.hbmk\win\mingw\hbide\hbqtoolbar.c'... Done.
Compiling 'hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg'...
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(519) Error E0013  Error in #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(521) Error E0014  #endif does not match #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(523) Error E0013  Error in #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(525) Error E0014  #endif does not match #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(527) Error E0013  Error in #ifdef

...


If you compile with the -rebuild parameter you will see the problem.


Regards

Juan Francolino


El 02/05/2020 a las 11:46, WGreg66 escribió:
Hi 

I compiled the qtcontribs again without any changes in step 2 with success.
The changes in step 2 are unnecessary.

Regards
Grzegorz
--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcon...@googlegroups.com.

Charles M

unread,
May 22, 2020, 12:14:41 AM5/22/20
to QtContribs
Hi. My workaround for this was insert this code after line 39 in hbmk2_qt.hb:


   CASE s == '#if QT_CONFIG(shortcut)'
      str1 := '#ifdef QT_CONFIG_shortcut_'


That's it. Rebuild your qtcontribs.

Hope this helps.





On Sunday, May 10, 2020 at 3:35:54 AM UTC+8, Juan wrote:

Hi  Greg

I compiled with the file hbm2_qt.hb that you attached and it gave me the following errors:

Lines 7274, Functions/Procedures 13
Generating C source output to 'hbide\.hbmk\win\mingw\hbide\hbqtoolbar.c'... Done.
Compiling 'hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg'...
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(519) Error E0013  Error in #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(521) Error E0014  #endif does not match #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(523) Error E0013  Error in #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(525) Error E0014  #endif does not match #ifdef
hbide\.hbmk\win\mingw\hbide\uic_docviewgenerator.prg(527) Error E0013  Error in #ifdef

...


If you compile with the -rebuild parameter you will see the problem.


Regards

Juan Francolino


El 02/05/2020 a las 11:46, WGreg66 escribió:
Hi 

I compiled the qtcontribs again without any changes in step 2 with success.
The changes in step 2 are unnecessary.

Regards
Grzegorz
--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcon...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages