Hi I downloaded Qt5 and compiled it successfully on Fedora 17, x86-64, gcc 4.7.0. The I tried to build Qwt (svn version) against it and hit a compile error: -------------------------------------------------------------------------- timescaleengine.cpp:235:57: error: call of overloaded ‘qRound(int)’ is ambiguous timescaleengine.cpp:235:57: note: candidates are: In file included from timedate.h:4:0, from timescaleengine.h:4, from timescaleengine.cpp:1: ../../../../Downloads/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/include/QtCore/qglobal.h:416:13: note: int qRound(double) ../../../../Downloads/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/include/QtCore/qglobal.h:418:13: note: int qRound(float) -------------------------------------------------------------------------- I checked qglobal.h and there are two overloads for qRound(), one taking a float and another a double. Qwt code calls qRound() with an int and the compiler is finding it ambiguous. I tried with a test program and gcc indeed refuses to resolve such overloads. I checked with the installed version of Qt (4.8.2) and in qglobal.h, there's only one version of qRound(): Q_DECL_CONSTEXPR inline int qRound(qreal d) { return d >= qreal(0.0) ? int(d + qreal(0.5)) : int(d - int(d-1) + qreal(0.5)) + int(d-1); } This version (qreal is a typedef to double) is matching with the documentation (even Qt5 documentation mentions only qreal). Should this be reported as a bug against Qt5? Another function qRound64() also may have a problem. regards, Syam Krishnan |
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest