From c610f37735077fd3efbdd4599601e7d4f5ff83bb Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 8 Dec 2013 22:37:45 +0200 Subject: [PATCH] Applied patch from Hans-Peter Jansen to address build issues with python-sip 4.15 and fix srs.db update issue when srs table has no noupdate column. --- python/core/qgsmaplayerregistry.sip | 2 ++ python/gui/qgsattributedialog.sip | 3 +++ python/gui/qgsmapcanvas.sip | 2 ++ python/gui/qgsmessagelogviewer.sip | 4 ++++ src/core/qgscoordinatereferencesystem.cpp | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/python/core/qgsmaplayerregistry.sip b/python/core/qgsmaplayerregistry.sip index d79bdfc51dcb..6147f490f44c 100644 --- a/python/core/qgsmaplayerregistry.sip +++ b/python/core/qgsmaplayerregistry.sip @@ -191,4 +191,6 @@ class QgsMapLayerRegistry : QObject //! protected constructor QgsMapLayerRegistry( QObject * parent = 0 ); +private: + void connectNotify( const char * signal ); }; // class QgsMapLayerRegistry diff --git a/python/gui/qgsattributedialog.sip b/python/gui/qgsattributedialog.sip index 6ffbf0e0afef..ab7a340a9029 100644 --- a/python/gui/qgsattributedialog.sip +++ b/python/gui/qgsattributedialog.sip @@ -17,4 +17,7 @@ class QgsAttributeDialog : QObject int exec(); void show(); void dialogDestroyed(); + +private: + bool eventFilter( QObject *obj, QEvent *event ); }; diff --git a/python/gui/qgsmapcanvas.sip b/python/gui/qgsmapcanvas.sip index 64b178d10f07..9cc66758ce19 100644 --- a/python/gui/qgsmapcanvas.sip +++ b/python/gui/qgsmapcanvas.sip @@ -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 diff --git a/python/gui/qgsmessagelogviewer.sip b/python/gui/qgsmessagelogviewer.sip index 63f9958f3407..67c98b6eb013 100644 --- a/python/gui/qgsmessagelogviewer.sip +++ b/python/gui/qgsmessagelogviewer.sip @@ -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 * ); }; diff --git a/src/core/qgscoordinatereferencesystem.cpp b/src/core/qgscoordinatereferencesystem.cpp index 2ece4ca59ccb..44009c1532fe 100644 --- a/src/core/qgscoordinatereferencesystem.cpp +++ b/src/core/qgscoordinatereferencesystem.cpp @@ -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 ) { @@ -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 );