Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 5, 2015
1 parent 2b0225b commit 53c8491
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 47 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_model.py
Expand Up @@ -517,8 +517,8 @@ def dropMimeData(self, data, action, row, column, parent):

# vectors/tables to be imported must be dropped on connected db, schema or table
canImportLayer = self.isImportVectorAvail and parent.isValid() and \
( isinstance(parent.internalPointer(), (SchemaItem, TableItem)) or \
( isinstance(parent.internalPointer(), ConnectionItem) and parent.internalPointer().populated ) )
(isinstance(parent.internalPointer(), (SchemaItem, TableItem)) or
(isinstance(parent.internalPointer(), ConnectionItem) and parent.internalPointer().populated))

added = 0

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/plugin.py
Expand Up @@ -165,7 +165,7 @@ def databasesFactory(self, connection, uri):

@classmethod
def addConnectionActionSlot(self, item, action, parent):
raise NotImplemented
raise NotImplemented

def removeActionSlot(self, item, action, parent):
QApplication.restoreOverrideCursor()
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/db_manager/db_plugins/spatialite/plugin.py
Expand Up @@ -87,7 +87,6 @@ def addConnection(self, conn_name, uri):
settings.setValue("sqlitepath", uri.database())
return True


@classmethod
def addConnectionActionSlot(self, item, action, parent, index):
QApplication.restoreOverrideCursor()
Expand All @@ -105,7 +104,6 @@ def addConnectionActionSlot(self, item, action, parent, index):
index.internalPointer().emit(SIGNAL('itemChanged'), index.internalPointer())



class SLDatabase(Database):

def __init__(self, connection, uri):
Expand Down
1 change: 0 additions & 1 deletion python/plugins/db_manager/db_tree.py
Expand Up @@ -178,4 +178,3 @@ def reconnect(self):
db = self.currentDatabase()
if db is not None:
self.mainWindow.invokeCallback(db.reconnectActionSlot)

2 changes: 1 addition & 1 deletion src/app/qgsoptions.h
Expand Up @@ -76,7 +76,7 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption

void iconSizeChanged( const QString &iconSize );

void uiThemeChanged(const QString &theme );
void uiThemeChanged( const QString &theme );

/** Slot to handle when type of project to open after launch is changed
*/
Expand Down
8 changes: 4 additions & 4 deletions src/core/geometry/qgsgeometryutils.h
Expand Up @@ -95,13 +95,13 @@ class CORE_EXPORT QgsGeometryUtils
static QDomElement pointsToGML3( const QList<QgsPointV2>& points, QDomDocument &doc, int precision, const QString& ns, bool is3D );
/** Returns a geoJSON coordinates string */
static QString pointsToJSON( const QList<QgsPointV2>& points, int precision );
/**Calculates direction of line (clockwise from north direction) in radians*/
/** Calculates direction of line (clockwise from north direction) in radians*/
static double lineAngle( double x1, double y1, double x2, double y2 );
/**Calculates angle perpendicular to line*/
/** Calculates angle perpendicular to line*/
static double linePerpendicularAngle( double x1, double y1, double x2, double y2 );
/**Angle between two linear segments*/
/** Angle between two linear segments*/
static double averageAngle( double x1, double y1, double x2, double y2, double x3, double y3 );
/**Averages two angles*/
/** Averages two angles*/
static double averageAngle( double a1, double a2 );


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -428,7 +428,7 @@ void QgsApplication::setUITheme( const QString &themeName )
// Loop all style sheets, find matching name, load it.
QHash<QString, QString> themes = QgsApplication::uiThemes();
QString themename = themeName;
if (!themes.contains(themename))
if ( !themes.contains( themename ) )
themename = "default";

