Skip to content
Permalink
Browse files

identation update and fix clang 3.3 warnings

  • Loading branch information
jef-n committed Jun 20, 2013
1 parent 0710de3 commit 9bbc647c548638b12c6ea6dcc2509465dded0c1a
Showing with 99 additions and 109 deletions.
  1. +1 −1 python/plugins/GdalTools/tools/doOverview.py
  2. +1 −1 python/plugins/GdalTools/tools/inOutSelector.py
  3. +2 −2 python/plugins/sextante/algs/ftools/ConvexHull.py
  4. +1 −1 python/plugins/sextante/algs/ftools/ExportGeometryInfo.py
  5. +1 −1 python/plugins/sextante/algs/ftools/PointsInPolygonWeighted.py
  6. +1 −1 python/plugins/sextante/core/SextanteTableWriter.py
  7. +1 −1 python/plugins/sextante/gui/AlgorithmExecutionDialog.py
  8. +2 −2 python/plugins/sextante/gui/BatchProcessingDialog.py
  9. +3 −3 python/plugins/sextante/modeler/ModelerGraphicItem.py
  10. +1 −1 python/plugins/sextante/otb/OTBAlgorithm.py
  11. +2 −2 python/plugins/sextante/r/RAlgorithm.py
  12. +5 −5 python/pyplugin_installer/qgsplugininstallerinstallingdialog.py
  13. +21 −4 src/analysis/raster/qgsrastercalcnode.cpp
  14. +0 −1 src/analysis/raster/qgsrastercalcnode.h
  15. +10 −10 src/app/main.cpp
  16. +6 −6 src/app/nodetool/qgsselectedfeature.cpp
  17. +1 −2 src/app/nodetool/qgsvertexentry.cpp
  18. +0 −2 src/app/nodetool/qgsvertexentry.h
  19. +7 −7 src/app/pluginmanager/qgspluginmanager_texts.cpp
  20. +3 −3 src/app/pluginmanager/qgspluginsortfilterproxymodel.cpp
  21. +4 −2 src/app/qgsmaptoolannotation.cpp
  22. +0 −2 src/app/qgsmaptoolannotation.h
  23. +7 −7 src/app/qgspluginregistry.cpp
  24. +1 −1 src/app/qgstipfactory.cpp
  25. +0 −1 src/core/qgsmaptopixel.cpp
  26. +0 −2 src/core/qgsmaptopixel.h
  27. +2 −2 src/core/qgsproviderregistry.cpp
  28. +2 −2 src/mapserver/qgsconfigparser.cpp
  29. +1 −1 src/mapserver/qgsprojectparser.cpp
  30. +0 −1 src/plugins/dxf2shp_converter/builder.cpp
  31. +0 −9 src/plugins/dxf2shp_converter/builder.h
  32. +0 −3 src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.h
  33. +1 −2 src/plugins/dxf2shp_converter/dxflib/src/dl_exception.h
  34. +2 −6 src/plugins/globe/globe_plugin.h
  35. +0 −1 src/plugins/globe/osgEarthUtil/Controls
  36. +1 −1 src/plugins/globe/osgEarthUtil/Controls.cpp
  37. +1 −1 src/plugins/offline_editing/offline_editing_plugin_gui.cpp
  38. +0 −1 src/plugins/offline_editing/offline_editing_plugin_gui.h
  39. +1 −1 src/plugins/roadgraph/exportdlg.cpp
  40. +1 −2 src/plugins/roadgraph/exportdlg.h
  41. +2 −1 src/providers/ogr/qgsogrfeatureiterator.cpp
  42. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  43. +1 −1 src/python/qgspythonutilsimpl.cpp
  44. +1 −1 src/ui/qgsrasterlayerpropertiesbase.ui
  45. +1 −1 src/ui/qgsvectorlayerpropertiesbase.ui
@@ -136,7 +136,7 @@ def getArguments( self ):
# TODO fix batch enabled, argument order is wrong, levels not at end
if self.isBatchEnabled():
return arguments

