Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Astyle
  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 85b5167 commit 493185c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
20 changes: 5 additions & 15 deletions python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -80,7 +80,7 @@ def connect(self, parent=None):
conn_name = self.connectionName()
settings = QgsSettings()
settings.beginGroup(u"/{0}/{1}".format(
self.connectionSettingsKey(), conn_name))
self.connectionSettingsKey(), conn_name))

if not settings.contains("database"): # non-existent entry?
raise InvalidDataException(
Expand Down Expand Up @@ -408,18 +408,12 @@ def getValidQgisUniqueFields(self, onlyOne=False):
for idx in indexes:
if idx.isUnique and len(idx.columns) == 1:
fld = idx.fields()[idx.columns[0]]
if (fld.dataType == u"NUMBER"
and not fld.modifier
and fld.notNull
and fld not in ret):
if (fld.dataType == u"NUMBER" and not fld.modifier and fld.notNull and fld not in ret):
ret.append(fld)

# and finally append the other suitable fields
for fld in self.fields():
if (fld.dataType == u"NUMBER"
and not fld.modifier
and fld.notNull
and fld not in ret):
if (fld.dataType == u"NUMBER" and not fld.modifier and fld.notNull and fld not in ret):
ret.append(fld)

if onlyOne:
Expand Down Expand Up @@ -519,15 +513,12 @@ def __init__(self, row, table):

# find out whether fields are part of primary key
for con in self.table().constraints():
if (con.type == ORTableConstraint.TypePrimaryKey
and self.name == con.column):
if con.type == ORTableConstraint.TypePrimaryKey and self.name == con.column:
self.primaryKey = True
break

def type2String(self):
if (u"TIMESTAMP" in self.dataType
or self.dataType in [u"DATE", u"SDO_GEOMETRY",
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
if (u"TIMESTAMP" in self.dataType or self.dataType in [u"DATE", u"SDO_GEOMETRY", u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
return u"{}".format(self.dataType)
if self.charMaxLen in [None, -1]:
return u"{}".format(self.dataType)
Expand Down Expand Up @@ -564,7 +555,6 @@ def update(self, new_name, new_type_str=None, new_not_null=None,


class ORTableConstraint(TableConstraint):

TypeCheck, TypeForeignKey, TypePrimaryKey, \
TypeUnique, TypeUnknown = list(range(5))

Expand Down
12 changes: 6 additions & 6 deletions src/core/raster/qgsmultibandcolorrenderer.cpp
@@ -1,10 +1,10 @@
/***************************************************************************
qgsmultibandcolorrenderer.cpp
-----------------------------
begin : December 2011
copyright : (C) 2011 by Marco Hugentobler
email : marco at sourcepole dot ch
***************************************************************************/
qgsmultibandcolorrenderer.cpp
-----------------------------
begin : December 2011
copyright : (C) 2011 by Marco Hugentobler
email : marco at sourcepole dot ch
***************************************************************************/

/***************************************************************************
* *
Expand Down

0 comments on commit 493185c

Please sign in to comment.