Hi,
being a newbie in gis affairs and therefore in QGIS, I would like to say
warmth hello.
Not being a newbie for python nor python-{sip,qt*} affairs, I noticed some
issues of QGIS with sip 4.15 onwards. It was a rather noticeable update, as
many complex bindings broke. Thankfully, the fixes are easy enough: it boils
down to declare some missing private methods in the respective sip files.
Please see attached patches. What do you think?
I noticed, that these issues are tackled differently in the current git:
they're moved to protected methods. This is rather suboptimal, since due to
sips "protected is public" trick, the whole protection is void.
BTW, I build my stuff in the public:
https://build.opensuse.org/project/monitor/home:frispete:geo
and attempt to feed my fixes upstream (with this message) as well as to the
more prominent openSUSE feeds (Application:Geo), but the submit request is
still pending.
While at it, I noticed a long stream of error messages related to srs.db
handling during build. A crude fix for that is also attached, but I have to
admit, that I didn't fully grok the details of the database handling in this
regard. I first concentrated on getting a clean build. Hence, I included the
sample data as an additional package.
Now, the hopefully soon to be available packages for openSUSE are in a much
better shape than before. Somebody with a deeper builder and user experience
taking a look is highly appreciated, especially related to the available
extensions. Which one's are really open source, which is a prerequisite for
being build on the OBS?
Cheers,
PeteFrom: Hans-Peter Jansen <[email protected]>
Subject: sip 4.15 fixes
Declare some missing private methods in order to build QGIS2 with
newer python sip versions (>= 4.15).
Index: b/python/core/qgsmaplayerregistry.sip
===================================================================
--- 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
Index: b/python/gui/qgsmapcanvas.sip
===================================================================
--- 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
Index: b/python/gui/qgsattributedialog.sip
===================================================================
--- a/python/gui/qgsattributedialog.sip
+++ b/python/gui/qgsattributedialog.sip
@@ -16,4 +16,7 @@ class QgsAttributeDialog : QObject
int exec();
void show();
void dialogDestroyed();
+
+private:
+ bool eventFilter( QObject *obj, QEvent *event );
};
Index: b/python/gui/qgsmessagelogviewer.sip
===================================================================
--- 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 * );
};
Index: b/src/core/qgscoordinatereferencesystem.cpp
===================================================================
--- a/src/core/qgscoordinatereferencesystem.cpp
+++ b/src/core/qgscoordinatereferencesystem.cpp
@@ -1658,6 +1658,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( QgsApplication::srsDbFilePath().toUtf8().constData(), &database ) != SQLITE_OK )
{
@@ -1672,6 +1674,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 );
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer