Skip to content

Commit

Permalink
Applied patch from Hans-Peter Jansen <hpj [at] urpla.net> to address …
Browse files Browse the repository at this point in the history
…build issues with python-sip 4.15 and fix srs.db update issue when srs table has no noupdate column.
  • Loading branch information
timlinux committed Dec 8, 2013
1 parent 0aae936 commit c610f37
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/core/qgsmaplayerregistry.sip
Expand Up @@ -191,4 +191,6 @@ class QgsMapLayerRegistry : QObject
//! protected constructor
QgsMapLayerRegistry( QObject * parent = 0 );

private:
void connectNotify( const char * signal );
}; // class QgsMapLayerRegistry
3 changes: 3 additions & 0 deletions python/gui/qgsattributedialog.sip
Expand Up @@ -17,4 +17,7 @@ class QgsAttributeDialog : QObject
int exec();
void show();
void dialogDestroyed();

private:
bool eventFilter( QObject *obj, QEvent *event );
};
2 changes: 2 additions & 0 deletions python/gui/qgsmapcanvas.sip
Expand Up @@ -335,4 +335,6 @@ class QgsMapCanvas : QGraphicsView
//! called on resize or changed extent to notify canvas items to change their rectangle
void updateCanvasItemPositions();

private:
void connectNotify( const char * signal );
}; // class QgsMapCanvas
4 changes: 4 additions & 0 deletions python/gui/qgsmessagelogviewer.sip
Expand Up @@ -14,4 +14,8 @@ class QgsMessageLogViewer: QDialog

public slots:
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );

private:
void showEvent( QShowEvent * );
void hideEvent( QHideEvent * );
};
6 changes: 6 additions & 0 deletions src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -1682,6 +1682,8 @@ int QgsCoordinateReferenceSystem::syncDb()

int inserted = 0, updated = 0, deleted = 0, errors = 0;

qDebug( "Load srs db from: %s", QgsApplication::srsDbFilePath().toLocal8Bit().constData());

sqlite3 *database;
if ( sqlite3_open( dbFilePath.toUtf8().constData(), &database ) != SQLITE_OK )
{
Expand All @@ -1696,6 +1698,10 @@ int QgsCoordinateReferenceSystem::syncDb()

}

// fix up database, if not done already //
if ( sqlite3_exec( database, "alter table tbl_srs add noupdate boolean", 0, 0, 0 ) == SQLITE_OK )
sqlite3_exec( database, "update tbl_srs set noupdate=(auth_name='EPSG' and auth_id in (5513,5514,5221,2065,102067,4156,4818))", 0, 0, 0 );

sqlite3_exec( database, "UPDATE tbl_srs SET srid=141001 WHERE srid=41001 AND auth_name='OSGEO' AND auth_id='41001'", 0, 0, 0 );

OGRSpatialReferenceH crs = OSRNewSpatialReference( NULL );
Expand Down

0 comments on commit c610f37

Please sign in to comment.