On 2014-03-13 16:11-0500 RM wrote:

> Hi Alan,
> 
> Ok, got further!  It made it through cmake, though I get a message about 
> Pango missing, which doesn't make sense because I have Pango in
> the system...
> 
> The make command bails on the QPrinter class now, and I think some re-writing 
> will be necessary there.
> 
> [ 26%] Building CXX object bindings/qt_gui/CMakeFiles/plplotqtd.dir/plqt.cpp.o
> /u/rmancuso/Downloads/plplot-latest/plplot-code/bindings/qt_gui/plqt.cpp: In 
> member function 'void QtEPSDevice::definePlotName(const
> char*, int)':
> /u/rmancuso/Downloads/plplot-latest/plplot-code/bindings/qt_gui/plqt.cpp:617: 
> error: 'PostScriptFormat' is not a member of 'QPrinter'
> make[2]: *** [bindings/qt_gui/CMakeFiles/plplotqtd.dir/plqt.cpp.o] Error 1
> make[1]: *** [bindings/qt_gui/CMakeFiles/plplotqtd.dir/all] Error 2
> make: *** [all] Error 2
> 
> First, according to the migration guide the location of QPrinter changed.  
> You *may* need to modify line 48 of
> bindings/qt_gui/CMakeLists.txt to add printer support as follows:
>     qt5_use_modules(plplotqt${LIB_TAG} Svg Gui PrintSupport)
> 
> But, secondly, the larger problem is that PostScript support has apparently 
> been removed from Qt5.  So,  "QPrinter::PostScriptFormat"
> will not compile.  See here:  https://qt-project.org/forums/viewthread/24857
> 
> So, unfortunately, I think you need to decide how to proceed/work around that 
> issue code-wise.

Hi RM:

Your report of no obvious cmake find issues (except for the unrelated
Pango message) is quite encouraging for the Qt5 case.

There does seem to be an overall computer industry trend to drop
PostScript in favor of PDF.  For example, we have just dropped the
traditional PostScript form of our documentation (but kept the PDF,
html, info, and man forms).  So I am not surprised that Qt5 has
dropped PostScript (as also confirmed by the thread at
<http://qt-project.org/forums/viewthread/24857/> ).

If you look at include/qt.h, drivers/qt.cpp, and
bindings/qt_gui/plqt.cpp there is a lot of use of PLD_XXX macros to
exclude code if one or more of the qt devices is disabled.  Those
macros are #defined if the corresponding CMake variable is true, and
otherwise not (see include/plDevs.h.in). Therefore, if you specify
-DPLD_epsqt=OFF on the cmake command line, then the corresponding
C/C++ PLD_epsqt macro will not be #defined, and all the
(encapsulated) PostScript code should be excluded so the above problem
disappears.  For example, if you trace through the code (which I
encourage you to do), the specific error above was caused
by the code starting at line 1221 of drivers/qt.cpp which is protected
by

#if defined ( PLD_epsqt )

Therefore, -DPLD_epsqt=OFF should get you by this problem and allow
you to move on to the next problem.  Furthermore, if that next problem
shows that not all all PostScript-related code is excluded by
-DPLD_epsqt=OFF, then I would be happy to accept a patch from you to
add more uses of the PLD_epsqt macro in the above source code files to
fix that issue.

Later today I plan to set the CMake PLD_epsqt variable permanently to
OFF in the build system for the PLPLOT_USE_QT5=ON case since Qt5 does
not support PostScript.  But that commit is going to be delayed by
another CMake code cleanup issue so you should continue to specify
-DPLD_epsqt=OFF for the time being to avoid the above issue.

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to