arguments.append(self.getInputFileName())

if len(self.mPyramidOptionsWidget.overviewList()) == 0:
@@ -135,7 +135,7 @@ def setFilename(self, fn=None):
elif isinstance(fn, str) or isinstance(fn, unicode):
fn = unicode( fn )

#TODO test
#TODO test
elif isinstance(fn, list):
if len( fn ) > 0:
if self.getType() & self.MULTIFILE:
@@ -131,7 +131,7 @@ def processAlgorithm(self, progress):
outFeat.setAttributes([fid,val,area,perim])
writer.addFeature(outFeat)
except:
raise GeoAlgorithmExecutionException("Exception while computing convex hull")
raise GeoAlgorithmExecutionException("Exception while computing convex hull")
fid += 1
else:
hull = []
@@ -155,4 +155,4 @@ def processAlgorithm(self, progress):
raise GeoAlgorithmExecutionException("Exception while computing convex hull")

del writer

@@ -95,7 +95,7 @@ def processAlgorithm(self, progress):
# 0 - layer CRS
# 1 - project CRS
# 2 - ellipsoidal
if method == 2:
if method == 2:
ellips = QgsProject.instance().readEntry("Measure", "/Ellipsoid", GEO_NONE)[0]
crs = layer.crs().srsid()
elif method == 1:
@@ -105,7 +105,7 @@ def processAlgorithm(self, progress):
tmpGeom = QgsGeometry(ftPoint.geometry())
if geom.contains(tmpGeom):
weight = str(ftPoint.attributes()[fieldIdx])
try:
try:
count += float(weight)
except:
pass #ignore fields with non-numeric values
@@ -44,7 +44,7 @@ def __init__(self, fileName, encoding, fields):
file.write("\n")
file.close()

def addRecord(self, values):
def addRecord(self, values):
file = open(self.fileName, "a")
file.write(";".join([unicode(value) for value in values]))
file.write("\n")
@@ -323,7 +323,7 @@ def resetGUI(self):
QApplication.restoreOverrideCursor()
self.progressLabel.setText("")
self.progress.setValue(100)
#self.progress.setMaximum(100)
#self.progress.setMaximum(100)
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
@@ -154,7 +154,7 @@ def accept(self):
continue
widget = self.table.cellWidget(row, col)
if not self.setParameterValueFromWidget(param, widget, alg):
self.progressLabel.setText("<b>Missing parameter value: " + param.description + " (row " + str(row + 1) + ")</b>")
self.progressLabel.setText("<b>Missing parameter value: " + param.description + " (row " + str(row + 1) + ")</b>")
self.algs = None
return
col+=1
@@ -167,7 +167,7 @@ def accept(self):
out.value = text
col+=1
else:
self.progressLabel.setText("<b>Wrong or missing parameter value: " + out.description + " (row " + str(row + 1) + ")</b>")
self.progressLabel.setText("<b>Wrong or missing parameter value: " + out.description + " (row " + str(row + 1) + ")</b>")
self.algs = None
return
self.algs.append(alg)
@@ -190,7 +190,7 @@ def paint(self, painter, option, widget=None):

rect = QtCore.QRectF(-(ModelerGraphicItem.BOX_WIDTH + 2)/2.0, -(ModelerGraphicItem.BOX_HEIGHT + 2)/2.0,
ModelerGraphicItem.BOX_WIDTH + 2, ModelerGraphicItem.BOX_HEIGHT + 2)
painter.setPen(QtGui.QPen(QtCore.Qt.gray, 1))
painter.setPen(QtGui.QPen(QtCore.Qt.gray, 1))
color = QtGui.QColor(125,232, 232)
if isinstance(self.element, Parameter):
color = QtGui.QColor(179,179, 255)
@@ -227,7 +227,7 @@ def paint(self, painter, option, widget=None):
painter.drawText(pt, text)
i += 1
i = 1
h = (fm.height() * 1.2)
h = (fm.height() * 1.2)
h = h + ModelerGraphicItem.BOX_HEIGHT / 2.0
pt = QtCore.QPointF(-(ModelerGraphicItem.BOX_WIDTH)/2 + 25, h)
painter.drawText(pt, "Out")
@@ -284,7 +284,7 @@ def itemChange(self, change, value):

