Important: Please read the Qt Code of Conduct -

Class Conflict in Qt5.1.1 version for legacy code

  • Dear All,

    I'm studying on a legacy code which was compiled (and succesfully ran) with Qt4.8.1 version where I'm trying to run it at the Qt5.1.1 version. When I try to run the cod ein QtCreator, compiler raises the following errors and couple of more errors related with the identical complaining.

    At the first glance those errors are not about misinterpretation or mistyping something but instead strong type checking of C++. IMHO the only reason for that can be held true if there was a drastic change in the code implementation from one source to the other and I don't believe that code change is different from version 4.8.1 to 5.1.1.

    @D:...\MAT\Skeleton_source\sswidget.h:87: error: could not convert 'QPair<int, int>()' from 'SSWidget::PointIndex {aka QPair<int, int>}' to 'SSWidget::PointIndex& {aka QPair<int, int>&}'
    bool detectAll(const QPointF& pos, PointIndex& result = PointIndex());
    Here is the code portion which corresponds the definition in the header file.
    bool detectAll(const QPointF& pos, PointIndex& result = PointIndex());
    bool detectSelected(const QPointF& pos, PointIndex& result = PointIndex());

    Another error which complains about the missing property in the QMouseEvent class, This class should be intrinsic in Qt source files, it is probable that original creator of project has changed something in it but I cannot see any traces of it.
    @D:...\MAT\Skeleton_source\sswidget.cpp:229: error: 'class QMouseEvent' has no member named 'posF' m_polygons.push_back(QPolygonF(QVector<QPointF>() << aligned(e->posF())));

    Your help will be appreciated!


Log in to reply