On 2009-11-19 17:12-0500 Hazen Babcock wrote: > > I get the following warning messages when building the Qt bindings on > win32 with mingw32: > > Scanning dependencies of target plplotqtd > [ 16%] Building CXX object > bindings/qt_gui/CMakeFiles/plplotqtd.dir/plqt.cpp.obj > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp: In member function `void > QtPLDriver::drawTextInPicture(QPainter*, const QString&)': > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:195: warning: passing > `double' for converting 2 of `void QPainter::drawPicture(int, int, const > QPicture&)' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp: In member function > `virtual void QtPLWidget::setColor(int, int, int, double)': > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:749: warning: converting > to `PLINT' from `double' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp: In member function > `virtual void QtPLWidget::setBackgroundColor(int, int, int, double)': > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:770: warning: converting > to `PLINT' from `double' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp: In member function `void > QtPLWidget::renderText(QPainter*, TextStruct_*, double, double, double, > double)': > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:838: warning: passing > `double' for converting 1 of `void QPainter::drawPicture(int, int, const > QPicture&)' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:838: warning: passing > `double' for converting 2 of `void QPainter::drawPicture(int, int, const > QPicture&)' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp: In member function `void > QtPLWidget::doPlot(QPainter*, double, double, double, double)': > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:1053: warning: passing > `double' for converting 1 of `void QPainter::fillRect(int, int, int, > int, const QBrush&)' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:1053: warning: passing > `double' for converting 2 of `void QPainter::fillRect(int, int, int, > int, const QBrush&)' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:1053: warning: passing > `double' for converting 3 of `void QPainter::fillRect(int, int, int, > int, const QBrush&)' > C:\users\hazen\plplot\bindings\qt_gui\plqt.cpp:1053: warning: passing > `double' for converting 4 of `void QPainter::fillRect(int, int, int, > int, const QBrush&)' > Linking CXX shared library ..\..\dll\libplplotqtd.dll > Creating library file: ..\..\dll\libplplotqtd.dll.a > [ 16%] Built target plplotqtd > > In my testing with the examples the Qt device works fine.
Hi Hazen: I am really pleased you are testing qt on mingw. The first warning above says there is a casting problem on ling 195. Can't that be solved by p->drawPicture((int) ( xOffset + bounding.width() / 2. ), -yOffset, tempPic ); ==> p->drawPicture((int) ( xOffset + bounding.width() / 2. ), -(int)yOffset, tempPic ); ? The second warning above says there is a casting problem on line 749. Can't that be solved by el.Data.ColourStruct->A = alpha * 255.; ==> el.Data.ColourStruct->A = (PLINT)(alpha * 255.); ? And similarly for the rest or the warnings? I don't have sufficient C++/Qt knowledge to check up on these informed guesses (and I believe you may be in the same boat). However, unless some C++/qt expert here objects, I suggest you trust what your compiler warning messages say and simply blindly fix all these issues as above. If that gets rid of most or all of the warnings and you still have good qt results, commit the changes with the appropriate commit message saying you did warnings fixes without a lot of deep knowledge by trusting your compiler warning messages. That may still leave a few warnings, but your commit dealing with the easy ones that can be fixed by casts is still worthwhile to make the C++ experts job of getting rid of the more difficult warnings much easier. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel