5 changes: 2 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ qgis (1.9.0) UNRELEASED; urgency=low
* add python-psycopg2 and python-qscintilla2 dependency to python-qgis
* add support for ubuntu quantal and raring
* remove js files and add libjs-jquery/libjs-underscore dependency
* temporarily disable mssql and sqlanywhere provider until migrated to
new vector api.
* temporarily disable mssql provider until migrated to new vector api.

-- Jürgen E. Fischer <jef@norbit.de> Tue, 29 Jan 2013 21:01:49 +0100
-- Jürgen E. Fischer <jef@norbit.de> Wed, 30 Jan 2013 21:06:05 +0100

qgis (1.8.0) UNRELEASED; urgency=low

Expand Down
18 changes: 9 additions & 9 deletions debian/control.lucid
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.maverick
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.natty
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.oneiric
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.precise
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.quantal
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.raring
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.sid
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.sid-oracle
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.squeeze
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
18 changes: 9 additions & 9 deletions debian/control.wheezy
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ Description: Quantum GIS mapserver
.
This package contains the Quantum GIS mapserver.

#Package: qgis-sqlanywhere
#Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
#Description: Quantum GIS sql anywhere plugin and provider
# Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
# and display databases of geographic information.
# .
# This package contains the Quantum GIS sqlanywhere plugin and provider.
Package: qgis-sqlanywhere
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: qgis-sqlanywhere1.7.0, qgis-sqlanywhere1.7.1, qgis-sqlanywhere1.8.0
Description: Quantum GIS sql anywhere plugin and provider
Quantum GIS is a Geographic Information System (GIS) which manages, analyzes
and display databases of geographic information.
.
This package contains the Quantum GIS sqlanywhere plugin and provider.

Package: qgis-api-doc
Architecture: all
Expand Down
5 changes: 4 additions & 1 deletion python/plugins/db_manager/dlg_import_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ def accept(self):
QApplication.restoreOverrideCursor()

if ret != 0:
QMessageBox.warning(self, "Import to database", u"Error %d\n%s" % (ret, errMsg) )
output = qgis.gui.QgsMessageViewer()
output.setTitle( "Import to database" )
output.setMessageAsPlainText( u"Error %d\n%s" % (ret, errMsg) )
output.showMessage()
return

# create spatial index
Expand Down
24 changes: 18 additions & 6 deletions src/core/qgsvectorlayerimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ QgsVectorLayerImport::QgsVectorLayerImport( const QString &uri,
return;
}

mAttributeCount = -1;

foreach ( int idx, mOldToNewAttrIdx.values() )
{
if ( idx > mAttributeCount )
mAttributeCount = idx;
}

mAttributeCount++;

QgsDebugMsg( "Created empty layer" );

QgsVectorDataProvider *vectorProvider = ( QgsVectorDataProvider* ) pReg->provider( providerKey, uri );
Expand Down Expand Up @@ -128,17 +138,19 @@ bool QgsVectorLayerImport::addFeature( QgsFeature& feat )
QgsFeature newFeat;
if ( feat.geometry() )
newFeat.setGeometry( *feat.geometry() );
newFeat.initAttributes( attrs.count() );

newFeat.initAttributes( mAttributeCount );

for ( int i = 0; i < attrs.count(); ++i )
{
// add only mapped attributes (un-mapped ones will not be present in the
// destination layer)
if ( mOldToNewAttrIdx.contains( i ) )
{
QgsDebugMsgLevel( QString( "moving field from pos %1 to %2" ).arg( i ).arg( mOldToNewAttrIdx.value( i ) ), 3 );
newFeat.setAttribute( mOldToNewAttrIdx.value( i ), attrs[i] );
}
int dstIdx = mOldToNewAttrIdx.value( i, -1 );
if ( dstIdx < 0 )
continue;

QgsDebugMsgLevel( QString( "moving field from pos %1 to %2" ).arg( i ).arg( dstIdx ), 3 );
newFeat.setAttribute( dstIdx, attrs[i] );
}

mFeatureBuffer.append( newFeat );
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsvectorlayerimport.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class CORE_EXPORT QgsVectorLayerImport

/** map attribute indexes to new field indexes */
QMap<int, int> mOldToNewAttrIdx;
int mAttributeCount;

QgsFeatureList mFeatureBuffer;
QProgressDialog *mProgress;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ADD_SUBDIRECTORY(coordinate_capture)
ADD_SUBDIRECTORY(dxf2shp_converter)
ADD_SUBDIRECTORY(evis)
ADD_SUBDIRECTORY(spatialquery)
#ADD_SUBDIRECTORY(sqlanywhere) # TODO: enable when migrated to new api
ADD_SUBDIRECTORY(sqlanywhere)
ADD_SUBDIRECTORY(roadgraph)
ADD_SUBDIRECTORY(zonal_statistics)
ADD_SUBDIRECTORY(georeferencer)
Expand Down
2 changes: 1 addition & 1 deletion src/providers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ADD_SUBDIRECTORY(ogr)
ADD_SUBDIRECTORY(wms)
ADD_SUBDIRECTORY(delimitedtext)
ADD_SUBDIRECTORY(osm)
#ADD_SUBDIRECTORY(sqlanywhere) # TODO: enable when migrated to new api
ADD_SUBDIRECTORY(sqlanywhere)
ADD_SUBDIRECTORY(gdal)
#ADD_SUBDIRECTORY(mssql) # TODO: enable when migrated to new api
ADD_SUBDIRECTORY(ows)
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ QgsVectorLayerImport::ImportError QgsMssqlProvider::createEmptyLayer(

if ( fields.size() > 0 )
{
int offset = geometryColumn.isEmpty() ? 0 : 1;
int offset = 0;

// get the list of fields
QList<QgsField> flist;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2992,7 +2992,7 @@ QgsVectorLayerImport::ImportError QgsPostgresProvider::createEmptyLayer(

if ( fields.size() > 0 )
{
int offset = geometryColumn.isEmpty() ? 1 : 2;
int offset = 1;

// get the list of fields
QList<QgsField> flist;
Expand Down
Loading