1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-25 15:24:04 +02:00
openwrt-packages/plplot/patches/030-qws-argv.patch
David Kühling fa537a3c64 plplot: many fixes, separate packages for qt,tcl,octave,c++ interfaces
Octave interface still crashes when attempting to plot via Qt :(
Tcl interface is currently unusable since openwrt's Tcl package is too crippled.
2011-01-04 18:30:01 +01:00

24 lines
795 B
Diff

Index: plplot-5.9.7/drivers/qt.cpp
===================================================================
--- plplot-5.9.7.orig/drivers/qt.cpp 2011-01-04 17:25:22.000000000 +0100
+++ plplot-5.9.7/drivers/qt.cpp 2011-01-04 17:26:02.000000000 +0100
@@ -90,12 +90,14 @@
++appCounter;
if ( qApp == NULL && appCounter == 1 )
{
- argc = 1;
- argv = new char*[2];
+ argc = 2;
+ argv = new char*[3];
argv[0] = new char[10];
- argv[1] = new char[1];
+ argv[1] = new char[10];
+ argv[2] = new char[1];
snprintf( argv[0], 10, "qt_driver" );
- argv[1][0] = '\0';
+ snprintf( argv[1], 10, "-qws" );
+ argv[2][0] = '\0';
new QApplication( argc, argv, isGUI );
res = true;
}