Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/gui/qgscodeeditorpython.cpp b/src/gui/qgscodeeditorpython.cpp
index b234e5e..0b2d885 100644
--- a/src/gui/qgscodeeditorpython.cpp
+++ b/src/gui/qgscodeeditorpython.cpp
@@ -120,7 +120,7 @@ bool QgsCodeEditorPython::loadScript( const QString &script )
{
QgsDebugMsg( QString( "The script file: %1" ).arg( script ) );
QFile file( script );
- if ( !file.open( QIODevice::ReadOnly ) )
+ if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
@echo off
call "%~dp0\bin\o4w_env.bat"
PATH C:\cygwin\bin;C:\cygwin\usr\bin;C:\cygwin\usr\X11R6\bin;C:\cygwin\usr\local\bin;%PATH%
run -p /usr/bin mintty -
qgis=> select st_astext( st_offsetcurve( st_geomfromtext( 'LINESTRING(436533.041 5755061.11,436420.979 5755061.071,436372.505 5755061.054,436346.382 5755061.045)' ), -0.17 ) );
st_astext
-------------------------------------------------------------------------------------------------------------------------------------------------------------
MULTILINESTRING((436420.97894038 5755061.24099999,436533.040940836 5755061.27999999),(436346.381941431 5755061.21499999,436372.504941431 5755061.22399999))
(1 row)
qgis=> select postgis_full_version();
NOTICE: Function postgis_topology_scripts_installed() not found. Is topology support enabled and topology.sql installed?
postgis_full_version
diff --git a/alkisplugin.py b/alkisplugin.py
index a35f599..ae8d0b5 100755
--- a/alkisplugin.py
+++ b/alkisplugin.py
@@ -1057,7 +1057,7 @@ class alkisplugin(QObject):
def setStricharten(self, db, sym, sn, c, outline):
lqry = QSqlQuery(db)
- if "setOffsetAlongLine" in dir(QgsMarkerLineSymbolLayerV2):
+ if hasattr(QgsMarkerLineSymbolLayerV2, "setOffsetAlongLine"):
diff --git a/python/core/qgsmaprenderer.sip b/python/core/qgsmaprenderer.sip
index d05d528..524c501 100644
--- a/python/core/qgsmaprenderer.sip
+++ b/python/core/qgsmaprenderer.sip
@@ -124,7 +124,18 @@ class QgsMapRenderer : QObject
BlendSoftLight,
BlendHardLight,
BlendDifference,
- BlendSubtract
+ BlendSubtract,
commit 27a2e5c2e2293c317ea48332216e35b8cf252105
Author: Juergen E. Fischer <jef@norbit.de>
Date: Thu May 1 23:36:38 2014 +0200
ogr2ogr: turn string value to one element list if destination field is stringlist
diff --git a/ogr/ogrfeature.cpp b/ogr/ogrfeature.cpp
index 5f89758..c9ed2dc 100644
--- a/ogr/ogrfeature.cpp
+++ b/ogr/ogrfeature.cpp
diff --git a/src/app/qgsidentifyresultsdialog.cpp b/src/app/qgsidentifyresultsdialog.cpp
index 785102a..564754a 100644
--- a/src/app/qgsidentifyresultsdialog.cpp
+++ b/src/app/qgsidentifyresultsdialog.cpp
@@ -31,6 +31,7 @@
#include "qgslogger.h"
#include "qgsnetworkaccessmanager.h"
#include "qgsproject.h"
+#include "qgsmaplayeractionregistry.h"
d = QgsProviderRegistry.instance().selectWidget( "WFS", iface.mainWindow() )
QObject.connect( d, SIGNAL( "addWfsLayer(QString, QString)" ), iface.mainWindow(), SLOT( "addWfsLayer(QString, QString)" ) )
d.exec_()
diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp
index d13cbbf..77a1925 100644
--- a/src/providers/postgres/qgspostgresprovider.cpp
+++ b/src/providers/postgres/qgspostgresprovider.cpp
@@ -2565,10 +2565,9 @@ bool QgsPostgresProvider::getGeometryDetails()
}
}
- QString detectedType;
- QString detectedSrid;
diff --git a/src/providers/postgres/qgspostgresconn.cpp b/src/providers/postgres/qgspostgresconn.cpp
index 7290137..cdf7e20 100644
--- a/src/providers/postgres/qgspostgresconn.cpp
+++ b/src/providers/postgres/qgspostgresconn.cpp
@@ -270,7 +270,7 @@ void QgsPostgresConn::disconnect()
Q_ASSERT( !key.isNull() );
connections.remove( key );
- if ( QThread::currentThread() == QApplication::instance()->thread() )
+ if ( !QApplication::instance() || QThread::currentThread() == QApplication::instance()->thread() )