Skip to content
Permalink
Browse files
indentation update
  • Loading branch information
jef-n committed Apr 7, 2015
1 parent 5e7c043 commit 12d7cfca0325f046a49a0aefa7174d999782ff08
Showing with 127 additions and 131 deletions.
  1. +1 −1 python/core/effects/qgsblureffect.sip
  2. +1 −1 python/core/effects/qgscoloreffect.sip
  3. +2 −2 python/core/effects/qgseffectstack.sip
  4. +1 −1 python/core/effects/qgspainteffect.sip
  5. +1 −1 python/core/effects/qgstransformeffect.sip
  6. +1 −1 python/core/symbology-ng/qgssymbollayerv2.sip
  7. +1 −1 python/gui/effects/qgseffectstackpropertieswidget.sip
  8. +4 −4 python/plugins/db_manager/db_plugins/info_model.py
  9. +2 −2 python/plugins/db_manager/db_plugins/plugin.py
  10. +15 −15 python/plugins/db_manager/db_plugins/postgis/connector.py
  11. +2 −2 python/plugins/db_manager/db_plugins/postgis/data_model.py
  12. +9 −9 python/plugins/db_manager/db_plugins/postgis/info_model.py
  13. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/dlg_versioning.py
  14. +6 −6 python/plugins/db_manager/db_plugins/spatialite/connector.py
  15. +4 −4 python/plugins/fTools/tools/doPointsInPolygon.py
  16. +18 −18 python/plugins/fTools/tools/doVectorGrid.py
  17. +1 −1 scripts/astyle-all.sh
  18. +6 −8 scripts/generate_test_mask_image.py
  19. +1 −1 src/app/qgsfieldsproperties.cpp
  20. +3 −3 src/core/qgsexpression.h
  21. +1 −1 src/core/qgsvectorlayer.cpp
  22. +4 −4 src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
  23. +1 −1 src/gui/qgsquerybuilder.cpp
  24. +1 −1 src/gui/qgsrubberband.cpp
  25. +1 −1 src/gui/qgsunitselectionwidget.cpp
  26. +1 −1 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
  27. +3 −3 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
  28. +22 −22 tests/src/gui/testqgsrubberband.cpp
  29. +12 −14 tests/src/python/test_qgsdelimitedtextprovider_wanted.py
@@ -34,7 +34,7 @@ class QgsBlurEffect : QgsPaintEffect
virtual QgsStringMap properties() const;
virtual void readProperties( const QgsStringMap& props );
virtual QgsPaintEffect* clone() const /Factory/;

/** Sets blur level (strength)
* @param level blur level. Depending on the current @link blurMethod @endlink, this parameter
* has different effects
@@ -11,7 +11,7 @@ class QgsColorEffect : QgsPaintEffect
%TypeHeaderCode
#include <qgscoloreffect.h>
%End

public:

/** Creates a new QgsColorEffect effect from a properties string map.
@@ -83,13 +83,13 @@ class QgsEffectStack : QgsPaintEffect
* @param index position of effect to take
*/
QgsPaintEffect* takeEffect( const int index );

/** Returns a pointer to the list of effects currently contained by
* the stack
* @returns list of QgsPaintEffects within the stack
*/
QList< QgsPaintEffect* >* effectList();

/** Returns count of effects contained by the stack
* @returns count of effects
*/
@@ -293,7 +293,7 @@ class QgsDrawSourceEffect : QgsPaintEffect
* @see setBlendMode
*/
QPainter::CompositionMode blendMode() const;

protected:

virtual void draw( QgsRenderContext& context );
@@ -11,7 +11,7 @@ class QgsTransformEffect : QgsPaintEffect
%TypeHeaderCode
#include <qgstransformeffect.h>
%End

public:

/** Creates a new QgsTransformEffect effect from a properties string map.
@@ -67,7 +67,7 @@ class QgsSymbolLayerV2
public:

virtual ~QgsSymbolLayerV2();

// not necessarily supported by all symbol layers...
virtual QColor color() const;
virtual void setColor( const QColor& color );
@@ -133,7 +133,7 @@ class QgsEffectStackPropertiesDialog : QgsDialog
* @param picture preview picture
*/
void setPreviewPicture( const QPicture& picture );

};

