Предупреждения в процессе сборки qcustomplot.h



  • Привет.
    Добавил QCustomPlot в проект как написано по http://blog.harrix.org/article/1813и получил предупреждения вида:

    ../tion28-pro/qcustomplot.cpp: In member function ‘virtual QPointF QCPItemRect::anchorPixelPosition(int) const’:
    ../tion28-pro/qcustomplot.cpp:28765:65: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
         case aiTop:         return (rect.topLeft()+rect.topRight())*0.5;
                                                                     ^~~
    In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                     from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                     from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                     from ../tion28-pro/qcustomplot.h:54,
                     from ../tion28-pro/qcustomplot.cpp:26:
    /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
     inline const QPointF operator*(const QPointF &p, qreal c)
                          ^~~~~~~~
    In file included from ../tion28-pro/qcustomplot.cpp:26:0:
    ../tion28-pro/qcustomplot.h:439:26: note: candidate 2: const QCPVector2D operator*(const QCPVector2D&, double)
     inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
                              ^~~~~~~~
    ../tion28-pro/qcustomplot.cpp:28767:69: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
         case aiRight:       return (rect.topRight()+rect.bottomRight())*0.5;
                                                                         ^~~
    In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                     from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                     from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                     from ../tion28-pro/qcustomplot.h:54,
                     from ../tion28-pro/qcustomplot.cpp:26:
    /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
     inline const QPointF operator*(const QPointF &p, qreal c)
                          ^~~~~~~~
    In file included from ../tion28-pro/qcustomplot.cpp:26:0:
    ../tion28-pro/qcustomplot.h:439:26: note: candidate 2: const QCPVector2D operator*(const QCPVector2D&, double)
     inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
                              ^~~~~~~~
    ../tion28-pro/qcustomplot.cpp:28768:71: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
         case aiBottom:      return (rect.bottomLeft()+rect.bottomRight())*0.5;
                                                                           ^~~
    In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                     from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                     from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                     from ../tion28-pro/qcustomplot.h:54,
                     from ../tion28-pro/qcustomplot.cpp:26:
    /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
     inline const QPointF operator*(const QPointF &p, qreal c)
    

    Qt 4.8.7.
    В чем может быть дело ? Как решить данную проблему?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.