Skip to content
Permalink
Browse files

Merge pull request #1931 from ccrook/delimited_text_field_types

Adding missing type definitions to delimited text provider
  • Loading branch information
ccrook committed Feb 26, 2015
2 parents 919b8b6 + 63f612f commit 3a187be11ec0141de3f0c48cfbb1ed3d12d78409
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
@@ -84,6 +84,14 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
, mBuildSpatialIndex( false )
, mSpatialIndex( 0 )
{

// Add supported types to enable creating expression fields in field calculator
mNativeTypes
<< QgsVectorDataProvider::NativeType( tr( "Whole number (integer)" ), "integer", QVariant::Int, 0, 10 )
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (double)" ), "double precision", QVariant::Double, -1, -1, -1, -1 )
<< QgsVectorDataProvider::NativeType( tr( "Text, unlimited length (text)" ), "text", QVariant::String, -1, -1, -1, -1 )
;

QgsDebugMsg( "Delimited text file uri is " + uri );

QUrl url = QUrl::fromEncoded( uri.toAscii() );

0 comments on commit 3a187be

Please sign in to comment.
You can’t perform that action at this time.