QString path = themes[themename];
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsrulebasedrendererv2.cpp
Expand Up @@ -516,7 +516,7 @@ QgsRuleBasedRendererV2::Rule::RenderResult QgsRuleBasedRendererV2::Rule::renderF
if ( mSymbol && mIsActive )
{
// add job to the queue: each symbol's zLevel must be added
Q_FOREACH( int normZLevel, mSymbolNormZLevels )
Q_FOREACH ( int normZLevel, mSymbolNormZLevels )
{
//QgsDebugMsg(QString("add job at level %1").arg(normZLevel));
renderQueue[normZLevel].jobs.append( new RenderJob( featToRender, mSymbol ) );
Expand All @@ -527,7 +527,7 @@ QgsRuleBasedRendererV2::Rule::RenderResult QgsRuleBasedRendererV2::Rule::renderF
bool willrendersomething = false;

// process children
Q_FOREACH( Rule* rule, mChildren )
Q_FOREACH ( Rule* rule, mChildren )
{
// Don't process else rules yet
if ( !rule->isElse() )
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology-ng/qgsrendererv2widget.cpp
Expand Up @@ -26,7 +26,7 @@
QgsRendererV2Widget::QgsRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style )
: QWidget(), mLayer( layer ), mStyle( style )
{
contextMenu = new QMenu( tr("Renderer Options"), this );
contextMenu = new QMenu( tr( "Renderer Options" ), this );

mCopyAction = contextMenu->addAction( tr( "Copy" ), this, SLOT( copy() ) );
mCopyAction->setShortcut( QKeySequence( QKeySequence::Copy ) );
Expand Down
52 changes: 26 additions & 26 deletions src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Expand Up @@ -1554,47 +1554,47 @@ class QgsSvgListModel : public QAbstractListModel
{
Q_UNUSED( parent );
return mSvgFiles.count();
}
}

QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const override
{
QString entry = mSvgFiles.at( index.row() );

if ( role == Qt::DecorationRole ) // icon
{
QPixmap pixmap;
if ( !QPixmapCache::find( entry, pixmap ) )
{
// render SVG file
QColor fill, outline;
double outlineWidth;
bool fillParam, outlineParam, outlineWidthParam;
QgsSvgCache::instance()->containsParams( entry, fillParam, fill, outlineParam, outline, outlineWidthParam, outlineWidth );

bool fitsInCache; // should always fit in cache at these sizes (i.e. under 559 px ^ 2, or half cache size)
const QImage& img = QgsSvgCache::instance()->svgAsImage( entry, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, 1.0, fitsInCache );
pixmap = QPixmap::fromImage( img );
QPixmapCache::insert( entry, pixmap );
QPixmap pixmap;
if ( !QPixmapCache::find( entry, pixmap ) )
{
// render SVG file
QColor fill, outline;
double outlineWidth;
bool fillParam, outlineParam, outlineWidthParam;
QgsSvgCache::instance()->containsParams( entry, fillParam, fill, outlineParam, outline, outlineWidthParam, outlineWidth );

bool fitsInCache; // should always fit in cache at these sizes (i.e. under 559 px ^ 2, or half cache size)
const QImage& img = QgsSvgCache::instance()->svgAsImage( entry, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, 1.0, fitsInCache );
pixmap = QPixmap::fromImage( img );
QPixmapCache::insert( entry, pixmap );
}

return pixmap;
}
else if ( role == Qt::UserRole || role == Qt::ToolTipRole )
{
return entry;
}

return pixmap;
return QVariant();
}
else if ( role == Qt::UserRole || role == Qt::ToolTipRole )
{
return entry;
}

return QVariant();
}

protected:
QStringList mSvgFiles;
protected:
QStringList mSvgFiles;
};

class QgsSvgGroupsModel : public QStandardItemModel
{
public:
QgsSvgGroupsModel( QObject* parent ) : QStandardItemModel( parent )
public:
QgsSvgGroupsModel( QObject* parent ) : QStandardItemModel( parent )
{
QStringList svgPaths = QgsApplication::svgPaths();
QStandardItem *parentItem = invisibleRootItem();
Expand Down
12 changes: 6 additions & 6 deletions src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -183,12 +183,12 @@ QgsSpatiaLiteProvider::createEmptyLayer(
}
else
{
// if the pk field's type is bigint, use the autoincremental
// integer type instead
if ( primaryKeyType == "BIGINT" )
{
primaryKeyType = "INTEGER";
}
// if the pk field's type is bigint, use the autoincremental
// integer type instead
if ( primaryKeyType == "BIGINT" )
{
primaryKeyType = "INTEGER";
}
}

try
Expand Down

0 comments on commit 53c8491

Please sign in to comment.