Skip to content

Commit

Permalink
Merge pull request #1931 from ccrook/delimited_text_field_types
Browse files Browse the repository at this point in the history
Adding missing type definitions to delimited text provider
  • Loading branch information
ccrook committed Feb 26, 2015
2 parents 919b8b6 + 63f612f commit 3a187be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit 3a187be

Please sign in to comment.