mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
fix warnings and extra semicolons
This commit is contained in:
parent
dc93261ce5
commit
198d8fe58f
@ -73,6 +73,10 @@ for f in "$@"; do
|
|||||||
cmd=:
|
cmd=:
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
python/ext-libs/*)
|
||||||
|
cmd=:
|
||||||
|
;;
|
||||||
|
|
||||||
*.py|*.sip)
|
*.py|*.sip)
|
||||||
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
|
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
|
||||||
;;
|
;;
|
||||||
|
@ -42,7 +42,7 @@ class ANALYSIS_EXPORT QgsGraphDirector : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~QgsGraphDirector() { };
|
virtual ~QgsGraphDirector() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a graph using RgGraphBuilder
|
* Make a graph using RgGraphBuilder
|
||||||
|
@ -700,19 +700,19 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
|||||||
html += QString( "<table bgcolor=\"#FFFFAA\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
html += QString( "<table bgcolor=\"#FFFFAA\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
||||||
" <tr><td width=\"100%\" style=\"color:#880000\"><b>%1</b></td></tr>"
|
" <tr><td width=\"100%\" style=\"color:#880000\"><b>%1</b></td></tr>"
|
||||||
"</table>" ).arg( tr( "There is a new version available" ) );
|
"</table>" ).arg( tr( "There is a new version available" ) );
|
||||||
};
|
}
|
||||||
if ( metadata->value( "status" ) == "new" )
|
if ( metadata->value( "status" ) == "new" )
|
||||||
{
|
{
|
||||||
html += QString( "<table bgcolor=\"#CCFFCC\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
html += QString( "<table bgcolor=\"#CCFFCC\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
||||||
" <tr><td width=\"100%\" style=\"color:#008800\"><b>%1</b></td></tr>"
|
" <tr><td width=\"100%\" style=\"color:#008800\"><b>%1</b></td></tr>"
|
||||||
"</table>" ).arg( tr( "This is a new plugin" ) );
|
"</table>" ).arg( tr( "This is a new plugin" ) );
|
||||||
};
|
}
|
||||||
if ( metadata->value( "status" ) == "newer" )
|
if ( metadata->value( "status" ) == "newer" )
|
||||||
{
|
{
|
||||||
html += QString( "<table bgcolor=\"#FFFFCC\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
html += QString( "<table bgcolor=\"#FFFFCC\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
||||||
" <tr><td width=\"100%\" style=\"color:#550000\"><b>%1</b></td></tr>"
|
" <tr><td width=\"100%\" style=\"color:#550000\"><b>%1</b></td></tr>"
|
||||||
"</table>" ).arg( tr( "Installed version of this plugin is higher than any version found in repository" ) );
|
"</table>" ).arg( tr( "Installed version of this plugin is higher than any version found in repository" ) );
|
||||||
};
|
}
|
||||||
if ( metadata->value( "experimental" ) == "true" )
|
if ( metadata->value( "experimental" ) == "true" )
|
||||||
{
|
{
|
||||||
html += QString( "<table bgcolor=\"#EEEEBB\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
|
html += QString( "<table bgcolor=\"#EEEEBB\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
|
||||||
@ -720,7 +720,7 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
|||||||
" <img src=\"qrc:/images/themes/default/pluginExperimental.png\" width=\"32\"><b>%1</b>"
|
" <img src=\"qrc:/images/themes/default/pluginExperimental.png\" width=\"32\"><b>%1</b>"
|
||||||
" </td></tr>"
|
" </td></tr>"
|
||||||
"</table>" ).arg( tr( "This plugin is experimental" ) );
|
"</table>" ).arg( tr( "This plugin is experimental" ) );
|
||||||
};
|
}
|
||||||
if ( metadata->value( "deprecated" ) == "true" )
|
if ( metadata->value( "deprecated" ) == "true" )
|
||||||
{
|
{
|
||||||
html += QString( "<table bgcolor=\"#EEBBCC\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
|
html += QString( "<table bgcolor=\"#EEBBCC\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
|
||||||
@ -728,7 +728,7 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
|||||||
" <img src=\"qrc:/images/themes/default/pluginDeprecated.png\" width=\"32\"><b>%1</b>"
|
" <img src=\"qrc:/images/themes/default/pluginDeprecated.png\" width=\"32\"><b>%1</b>"
|
||||||
" </td></tr>"
|
" </td></tr>"
|
||||||
"</table>" ).arg( tr( "This plugin is deprecated" ) );
|
"</table>" ).arg( tr( "This plugin is deprecated" ) );
|
||||||
};
|
}
|
||||||
|
|
||||||
// Now the metadata
|
// Now the metadata
|
||||||
|
|
||||||
|
@ -151,13 +151,13 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
|
|||||||
{
|
{
|
||||||
myScaleBarWidth = myCanvasWidth / 4.0; // pixels
|
myScaleBarWidth = myCanvasWidth / 4.0; // pixels
|
||||||
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble; // map units
|
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble; // map units
|
||||||
};
|
}
|
||||||
|
|
||||||
//if scale bar is more than half the canvas wide keep halving until not
|
//if scale bar is more than half the canvas wide keep halving until not
|
||||||
while ( myScaleBarWidth > myCanvasWidth / 3.0 )
|
while ( myScaleBarWidth > myCanvasWidth / 3.0 )
|
||||||
{
|
{
|
||||||
myScaleBarWidth = myScaleBarWidth / 3;
|
myScaleBarWidth = myScaleBarWidth / 3;
|
||||||
};
|
}
|
||||||
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble;
|
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble;
|
||||||
|
|
||||||
// Work out the exponent for the number - e.g, 1234 will give 3,
|
// Work out the exponent for the number - e.g, 1234 will give 3,
|
||||||
@ -235,7 +235,7 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
|
|||||||
myScaleBarUnitLabel = tr( " unknown" );
|
myScaleBarUnitLabel = tr( " unknown" );
|
||||||
default:
|
default:
|
||||||
QgsDebugMsg( QString( "Error: not picked up map units - actual value = %1" ).arg( myMapUnits ) );
|
QgsDebugMsg( QString( "Error: not picked up map units - actual value = %1" ).arg( myMapUnits ) );
|
||||||
};
|
}
|
||||||
|
|
||||||
//Set font and calculate width of unit label
|
//Set font and calculate width of unit label
|
||||||
int myFontSize = 10; //we use this later for buffering
|
int myFontSize = 10; //we use this later for buffering
|
||||||
|
@ -35,6 +35,8 @@ bool QgsLayerDefinition::loadLayerDefinition( const QString &path, QgsLayerTreeG
|
|||||||
|
|
||||||
bool QgsLayerDefinition::loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup *rootGroup, QString &errorMessage )
|
bool QgsLayerDefinition::loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup *rootGroup, QString &errorMessage )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( errorMessage );
|
||||||
|
|
||||||
QgsLayerTreeGroup* root = new QgsLayerTreeGroup;
|
QgsLayerTreeGroup* root = new QgsLayerTreeGroup;
|
||||||
// We have to replace the IDs before we load them because it's too late once they are loaded
|
// We have to replace the IDs before we load them because it's too late once they are loaded
|
||||||
QDomNodeList ids = doc.elementsByTagName( "id" );
|
QDomNodeList ids = doc.elementsByTagName( "id" );
|
||||||
|
@ -272,7 +272,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
|
|||||||
Q_UNUSED( thePyramidList ); Q_UNUSED( theResamplingMethod );
|
Q_UNUSED( thePyramidList ); Q_UNUSED( theResamplingMethod );
|
||||||
Q_UNUSED( theFormat ); Q_UNUSED( theConfigOptions );
|
Q_UNUSED( theFormat ); Q_UNUSED( theConfigOptions );
|
||||||
return "FAILED_NOT_SUPPORTED";
|
return "FAILED_NOT_SUPPORTED";
|
||||||
};
|
}
|
||||||
|
|
||||||
/** \brief Accessor for ths raster layers pyramid list.
|
/** \brief Accessor for ths raster layers pyramid list.
|
||||||
* @param overviewList used to construct the pyramid list (optional), when empty the list is defined by the provider.
|
* @param overviewList used to construct the pyramid list (optional), when empty the list is defined by the provider.
|
||||||
@ -282,7 +282,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
|
|||||||
* list.
|
* list.
|
||||||
*/
|
*/
|
||||||
virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() )
|
virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() )
|
||||||
{ Q_UNUSED( overviewList ); return QList<QgsRasterPyramid>(); };
|
{ Q_UNUSED( overviewList ); return QList<QgsRasterPyramid>(); }
|
||||||
|
|
||||||
/** \brief Returns true if raster has at least one populated histogram. */
|
/** \brief Returns true if raster has at least one populated histogram. */
|
||||||
bool hasPyramids();
|
bool hasPyramids();
|
||||||
|
@ -438,7 +438,7 @@ void QgsRelationReferenceWidget::init()
|
|||||||
|
|
||||||
qSort( cache.begin(), cache.end(), orderByLessThan );
|
qSort( cache.begin(), cache.end(), orderByLessThan );
|
||||||
|
|
||||||
Q_FOREACH( const ValueRelationItem& item, cache )
|
Q_FOREACH ( const ValueRelationItem& item, cache )
|
||||||
{
|
{
|
||||||
mComboBox->addItem( item.first.toString(), item.second );
|
mComboBox->addItem( item.first.toString(), item.second );
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ namespace QgisGui
|
|||||||
|
|
||||||
QString createFileFilter_( QString const &longName, QString const &glob )
|
QString createFileFilter_( QString const &longName, QString const &glob )
|
||||||
{
|
{
|
||||||
return QString("%1 (%2 %3)").arg( longName ).arg( glob.toLower() ).arg( glob.toUpper() );
|
return QString( "%1 (%2 %3)" ).arg( longName ).arg( glob.toLower() ).arg( glob.toUpper() );
|
||||||
}
|
}
|
||||||
|
|
||||||
QString createFileFilter_( QString const &format )
|
QString createFileFilter_( QString const &format )
|
||||||
|
@ -74,8 +74,8 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface )
|
|||||||
, mypUserCrsToolButton( NULL )
|
, mypUserCrsToolButton( NULL )
|
||||||
, mypCRSLabel( NULL )
|
, mypCRSLabel( NULL )
|
||||||
, mCanvasDisplayPrecision( 5 )
|
, mCanvasDisplayPrecision( 5 )
|
||||||
, mQGisIface( theQgisInterface )
|
|
||||||
, mUserCrsDisplayPrecision( 5 )
|
, mUserCrsDisplayPrecision( 5 )
|
||||||
|
, mQGisIface( theQgisInterface )
|
||||||
, mQActionPointer( NULL )
|
, mQActionPointer( NULL )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -122,17 +122,17 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
|
|||||||
, mQActionUnload( 0 )
|
, mQActionUnload( 0 )
|
||||||
, mOsgViewer( 0 )
|
, mOsgViewer( 0 )
|
||||||
, mViewerWidget( 0 )
|
, mViewerWidget( 0 )
|
||||||
|
, mRootNode( 0 )
|
||||||
, mMapNode( 0 )
|
, mMapNode( 0 )
|
||||||
, mBaseLayer( 0 )
|
, mBaseLayer( 0 )
|
||||||
, mQgisMapLayer( 0 )
|
, mQgisMapLayer( 0 )
|
||||||
, mTileSource( 0 )
|
, mTileSource( 0 )
|
||||||
|
, mControlCanvas( 0 )
|
||||||
, mElevationManager( 0 )
|
, mElevationManager( 0 )
|
||||||
, mObjectPlacer( 0 )
|
, mObjectPlacer( 0 )
|
||||||
, mControlCanvas( 0 )
|
|
||||||
, mSelectedLat( 0. )
|
, mSelectedLat( 0. )
|
||||||
, mSelectedLon( 0. )
|
, mSelectedLon( 0. )
|
||||||
, mSelectedElevation( 0. )
|
, mSelectedElevation( 0. )
|
||||||
, mRootNode( 0 )
|
|
||||||
{
|
{
|
||||||
mIsGlobeRunning = false;
|
mIsGlobeRunning = false;
|
||||||
//needed to be "seen" by other plugins by doing
|
//needed to be "seen" by other plugins by doing
|
||||||
|
@ -286,9 +286,9 @@ QgsGrassModuleOptions::QgsGrassModuleOptions(
|
|||||||
: mIface( iface )
|
: mIface( iface )
|
||||||
, mTools( tools )
|
, mTools( tools )
|
||||||
, mModule( module )
|
, mModule( module )
|
||||||
, mDirect( direct )
|
|
||||||
, mParent( 0 )
|
, mParent( 0 )
|
||||||
, mRegionModeComboBox( 0 )
|
, mRegionModeComboBox( 0 )
|
||||||
|
, mDirect( direct )
|
||||||
{
|
{
|
||||||
QgsDebugMsg( "called." );
|
QgsDebugMsg( "called." );
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ bool QgsGrassUtils::itemExists( QString element, QString item )
|
|||||||
|
|
||||||
QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent )
|
QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent )
|
||||||
: QObject()
|
: QObject()
|
||||||
, mParent( parent )
|
|
||||||
, mDialog( 0 )
|
, mDialog( 0 )
|
||||||
, mLineEdit( 0 )
|
, mLineEdit( 0 )
|
||||||
, mLabel( 0 )
|
, mLabel( 0 )
|
||||||
, mErrorLabel( 0 )
|
, mErrorLabel( 0 )
|
||||||
, mOkButton( 0 )
|
, mOkButton( 0 )
|
||||||
, mCancelButton( 0 )
|
, mCancelButton( 0 )
|
||||||
|
, mParent( parent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ static const QString sPluginIcon = ":/heatmap/heatmap.png";
|
|||||||
*/
|
*/
|
||||||
Heatmap::Heatmap( QgisInterface * theQgisInterface )
|
Heatmap::Heatmap( QgisInterface * theQgisInterface )
|
||||||
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
|
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
|
||||||
, mQGisIface( theQgisInterface )
|
|
||||||
, mDecay( 1. )
|
, mDecay( 1. )
|
||||||
|
, mQGisIface( theQgisInterface )
|
||||||
, mQActionPointer( 0 )
|
, mQActionPointer( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class TestQgsGui : public QObject
|
|||||||
void TestQgsGui::createFileFilterForFormat()
|
void TestQgsGui::createFileFilterForFormat()
|
||||||
{
|
{
|
||||||
QString expected = "FOO format (*.foo *.FOO)";
|
QString expected = "FOO format (*.foo *.FOO)";
|
||||||
QString actual = QgisGui::createFileFilter_("foo");
|
QString actual = QgisGui::createFileFilter_( "foo" );
|
||||||
|
|
||||||
QCOMPARE( actual, expected );
|
QCOMPARE( actual, expected );
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ void TestQgsGui::createFileFilterForFormat()
|
|||||||
void TestQgsGui::createFileFilter()
|
void TestQgsGui::createFileFilter()
|
||||||
{
|
{
|
||||||
QString expected = "My Description (my_regex MY_REGEX)";
|
QString expected = "My Description (my_regex MY_REGEX)";
|
||||||
QString actual = QgisGui::createFileFilter_("My Description", "my_regex");
|
QString actual = QgisGui::createFileFilter_( "My Description", "my_regex" );
|
||||||
|
|
||||||
QCOMPARE( actual, expected );
|
QCOMPARE( actual, expected );
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
namespace QTest
|
namespace QTest
|
||||||
{
|
{
|
||||||
template<>
|
template<>
|
||||||
char* toString( const QgsRectangle& r ) {
|
char* toString( const QgsRectangle& r )
|
||||||
|
{
|
||||||
QByteArray ba = r.toString().toLocal8Bit();
|
QByteArray ba = r.toString().toLocal8Bit();
|
||||||
return qstrdup(ba.data());
|
return qstrdup( ba.data() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user