Menu

#217 INSTALL says that Qt 4.2.0 is required but Qt 5.0.0 has been required since Subversion commit r1869

2.0.0
closed
nobody
None
5
2015-01-30
2014-12-30
Jerome Zago
No

HOW TO REPRODUCE

$ svn info | egrep '^(URL|Revision): '  # FYI
URL: http://svn.code.sf.net/p/chessx/code/trunk
Revision: 1890

$ lrelease-qt4 -version; qmake-qt4 -version  # FYI
lrelease version 4.8.6
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib

$ grep 'Qt.*4' INSTALL
To compile ChessX, you need Qt version 4.2.0 or above.
If you have both Qt3 and Qt4 installed, verify that Qt4 is first

$ lrelease-qt4 *.pro && qmake-qt4 && make
[...]
src/gui/chartwidget.cpp: In member function ‘virtual void ChartWidget::mouseReleaseEvent(QMouseEvent*)’:
src/gui/chartwidget.cpp:84:28: error: ‘class QMouseEvent’ has no member named ‘localPos’
         QPointF p = event->localPos();
                            ^
Makefile:2322: recipe for target 'obj_rel/chartwidget.o' failed
make: *** [obj_rel/chartwidget.o] Error 1

ANALYSIS

$ svn annotate src/gui/chartwidget.cpp | grep localPos
  1869    hognose         QPointF p = event->localPos();

http://doc.qt.io/qt-5/qmouseevent.html#localPos says: "This function was introduced in Qt 5.0".

AFAIAC, I'm perfectly fine with building chessx against Qt5 instead of Qt4 (see below), but then INSTALL should probably be updated.

ENVIRONMENT

Arch Linux 64-bit with latest updates:

$ pacman -Q | egrep '^(make|qt)'
make 4.1-1
qt-recordmydesktop 0.3.8-7
qt4 4.8.6-4
qt5-base 5.4.0-1
qt5-declarative 5.4.0-1
qt5-location 5.4.0-1
qt5-sensors 5.4.0-1
qt5-svg 5.4.0-1
qt5-tools 5.4.0-1
qt5-translations 5.4.0-1
qt5-webchannel 5.4.0-1
qt5-webkit 5.4.0-1
qt5-xmlpatterns 5.4.0-1
qtchooser 48-1
qtwebkit 2.3.4-1

Thanks for this great piece of software!
More details upon request. Thanks for your time.

Discussion

  • Jerome Zago

    Jerome Zago - 2014-12-30

    Title should probably be: "INSTALL says that Qt 4.2.0+ is supported but Qt 5.0.0 has been required since Subversion commit r1869".

     
  • Jens Nissen

    Jens Nissen - 2015-01-05
    • status: open --> closed
     
  • Jerome Zago

    Jerome Zago - 2015-01-05

    Thank you for the fix!

    $ svn info | grep ^Revision  # FYI
    Revision: 1902
    
    $ lrelease-qt4 *.pro && qmake-qt4 && make && echo OK
    [...]
    OK
    
    $ make distclean
      pacaur -Syu qt5-multimedia
      lrelease-qt5 *.pro && qmake-qt5 && make && echo OK
    [...]
    OK
    
     

Log in to post a comment.