def polygon(self):
font = QtGui.QFont("Verdana", 8)
fm = QtGui.QFontMetricsF(font)
fm = QtGui.QFontMetricsF(font)
hUp = (fm.height() * 1.2) * (len(self.element.parameters) + 2)
hDown = (fm.height() * 1.2) * (len(self.element.outputs) + 2)
pol = QtGui.QPolygonF([
@@ -140,7 +140,7 @@ def processAlgorithm(self, progress):
elif isinstance(param, ParameterMultipleInput):
commands.append(param.name)
files = str(param.value).split(";")
paramvalue = " ".join(["\"" + f + "\"" for f in files])
paramvalue = " ".join(["\"" + f + "\"" for f in files])
commands.append(paramvalue)
elif isinstance(param, ParameterSelection):
commands.append(param.name)
@@ -390,12 +390,12 @@ def checkBeforeOpeningParametersDialog(self):
path = RUtils.RFolder()
if path == "":
return "R folder is not configured.\nPlease configure it before running R scripts."

R_INSTALLED = "R_INSTALLED"
settings = QSettings()
if settings.contains(R_INSTALLED):
return
if SextanteUtils.isWindows():
if SextanteUtils.isWindows():
if SextanteConfig.getSetting(RUtils.R_USE64):
execDir = "x64"
else:
@@ -49,13 +49,13 @@ def __init__(self, parent, plugin):
self.buttonBox.clicked.connect(self.abort)

url = QUrl(plugin["download_url"])

fileName = plugin["filename"]
tmpDir = QDir.tempPath()
tmpPath = QDir.cleanPath(tmpDir+"/"+fileName)
self.file = QFile(tmpPath)
self.nam = QPNetworkAccessManager(url.host(), )

self.nam = QPNetworkAccessManager(url.host(), )
#self.http = QPHttp(url.host(), port)
self.request = QNetworkRequest(url)
self.reply = self.nam.get( self.request )
@@ -85,7 +85,7 @@ def readProgress(self, done, total):
# ----------------------------------------- #
def requestFinished(self, reply):
self.buttonBox.setEnabled(False)
if reply.error() != QNetworkReply.NoError:
if reply.error() != QNetworkReply.NoError:
self.mResult = self.http.errorString()
self.reject()
return
@@ -121,6 +121,6 @@ def requestFinished(self, reply):
def abort(self):
if self.reply.isRunning():
self.nam.finished.disconnect()
self.reply.abort()
self.reply.abort()
self.mResult = self.tr("Aborted by user")
self.reject()
@@ -15,19 +15,36 @@
#include "qgsrastercalcnode.h"
#include <cfloat>

QgsRasterCalcNode::QgsRasterCalcNode(): mLeft( 0 ), mRight( 0 ), mRasterMatrix( 0 ), mNumber( 0 )
QgsRasterCalcNode::QgsRasterCalcNode()
: mLeft( 0 )
, mRight( 0 )
, mNumber( 0 )
{
}

QgsRasterCalcNode::QgsRasterCalcNode( double number ): mType( tNumber ), mLeft( 0 ), mRight( 0 ), mRasterMatrix( 0 ), mNumber( number )
QgsRasterCalcNode::QgsRasterCalcNode( double number )
: mType( tNumber )
, mLeft( 0 )
, mRight( 0 )
, mNumber( number )
{
}

QgsRasterCalcNode::QgsRasterCalcNode( Operator op, QgsRasterCalcNode* left, QgsRasterCalcNode* right ): mType( tOperator ), mLeft( left ), mRight( right ), mRasterMatrix( 0 ), mNumber( 0 ), mOperator( op )
QgsRasterCalcNode::QgsRasterCalcNode( Operator op, QgsRasterCalcNode* left, QgsRasterCalcNode* right )
: mType( tOperator )
, mLeft( left )
, mRight( right )
, mNumber( 0 )
, mOperator( op )
{
}

QgsRasterCalcNode::QgsRasterCalcNode( const QString& rasterName ): mType( tRasterRef ), mLeft( 0 ), mRight( 0 ), mRasterMatrix( 0 ), mNumber( 0 ), mRasterName( rasterName )
QgsRasterCalcNode::QgsRasterCalcNode( const QString& rasterName )
: mType( tRasterRef )
, mLeft( 0 )
, mRight( 0 )
, mNumber( 0 )
, mRasterName( rasterName )
{
}

@@ -81,7 +81,6 @@ class ANALYSIS_EXPORT QgsRasterCalcNode
Type mType;
QgsRasterCalcNode* mLeft;
QgsRasterCalcNode* mRight;
QgsRasterMatrix* mRasterMatrix;
double mNumber;
QString mRasterName;
Operator mOperator;
@@ -254,28 +254,28 @@ void myMessageOutput( QtMsgType type, const char *msg )
{
fprintf( stderr, "Fatal: %s\n", msg );
#if defined(linux) && !defined(ANDROID)
if( access( "/usr/bin/c++filt", X_OK) )
if ( access( "/usr/bin/c++filt", X_OK ) )
{
( void ) write( STDERR_FILENO, "Stacktrace (c++filt NOT FOUND):\n", 32 );
}
else
{
int fd[2];

if( pipe(fd)==0 && fork()==0 )
if ( pipe( fd ) == 0 && fork() == 0 )
{
close( STDIN_FILENO );
close( fd[1] );
dup( fd[0] );
execl( "/usr/bin/c++filt", "c++filt", (char *) 0 );
exit(1);
close( STDIN_FILENO );
close( fd[1] );
dup( fd[0] );
execl( "/usr/bin/c++filt", "c++filt", ( char * ) 0 );
exit( 1 );
}

( void ) write( STDERR_FILENO, "Stacktrace (piped through c++filt):\n", 36 );

close( STDERR_FILENO );
close( fd[0] );
dup( fd[1] );
close( STDERR_FILENO );
close( fd[0] );
dup( fd[1] );
}

void *buffer[256];
@@ -421,7 +421,7 @@ void QgsSelectedFeature::createVertexMapPolygon()
const QgsPolyline& poly = polygon[i2];
for ( int i = 0; i < poly.size(); i++ )
{
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], i, tr( "ring %1, vertex %2" ).arg( i2 ).arg( i ) ) );
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "ring %1, vertex %2" ).arg( i2 ).arg( i ) ) );
}
mVertexMap[y + poly.size() - 1 ]->setEqual( y );
mVertexMap[y]->setEqual( y + poly.size() - 1 );
@@ -441,7 +441,7 @@ void QgsSelectedFeature::createVertexMapPolygon()
const QgsPolyline& poly = poly2[i3];
for ( int i = 0; i < poly.size(); i++ )
{
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], y + i - 1, tr( "polygon %1, ring %2, vertex %3" ).arg( i2 ).arg( i3 ).arg( i ) ) );
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "polygon %1, ring %2, vertex %3" ).arg( i2 ).arg( i3 ).arg( i ) ) );
}
mVertexMap[y + poly.size() - 1]->setEqual( y );
mVertexMap[y]->setEqual( y + poly.size() - 1 );
@@ -465,7 +465,7 @@ void QgsSelectedFeature::createVertexMapLine()
QgsPolyline poly = mLine[i2];
for ( int i = 0; i < poly.size(); i++ )
{
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], i, tr( "polyline %1, vertex %2" ).arg( i2 ).arg( i ) ) );
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "polyline %1, vertex %2" ).arg( i2 ).arg( i ) ) );
}
y += poly.size();
}
@@ -475,7 +475,7 @@ void QgsSelectedFeature::createVertexMapLine()
QgsPolyline poly = mGeometry->asPolyline();
for ( int i = 0; i < poly.size(); i++ )
{
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], i, tr( "vertex %1" ).arg( i ) ) );
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "vertex %1" ).arg( i ) ) );
}
}
}
@@ -490,13 +490,13 @@ void QgsSelectedFeature::createVertexMapPoint()
QgsMultiPoint poly = mGeometry->asMultiPoint();
for ( int i = 0; i < poly.size(); i++ )
{
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], 1, tr( "point %1" ).arg( i ) ) );
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "point %1" ).arg( i ) ) );
}
}
else
{
// single point
mVertexMap.insert( 1, new QgsVertexEntry( mCanvas, mVlayer, mGeometry->asPoint(), 1, tr( "single point" ) ) );
mVertexMap.insert( 1, new QgsVertexEntry( mCanvas, mVlayer, mGeometry->asPoint(), tr( "single point" ) ) );
}
}

