bug854fix.diff
src/app/legend/qgslegendlayerfile.cpp (working copy) | ||
---|---|---|
405 | 405 |
case QgsVectorFileWriter::ErrCreateLayer: |
406 | 406 |
QMessageBox::warning(0, tr("Error"), tr("Layer creation failed")); |
407 | 407 |
break; |
408 |
case QgsVectorFileWriter::ErrAttributeTypeUnsupported: |
|
409 |
QMessageBox::warning(0, tr("Error"), |
|
410 |
tr("Layer attribute table contains unsupported datatype(s)")); |
|
411 |
break; |
|
408 | 412 |
} |
409 | 413 |
} |
410 | 414 |
src/core/qgsvectorfilewriter.cpp (working copy) | ||
---|---|---|
122 | 122 |
ogrType = OFTReal; |
123 | 123 |
break; |
124 | 124 |
default: |
125 |
assert(0 && "invalid variant type!"); |
|
125 |
//assert(0 && "invalid variant type!"); |
|
126 |
mError = ErrAttributeTypeUnsupported; |
|
127 |
return; |
|
126 | 128 |
} |
127 | 129 | |
128 | 130 |
// create field definition |
... | ... | |
220 | 222 |
poFeature->SetField(encAttrName.data(), mCodec->fromUnicode(attrValue.toString()).data()); |
221 | 223 |
break; |
222 | 224 |
default: |
223 |
assert(0 && "invalid variant type"); |
|
225 |
//assert(0 && "invalid variant type"); |
|
226 |
return false; |
|
224 | 227 |
} |
225 | 228 |
} |
226 | 229 |
|
src/core/qgsvectorfilewriter.h (working copy) | ||
---|---|---|
47 | 47 |
NoError = 0, |
48 | 48 |
ErrDriverNotFound, |
49 | 49 |
ErrCreateDataSource, |
50 |
ErrCreateLayer |
|
50 |
ErrCreateLayer, |
|
51 |
ErrAttributeTypeUnsupported |
|
51 | 52 |
}; |
52 | 53 | |
53 | 54 |
/** Write contents of vector layer to a shapefile */ |