/** \ingroup gui
@@ -206,8 +206,8 @@ def fieldsDetails(self):

# define the table header
header = (
"#", QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Type"),
QApplication.translate("DBManagerPlugin", "Null"), QApplication.translate("DBManagerPlugin", "Default") )
"#", QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Type"),
QApplication.translate("DBManagerPlugin", "Null"), QApplication.translate("DBManagerPlugin", "Default") )
tbl.append(HtmlTableHeader(header))

# add table contents
@@ -251,7 +251,7 @@ def indexesDetails(self):

# define the table header
header = (
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Column(s)") )
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Column(s)") )
tbl.append(HtmlTableHeader(header))

# add table contents
@@ -271,7 +271,7 @@ def triggersDetails(self):

# define the table header
header = (
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Function") )
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Function") )
tbl.append(HtmlTableHeader(header))

# add table contents
@@ -835,7 +835,7 @@ def runAction(self, action):
trigger_action = parts[2]

msg = QApplication.translate("DBManagerPlugin", "Do you want to %s trigger %s?") % (
trigger_action, trigger_name)
trigger_action, trigger_name)
QApplication.restoreOverrideCursor()
try:
if QMessageBox.question(None, QApplication.translate("DBManagerPlugin", "Table trigger"), msg,
@@ -932,7 +932,7 @@ def runAction(self, action):
spatialIndex_action = parts[1]

msg = QApplication.translate("DBManagerPlugin", "Do you want to %s spatial index for field %s?") % (
spatialIndex_action, self.geomColumn )
spatialIndex_action, self.geomColumn )
QApplication.restoreOverrideCursor()
try:
if QMessageBox.question(None, QApplication.translate("DBManagerPlugin", "Spatial Index"), msg,
@@ -215,7 +215,7 @@ def getTablePrivileges(self, table):
t = self.quoteId(table)
sql = u"""SELECT has_table_privilege(%(t)s, 'SELECT'), has_table_privilege(%(t)s, 'INSERT'),
has_table_privilege(%(t)s, 'UPDATE'), has_table_privilege(%(t)s, 'DELETE')""" % {
't': self.quoteString(t)}
't': self.quoteString(t)}
c = self._execute(None, sql)
res = self._fetchone(c)
self._close_cursor(c)
@@ -477,7 +477,7 @@ def getTableIndexes(self, table):
JOIN pg_namespace nsp ON pg_class.relnamespace = nsp.oid
WHERE pg_class.relname=%s %s
AND indisprimary != 't' """ % (
self.quoteString(tablename), schema_where)
self.quoteString(tablename), schema_where)
c = self._execute(None, sql)
res = self._fetchall(c)
self._close_cursor(c)
@@ -512,7 +512,7 @@ def getTableTriggers(self, table):
LEFT JOIN pg_proc p ON trig.tgfoid = p.oid
JOIN pg_namespace nsp ON t.relnamespace = nsp.oid
WHERE t.relname = %s %s """ % (
self.quoteString(tablename), schema_where)
self.quoteString(tablename), schema_where)

c = self._execute(None, sql)
res = self._fetchall(c)
@@ -573,7 +573,7 @@ def getTableEstimatedExtent(self, table, geom):
schema_part = u"%s," % self.quoteString(schema) if schema is not None else ""

subquery = u"SELECT st_estimated_extent(%s%s,%s) AS extent" % (
schema_part, self.quoteString(tablename), self.quoteString(geom))
schema_part, self.quoteString(tablename), self.quoteString(geom))
sql = u"""SELECT st_xmin(extent), st_ymin(extent), st_xmax(extent), st_ymax(extent) FROM (%s) AS subquery """ % subquery

try:
@@ -594,7 +594,7 @@ def getViewDefinition(self, view):
sql = u"""SELECT pg_get_viewdef(c.oid) FROM pg_class c
JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
WHERE relname=%s %s AND (relkind='v' OR relkind='m') """ % (
self.quoteString(tablename), schema_where)
self.quoteString(tablename), schema_where)

c = self._execute(None, sql)
res = self._fetchone(c)
@@ -626,7 +626,7 @@ def isVectorTable(self, table):
if self.has_geometry_columns and self.has_geometry_columns_access:
schema, tablename = self.getSchemaTableName(table)
sql = u"SELECT count(*) FROM geometry_columns WHERE f_table_schema = %s AND f_table_name = %s" % (
self.quoteString(schema), self.quoteString(tablename))
self.quoteString(schema), self.quoteString(tablename))

c = self._execute(None, sql)
res = self._fetchone(c)
@@ -639,7 +639,7 @@ def isRasterTable(self, table):
if self.has_raster_columns and self.has_raster_columns_access:
schema, tablename = self.getSchemaTableName(table)
sql = u"SELECT count(*) FROM raster_columns WHERE r_table_schema = %s AND r_table_name = %s" % (
self.quoteString(schema), self.quoteString(tablename))
self.quoteString(schema), self.quoteString(tablename))

c = self._execute(None, sql)
res = self._fetchone(c)
@@ -700,7 +700,7 @@ def renameTable(self, table, new_table):
if self.has_geometry_columns and not self.is_geometry_columns_view:
schema_where = u" AND f_table_schema=%s " % self.quoteString(schema) if schema is not None else ""
sql = u"UPDATE geometry_columns SET f_table_name=%s WHERE f_table_name=%s %s" % (
self.quoteString(new_table), self.quoteString(tablename), schema_where)
self.quoteString(new_table), self.quoteString(tablename), schema_where)
self._execute(c, sql)

self._commit()
@@ -720,7 +720,7 @@ def moveTableToSchema(self, table, new_schema):
schema, tablename = self.getSchemaTableName(table)
schema_where = u" AND f_table_schema=%s " % self.quoteString(schema) if schema is not None else ""
sql = u"UPDATE geometry_columns SET f_table_schema=%s WHERE f_table_name=%s %s" % (
self.quoteString(new_schema), self.quoteString(tablename), schema_where)
self.quoteString(new_schema), self.quoteString(tablename), schema_where)
self._execute(c, sql)

self._commit()
@@ -752,7 +752,7 @@ def moveTable(self, table, new_table, new_schema=None):
schema_where = u" f_table_schema=%s AND " % self.quoteString(schema) if schema is not None else ""
schema_part = u" f_table_schema=%s, " % self.quoteString(new_schema) if schema is not None else ""
sql = u"UPDATE geometry_columns SET %s f_table_name=%s WHERE %s f_table_name=%s" % (
schema_part, self.quoteString(new_table), schema_where, self.quoteString(tablename))
schema_part, self.quoteString(new_table), schema_where, self.quoteString(tablename))
self._execute(c, sql)

self._commit()
@@ -807,7 +807,7 @@ def deleteTableColumn(self, table, column):
schema, tablename = self.getSchemaTableName(table)
schema_part = u"%s, " % self._quote_str(schema) if schema else ""
sql = u"SELECT DropGeometryColumn(%s%s, %s)" % (
schema_part, self.quoteString(tablename), self.quoteString(column))
schema_part, self.quoteString(tablename), self.quoteString(column))
else:
sql = u"ALTER TABLE %s DROP %s" % (self.quoteId(table), self.quoteId(column))
self._execute_and_commit(sql)
@@ -839,15 +839,15 @@ def updateTableColumn(self, table, column, new_name=None, data_type=None, not_nu
# rename the column
if new_name is not None and new_name != column:
sql = u"ALTER TABLE %s RENAME %s TO %s" % (
self.quoteId(table), self.quoteId(column), self.quoteId(new_name))
self.quoteId(table), self.quoteId(column), self.quoteId(new_name))
self._execute(c, sql)

# update geometry_columns if postgis is enabled
if self.has_geometry_columns and not self.is_geometry_columns_view:
schema, tablename = self.getSchemaTableName(table)
schema_where = u" f_table_schema=%s AND " % self.quoteString(schema) if schema is not None else ""
sql = u"UPDATE geometry_columns SET f_geometry_column=%s WHERE %s f_table_name=%s AND f_geometry_column=%s" % (
self.quoteString(new_name), schema_where, self.quoteString(tablename), self.quoteString(column))
self.quoteString(new_name), schema_where, self.quoteString(tablename), self.quoteString(column))
self._execute(c, sql)

self._commit()
@@ -876,7 +876,7 @@ def isGeometryColumn(self, table, column):
schema_where = u" f_table_schema=%s AND " % self.quoteString(schema) if schema is not None else ""

sql = u"SELECT count(*) > 0 FROM geometry_columns WHERE %s f_table_name=%s AND f_geometry_column=%s" % (
schema_where, self.quoteString(tablename), self.quoteString(column))
schema_where, self.quoteString(tablename), self.quoteString(column))

c = self._execute(None, sql)
res = self._fetchone(c)[0] == 't'
@@ -888,7 +888,7 @@ def addGeometryColumn(self, table, geom_column='geom', geom_type='POINT', srid=-
schema_part = u"%s, " % self.quoteString(schema) if schema else ""

sql = u"SELECT AddGeometryColumn(%s%s, %s, %d, %s, %d)" % (
schema_part, self.quoteString(tablename), self.quoteString(geom_column), srid, self.quoteString(geom_type), dim)
schema_part, self.quoteString(tablename), self.quoteString(geom_column), srid, self.quoteString(geom_type), dim)
self._execute_and_commit(sql)

def deleteGeometryColumn(self, table, geom_column):
@@ -50,10 +50,10 @@ def _sanitizeTableField(self, field):
# get fields, ignore geometry columns
if field.dataType.lower() == "geometry":
return u"CASE WHEN %(fld)s IS NULL THEN NULL ELSE GeometryType(%(fld)s) END AS %(fld)s" % {
'fld': self.db.quoteId(field.name)}
'fld': self.db.quoteId(field.name)}
elif field.dataType.lower() == "raster":
return u"CASE WHEN %(fld)s IS NULL THEN NULL ELSE 'RASTER' END AS %(fld)s" % {
'fld': self.db.quoteId(field.name)}
'fld': self.db.quoteId(field.name)}
return u"%s::text" % self.db.quoteId(field.name)

def _deleteCursor(self):
@@ -95,7 +95,7 @@ def generalInfo(self):
if self.table.rowCount is not None:
if abs(self.table.estimatedRowCount - self.table.rowCount) > 1 and \
(self.table.estimatedRowCount > 2 * self.table.rowCount or
self.table.rowCount > 2 * self.table.estimatedRowCount):
self.table.rowCount > 2 * self.table.estimatedRowCount):
ret.append(HtmlParagraph(QApplication.translate("DBManagerPlugin",
"<warning> There's a significant difference between estimated and real row count. "
'Consider running <a href="action:vacuumanalyze/run">VACUUM ANALYZE</a>.')))
@@ -145,9 +145,9 @@ def fieldsDetails(self):

# define the table header
header = (
"#", QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Type"),
QApplication.translate("DBManagerPlugin", "Length"), QApplication.translate("DBManagerPlugin", "Null"),
QApplication.translate("DBManagerPlugin", "Default") )
"#", QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Type"),
QApplication.translate("DBManagerPlugin", "Length"), QApplication.translate("DBManagerPlugin", "Null"),
QApplication.translate("DBManagerPlugin", "Default") )
tbl.append(HtmlTableHeader(header))

# add table contents
@@ -173,8 +173,8 @@ def triggersDetails(self):
tbl = []
# define the table header
header = (
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Function"),
QApplication.translate("DBManagerPlugin", "Type"), QApplication.translate("DBManagerPlugin", "Enabled") )
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Function"),
QApplication.translate("DBManagerPlugin", "Type"), QApplication.translate("DBManagerPlugin", "Enabled") )
tbl.append(HtmlTableHeader(header))

# add table contents
@@ -183,9 +183,9 @@ def triggersDetails(self):
"action": "delete"}

(enabled, action) = (QApplication.translate("DBManagerPlugin", "Yes"), "disable") if trig.enabled else (
QApplication.translate("DBManagerPlugin", "No"), "enable")
QApplication.translate("DBManagerPlugin", "No"), "enable")
txt_enabled = u'%(enabled)s (<a href="action:trigger/%(name)s/%(action)s">%(action)s</a>)' % {
"name": trig.name, "action": action, "enabled": enabled}
"name": trig.name, "action": action, "enabled": enabled}

tbl.append((name, trig.function, trig.type2String(), txt_enabled))

@@ -203,7 +203,7 @@ def rulesDetails(self):
tbl = []
# define the table header
header = (
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Definition") )
QApplication.translate("DBManagerPlugin", "Name"), QApplication.translate("DBManagerPlugin", "Definition") )
tbl.append(HtmlTableHeader(header))

# add table contents
@@ -176,11 +176,11 @@ def showHelp(self):

def sql_alterTable(self):
return u"ALTER TABLE %s ADD %s serial, ADD %s timestamp, ADD %s timestamp;" % (
self.schematable, self.colPkey, self.colStart, self.colEnd)
self.schematable, self.colPkey, self.colStart, self.colEnd)

def sql_setPkey(self):
return u"ALTER TABLE %s DROP CONSTRAINT %s, ADD PRIMARY KEY (%s);" % (
self.schematable, self.origPkeyName, self.colPkey)
self.schematable, self.origPkeyName, self.colPkey)

def sql_currentView(self):
cols = ",".join(self.columns)

0 comments on commit 12d7cfc

Please sign in to comment.