@@ -16,12 +16,11 @@
#include "nodetool/qgsvertexentry.h"
#include "qgsmaprenderer.h"

QgsVertexEntry::QgsVertexEntry( QgsMapCanvas *canvas, QgsMapLayer *layer, QgsPoint p, int originalIndex, QString tooltip, QgsVertexMarker::IconType type, int penWidth )
QgsVertexEntry::QgsVertexEntry( QgsMapCanvas *canvas, QgsMapLayer *layer, QgsPoint p, QString tooltip, QgsVertexMarker::IconType type, int penWidth )
: mSelected( false )
, mEquals( -1 )
, mInRubberBand( false )
, mRubberBandNr( 0 )
, mOriginalIndex( originalIndex )
, mPenWidth( penWidth )
, mToolTip( tooltip )
, mType( type )
@@ -29,7 +29,6 @@ class QgsVertexEntry
bool mInRubberBand;
int mRubberBandNr;
int mRubberBandIndex;
int mOriginalIndex;
int mPenWidth;
QString mToolTip;
QgsVertexMarker::IconType mType;
@@ -41,7 +40,6 @@ class QgsVertexEntry
QgsVertexEntry( QgsMapCanvas *canvas,
QgsMapLayer *layer,
QgsPoint p,
int originalIndex,
QString tooltip = QString::null,
QgsVertexMarker::IconType type = QgsVertexMarker::ICON_BOX,
int penWidth = 2 );
@@ -5,7 +5,7 @@

