From: <sm...@us...> - 2009-11-13 21:35:26
|
Revision: 10584 http://plplot.svn.sourceforge.net/plplot/?rev=10584&view=rev Author: smekal Date: 2009-11-13 21:34:51 +0000 (Fri, 13 Nov 2009) Log Message: ----------- Applied (a little bit modified) patch by Andr?\195?\169 Kapelrud in order to make the qt driver compiler with Visual C++. This patch fixes mainly visibility issues of some variables in dlls. Removed some unreferenced variables. Modified Paths: -------------- trunk/bindings/qt_gui/plqt.cpp trunk/drivers/qt.cpp trunk/include/qt.h Modified: trunk/bindings/qt_gui/plqt.cpp =================================================================== --- trunk/bindings/qt_gui/plqt.cpp 2009-11-12 20:57:32 UTC (rev 10583) +++ trunk/bindings/qt_gui/plqt.cpp 2009-11-13 21:34:51 UTC (rev 10584) @@ -944,8 +944,6 @@ void QtPLWidget::doPlot( QPainter* p, double x_fact, double y_fact, double x_offset, double y_offset ) { QLineF line; - QPointF * polyline; - PLINT npts; QVector<qreal> vect; QRectF rect; Modified: trunk/drivers/qt.cpp =================================================================== --- trunk/drivers/qt.cpp 2009-11-12 20:57:32 UTC (rev 10583) +++ trunk/drivers/qt.cpp 2009-11-13 21:34:51 UTC (rev 10584) @@ -34,10 +34,6 @@ #include "qt.h" #include <QMutexLocker> -extern int vectorize; -extern int lines_aa; -extern MasterHandler handler; - // global variables initialised in init(), used in tidy() // QApplication* app=NULL; static int argc; // argc and argv have to exist when tidy() is used, thus they are made global @@ -45,7 +41,8 @@ static int appCounter = 0; // to be rigorous, all uses should be placed between mutexes // Drivers declaration -PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_qt = +extern "C" { +PLDLLIMPEXP_DRIVER_DATA(const char*) plD_DEVICE_INFO_qt = #if defined ( PLD_bmpqt ) "bmpqt:Qt Windows bitmap driver:0:qt:66:bmpqt\n" #endif @@ -77,6 +74,7 @@ "extqt:External Qt driver:0:qt:75:extqt\n" #endif ; +} // extern "C" static DrvOpt qt_options[] = { { "text_vectorize", DRV_INT, &vectorize, "Vectorize fonts on output (0|1)" }, { "lines_antialiasing", DRV_INT, &lines_aa, "Toggles antialiasing on lines (0|1)" }, @@ -336,7 +334,7 @@ void plD_esc_rasterqt( PLStream * pls, PLINT op, void* ptr ) { short *xa, *ya; - PLINT i, j; + PLINT i; QtRasterDevice * widget = (QtRasterDevice *) pls->dev; if ( widget != NULL && qt_family_check( pls )) { @@ -735,7 +733,7 @@ void plD_esc_svgqt( PLStream * pls, PLINT op, void* ptr ) { short *xa, *ya; - PLINT i, j; + PLINT i; QtSVGDevice * widget = (QtSVGDevice *) pls->dev; if ( widget != NULL && qt_family_check( pls )) { @@ -979,7 +977,7 @@ void plD_esc_epspdfqt( PLStream * pls, PLINT op, void* ptr ) { short *xa, *ya; - PLINT i, j; + PLINT i; QtEPSDevice * widget = (QtEPSDevice *) pls->dev; if ( widget != NULL && qt_family_check( pls )) { @@ -1098,7 +1096,6 @@ lines_aa = 1; plParseDrvOpts( qt_options ); - PLINT w, h; bool isMaster = initQtApp( true ); QtPLWidget* widget; @@ -1192,8 +1189,7 @@ void plD_esc_qtwidget( PLStream * pls, PLINT op, void* ptr ) { short *xa, *ya; - short xmin, xmax, ymin, ymax; - PLINT i, j; + PLINT i; QtPLWidget * widget = (QtPLWidget *) pls->dev; if ( widget == NULL ) return; @@ -1358,7 +1354,7 @@ void plD_esc_extqt( PLStream * pls, PLINT op, void* ptr ) { short *xa, *ya; - PLINT i, j; + PLINT i; QtExtWidget * widget = NULL; widget = (QtExtWidget*) pls->dev; Modified: trunk/include/qt.h =================================================================== --- trunk/include/qt.h 2009-11-12 20:57:32 UTC (rev 10583) +++ trunk/include/qt.h 2009-11-13 21:34:51 UTC (rev 10584) @@ -89,6 +89,8 @@ #define QT_DEFAULT_X 842 #define QT_DEFAULT_Y 595 +extern "C" extern PLDLLIMPEXP_DRIVER_DATA( const char* ) plD_DEVICE_INFO_qt; + class PLDLLIMPEXP_QT QtPLDriver; // Master Device Handler for multiple streams @@ -397,6 +399,12 @@ #endif +// These variables are declared in plqt.cpp but also needed +// by the qt driver. +extern PLDLLIMPEXP_QT_DATA( int ) vectorize; +extern PLDLLIMPEXP_QT_DATA( int ) lines_aa; +extern PLDLLIMPEXP_QT_DATA( MasterHandler ) handler; + #if defined ( plplot_pyqt4_EXPORTS ) #define initplplot_pyqt4 PLDLLIMPEXP_PYQT4 initplplot_pyqt4 #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |