Skip to content

Commit 07ae4ba

Browse files
author
gsherman
committedJan 15, 2006
Fixed the swig interface file and generated wrapper after changes to the dialog constructor
git-svn-id: http://svn.osgeo.org/qgis/trunk@4691 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f5081eb commit 07ae4ba

File tree

2 files changed

+29
-181
lines changed

2 files changed

+29
-181
lines changed
 

‎tools/mapserver_export/msexport.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class QgsMapserverExport:public QDialog, private Ui::QgsMapserverExportBase
1313
{
1414
public:
15-
QgsMapserverExport(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
15+
QgsMapserverExport(QWidget* parent = 0, Qt::WFlags fl = 0 );
1616
~QgsMapserverExport();
1717
//! Read the file and create the map
1818
//bool read();

‎tools/mapserver_export/msexport_wrap.cxx

Lines changed: 28 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,48 +1363,18 @@ static swig_type_info *swig_types[10];
13631363
#include "qgsmapserverexport.h"
13641364

13651365

1366-
/* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
1367-
SWIGINTERN int
1368-
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
1366+
SWIGINTERNSHORT PyObject*
1367+
SWIG_From_bool(bool value)
13691368
{
1370-
static swig_type_info* pchar_info = 0;
1371-
char* vptr = 0;
1372-
if (!pchar_info) pchar_info = SWIG_TypeQuery("char *");
1373-
if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) {
1374-
if (cptr) *cptr = vptr;
1375-
if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1376-
return SWIG_OLDOBJ;
1377-
} else {
1378-
PyErr_Clear();
1379-
if (PyString_Check(obj)) {
1380-
if (cptr) {
1381-
*cptr = PyString_AS_STRING(obj);
1382-
if (psize) {
1383-
*psize = PyString_GET_SIZE(obj) + 1;
1384-
}
1385-
}
1386-
return SWIG_PYSTR;
1387-
}
1388-
}
1389-
if (cptr) {
1390-
SWIG_type_error("char *", obj);
1391-
}
1392-
return 0;
1369+
PyObject *obj = value ? Py_True : Py_False;
1370+
Py_INCREF(obj);
1371+
return obj;
13931372
}
13941373

13951374

1396-
SWIGINTERNSHORT int
1397-
SWIG_AsCharPtr(PyObject *obj, char **val)
1398-
{
1399-
if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
1400-
return 1;
1401-
}
1402-
if (val) {
1403-
PyErr_Clear();
1404-
SWIG_type_error("char *", obj);
1405-
}
1406-
return 0;
1407-
}
1375+
/*@/usr/share/swig1.3/python/pymacros.swg,66,SWIG_define@*/
1376+
#define SWIG_From_int PyInt_FromLong
1377+
/*@@*/
14081378

14091379

14101380
#include <limits.h>
@@ -1532,56 +1502,31 @@ SWIG_Check_bool(PyObject* obj)
15321502
return SWIG_AsVal_bool(obj, (bool*)0);
15331503
}
15341504

1535-
1536-
SWIGINTERNSHORT PyObject*
1537-
SWIG_From_bool(bool value)
1538-
{
1539-
PyObject *obj = value ? Py_True : Py_False;
1540-
Py_INCREF(obj);
1541-
return obj;
1542-
}
1543-
1544-
1545-
/*@/usr/share/swig1.3/python/pymacros.swg,66,SWIG_define@*/
1546-
#define SWIG_From_int PyInt_FromLong
1547-
/*@@*/
1548-
15491505
#ifdef __cplusplus
15501506
extern "C" {
15511507
#endif
15521508
static PyObject *_wrap_new_QgsMapserverExport__SWIG_0(PyObject *, PyObject *args) {
15531509
PyObject *resultobj;
15541510
QWidget *arg1 = (QWidget *) 0 ;
1555-
char *arg2 = (char *) 0 ;
1556-
bool arg3 ;
1557-
Qt::WFlags arg4 ;
1511+
Qt::WFlags arg2 ;
15581512
QgsMapserverExport *result;
15591513
PyObject * obj0 = 0 ;
15601514
PyObject * obj1 = 0 ;
1561-
PyObject * obj2 = 0 ;
1562-
PyObject * obj3 = 0 ;
15631515

1564-
if(!PyArg_ParseTuple(args,(char *)"OOOO:new_QgsMapserverExport",&obj0,&obj1,&obj2,&obj3)) goto fail;
1516+
if(!PyArg_ParseTuple(args,(char *)"OO:new_QgsMapserverExport",&obj0,&obj1)) goto fail;
15651517
SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_QWidget, SWIG_POINTER_EXCEPTION | 0);
15661518
if (SWIG_arg_fail(1)) SWIG_fail;
1567-
if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
1568-
SWIG_arg_fail(2);SWIG_fail;
1569-
}
1570-
{
1571-
arg3 = (bool)(SWIG_As_bool(obj2));
1572-
if (SWIG_arg_fail(3)) SWIG_fail;
1573-
}
15741519
{
15751520
Qt::WFlags * argp;
1576-
SWIG_Python_ConvertPtr(obj3, (void **)&argp, SWIGTYPE_p_Qt__WFlags, SWIG_POINTER_EXCEPTION);
1577-
if (SWIG_arg_fail(4)) SWIG_fail;
1521+
SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_Qt__WFlags, SWIG_POINTER_EXCEPTION);
1522+
if (SWIG_arg_fail(2)) SWIG_fail;
15781523
if (argp == NULL) {
15791524
SWIG_null_ref("Qt::WFlags");
15801525
}
1581-
if (SWIG_arg_fail(4)) SWIG_fail;
1582-
arg4 = *argp;
1526+
if (SWIG_arg_fail(2)) SWIG_fail;
1527+
arg2 = *argp;
15831528
}
1584-
result = (QgsMapserverExport *)new QgsMapserverExport(arg1,(char const *)arg2,arg3,arg4);
1529+
result = (QgsMapserverExport *)new QgsMapserverExport(arg1,arg2);
15851530

15861531
resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_QgsMapserverExport, 1);
15871532
return resultobj;
@@ -1591,58 +1536,6 @@ static PyObject *_wrap_new_QgsMapserverExport__SWIG_0(PyObject *, PyObject *args
15911536

15921537

15931538
static PyObject *_wrap_new_QgsMapserverExport__SWIG_1(PyObject *, PyObject *args) {
1594-
PyObject *resultobj;
1595-
QWidget *arg1 = (QWidget *) 0 ;
1596-
char *arg2 = (char *) 0 ;
1597-
bool arg3 ;
1598-
QgsMapserverExport *result;
1599-
PyObject * obj0 = 0 ;
1600-
PyObject * obj1 = 0 ;
1601-
PyObject * obj2 = 0 ;
1602-
1603-
if(!PyArg_ParseTuple(args,(char *)"OOO:new_QgsMapserverExport",&obj0,&obj1,&obj2)) goto fail;
1604-
SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_QWidget, SWIG_POINTER_EXCEPTION | 0);
1605-
if (SWIG_arg_fail(1)) SWIG_fail;
1606-
if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
1607-
SWIG_arg_fail(2);SWIG_fail;
1608-
}
1609-
{
1610-
arg3 = (bool)(SWIG_As_bool(obj2));
1611-
if (SWIG_arg_fail(3)) SWIG_fail;
1612-
}
1613-
result = (QgsMapserverExport *)new QgsMapserverExport(arg1,(char const *)arg2,arg3);
1614-
1615-
resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_QgsMapserverExport, 0);
1616-
return resultobj;
1617-
fail:
1618-
return NULL;
1619-
}
1620-
1621-
1622-
static PyObject *_wrap_new_QgsMapserverExport__SWIG_2(PyObject *, PyObject *args) {
1623-
PyObject *resultobj;
1624-
QWidget *arg1 = (QWidget *) 0 ;
1625-
char *arg2 = (char *) 0 ;
1626-
QgsMapserverExport *result;
1627-
PyObject * obj0 = 0 ;
1628-
PyObject * obj1 = 0 ;
1629-
1630-
if(!PyArg_ParseTuple(args,(char *)"OO:new_QgsMapserverExport",&obj0,&obj1)) goto fail;
1631-
SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_QWidget, SWIG_POINTER_EXCEPTION | 0);
1632-
if (SWIG_arg_fail(1)) SWIG_fail;
1633-
if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
1634-
SWIG_arg_fail(2);SWIG_fail;
1635-
}
1636-
result = (QgsMapserverExport *)new QgsMapserverExport(arg1,(char const *)arg2);
1637-
1638-
resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_QgsMapserverExport, 0);
1639-
return resultobj;
1640-
fail:
1641-
return NULL;
1642-
}
1643-
1644-
1645-
static PyObject *_wrap_new_QgsMapserverExport__SWIG_3(PyObject *, PyObject *args) {
16461539
PyObject *resultobj;
16471540
QWidget *arg1 = (QWidget *) 0 ;
16481541
QgsMapserverExport *result;
@@ -1660,7 +1553,7 @@ static PyObject *_wrap_new_QgsMapserverExport__SWIG_3(PyObject *, PyObject *args
16601553
}
16611554

16621555

1663-
static PyObject *_wrap_new_QgsMapserverExport__SWIG_4(PyObject *, PyObject *args) {
1556+
static PyObject *_wrap_new_QgsMapserverExport__SWIG_2(PyObject *, PyObject *args) {
16641557
PyObject *resultobj;
16651558
QgsMapserverExport *result;
16661559

@@ -1676,15 +1569,15 @@ static PyObject *_wrap_new_QgsMapserverExport__SWIG_4(PyObject *, PyObject *args
16761569

16771570
static PyObject *_wrap_new_QgsMapserverExport(PyObject *self, PyObject *args) {
16781571
int argc;
1679-
PyObject *argv[5];
1572+
PyObject *argv[3];
16801573
int ii;
16811574

16821575
argc = PyObject_Length(args);
1683-
for (ii = 0; (ii < argc) && (ii < 4); ii++) {
1576+
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
16841577
argv[ii] = PyTuple_GetItem(args,ii);
16851578
}
16861579
if (argc == 0) {
1687-
return _wrap_new_QgsMapserverExport__SWIG_4(self,args);
1580+
return _wrap_new_QgsMapserverExport__SWIG_2(self,args);
16881581
}
16891582
if (argc == 1) {
16901583
int _v;
@@ -1698,7 +1591,7 @@ static PyObject *_wrap_new_QgsMapserverExport(PyObject *self, PyObject *args) {
16981591
}
16991592
}
17001593
if (_v) {
1701-
return _wrap_new_QgsMapserverExport__SWIG_3(self,args);
1594+
return _wrap_new_QgsMapserverExport__SWIG_1(self,args);
17021595
}
17031596
}
17041597
if (argc == 2) {
@@ -1713,62 +1606,17 @@ static PyObject *_wrap_new_QgsMapserverExport(PyObject *self, PyObject *args) {
17131606
}
17141607
}
17151608
if (_v) {
1716-
_v = SWIG_AsCharPtr(argv[1], (char **)(0));
1717-
if (_v) {
1718-
return _wrap_new_QgsMapserverExport__SWIG_2(self,args);
1719-
}
1720-
}
1721-
}
1722-
if (argc == 3) {
1723-
int _v;
1724-
{
1725-
void *ptr;
1726-
if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_QWidget, 0) == -1) {
1727-
_v = 0;
1728-
PyErr_Clear();
1729-
} else {
1730-
_v = 1;
1731-
}
1732-
}
1733-
if (_v) {
1734-
_v = SWIG_AsCharPtr(argv[1], (char **)(0));
1735-
if (_v) {
1736-
_v = SWIG_Check_bool(argv[2]);
1737-
if (_v) {
1738-
return _wrap_new_QgsMapserverExport__SWIG_1(self,args);
1609+
{
1610+
void *ptr = 0;
1611+
if (SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_Qt__WFlags, 0) == -1) {
1612+
_v = 0;
1613+
PyErr_Clear();
1614+
} else {
1615+
_v = (ptr != 0);
17391616
}
17401617
}
1741-
}
1742-
}
1743-
if (argc == 4) {
1744-
int _v;
1745-
{
1746-
void *ptr;
1747-
if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_QWidget, 0) == -1) {
1748-
_v = 0;
1749-
PyErr_Clear();
1750-
} else {
1751-
_v = 1;
1752-
}
1753-
}
1754-
if (_v) {
1755-
_v = SWIG_AsCharPtr(argv[1], (char **)(0));
17561618
if (_v) {
1757-
_v = SWIG_Check_bool(argv[2]);
1758-
if (_v) {
1759-
{
1760-
void *ptr = 0;
1761-
if (SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_Qt__WFlags, 0) == -1) {
1762-
_v = 0;
1763-
PyErr_Clear();
1764-
} else {
1765-
_v = (ptr != 0);
1766-
}
1767-
}
1768-
if (_v) {
1769-
return _wrap_new_QgsMapserverExport__SWIG_0(self,args);
1770-
}
1771-
}
1619+
return _wrap_new_QgsMapserverExport__SWIG_0(self,args);
17721620
}
17731621
}
17741622
}

0 commit comments

Comments
 (0)
Please sign in to comment.