void QgsPluginManager::initTabDescriptions()
{
if( !mTabDescriptions.isEmpty() )
if ( !mTabDescriptions.isEmpty() )
return;

mTabDescriptions.insert( "installed_plugins", tr( "<h3>Installed Plugins</h3>\
@@ -25,7 +25,7 @@ To <i>enable</i> or <i>disable</i> a plugin,\
Plugins showing in <span style='color:red'>red</span> are not loaded because there is a problem. Consult the \
'Invalid' tab to see more details, or to reinstall or uninstall this plugin.\
</p>\
") );
" ) );



@@ -36,11 +36,11 @@ Here are <b>upgradeable plugins</b>. It means more recent versions of installed
plugins are available in the repositories.\
</p>\
\
") );
" ) );



mTabDescriptions.insert( "get_more_plugins", tr( "<h3>Get more plugins</h3>\
mTabDescriptions.insert( "get_more_plugins", tr( "<h3>Get more plugins</h3>\
\
<p>\
Here you see the list of all plugins available in the repositories, but which are <b>not yet installed</b>.\
@@ -57,7 +57,7 @@ then click the 'Install plugin' button.\
</p>\
\
\
") );
" ) );



@@ -68,7 +68,7 @@ Here you see brand <b>new</b> plugins which can be installed.\
</p>\
\
\
") );
" ) );



@@ -92,6 +92,6 @@ Another common reason is that a python plugin needs some external python librari
You can install them yourself, depending on your operating system. After a correct \
install the plugin should work.\
</p>\
") );
" ) );

}

0 comments on commit 9bbc647

Please sign in to comment.
You can’t perform that action at this time.