diff --git a/src/core/composer/qgsatlascomposition.cpp b/src/core/composer/qgsatlascomposition.cpp index 15a9d6ce43de..ac09cc3311d2 100644 --- a/src/core/composer/qgsatlascomposition.cpp +++ b/src/core/composer/qgsatlascomposition.cpp @@ -107,53 +107,6 @@ void QgsAtlasComposition::setComposerMap( QgsComposerMap* map ) map->setAtlasDriven( true ); } -bool QgsAtlasComposition::fixedScale() const -{ - //deprecated method. Until removed just return the property for the first atlas-enabled composer map - QgsComposerMap * map = composerMap(); - if ( !map ) - { - return false; - } - - return map->atlasFixedScale(); -} - -void QgsAtlasComposition::setFixedScale( bool fixed ) -{ - //deprecated method. Until removed just set the property for the first atlas-enabled composer map - QgsComposerMap * map = composerMap(); - if ( !map ) - { - return; - } - - map->setAtlasFixedScale( fixed ); -} - -float QgsAtlasComposition::margin() const -{ - //deprecated method. Until removed just return the property for the first atlas-enabled composer map - QgsComposerMap * map = composerMap(); - if ( !map ) - { - return 0; - } - - return map->atlasMargin(); -} - -void QgsAtlasComposition::setMargin( float margin ) -{ - //deprecated method. Until removed just set the property for the first atlas-enabled composer map - QgsComposerMap * map = composerMap(); - if ( !map ) - { - return; - } - - map->setAtlasMargin(( double ) margin ); -} int QgsAtlasComposition::sortKeyAttributeIndex() const { @@ -745,4 +698,52 @@ void QgsAtlasComposition::evalFeatureFilename() } } +Q_NOWARN_DEPRECATED_PUSH +bool QgsAtlasComposition::fixedScale() const +{ + //deprecated method. Until removed just return the property for the first atlas-enabled composer map + QgsComposerMap * map = composerMap(); + if ( !map ) + { + return false; + } + + return map->atlasFixedScale(); +} + +void QgsAtlasComposition::setFixedScale( bool fixed ) +{ + //deprecated method. Until removed just set the property for the first atlas-enabled composer map + QgsComposerMap * map = composerMap(); + if ( !map ) + { + return; + } + + map->setAtlasFixedScale( fixed ); +} +float QgsAtlasComposition::margin() const +{ + //deprecated method. Until removed just return the property for the first atlas-enabled composer map + QgsComposerMap * map = composerMap(); + if ( !map ) + { + return 0; + } + + return map->atlasMargin(); +} + +void QgsAtlasComposition::setMargin( float margin ) +{ + //deprecated method. Until removed just set the property for the first atlas-enabled composer map + QgsComposerMap * map = composerMap(); + if ( !map ) + { + return; + } + + map->setAtlasMargin(( double ) margin ); +} +Q_NOWARN_DEPRECATED_POP diff --git a/src/core/composer/qgscomposerattributetablemodel.h b/src/core/composer/qgscomposerattributetablemodel.h index 394f23c085f4..13ae024ad144 100644 --- a/src/core/composer/qgscomposerattributetablemodel.h +++ b/src/core/composer/qgscomposerattributetablemodel.h @@ -43,6 +43,7 @@ class CORE_EXPORT QgsComposerAttributeTableColumnModel: public QAbstractTableMod /**Constructor for QgsComposerAttributeTableColumnModel. * @param composerTable QgsComposerAttributeTable the model is attached to + * @param parent optional parent */ QgsComposerAttributeTableColumnModel( QgsComposerAttributeTable *composerTable, QObject *parent = 0 ); virtual ~QgsComposerAttributeTableColumnModel(); @@ -140,6 +141,7 @@ class CORE_EXPORT QgsComposerTableSortColumnsProxyModel: public QSortFilterProxy /**Constructor for QgsComposerTableSortColumnsProxyModel. * @param composerTable QgsComposerAttributeTable the model is attached to * @param filterType filter for columns, controls whether sorted or unsorted columns are shown + * @param parent optional parent */ QgsComposerTableSortColumnsProxyModel( QgsComposerAttributeTable *composerTable, ColumnFilterType filterType, QObject *parent = 0 ); @@ -173,7 +175,7 @@ class CORE_EXPORT QgsComposerTableSortColumnsProxyModel: public QSortFilterProxy /**Returns the QgsComposerTableColumn corresponding to an index from the source * QgsComposerAttributeTableColumnModel model. * @returns QgsComposerTableColumn for specified index from QgsComposerAttributeTableColumnModel - * @param index a QModelIndex + * @param sourceIndex a QModelIndex * @note added in 2.3 * @see columnFromRow * @see columnFromIndex diff --git a/src/core/composer/qgscomposeritem.h b/src/core/composer/qgscomposeritem.h index 23c44ece8c91..59acfbb6f7ca 100644 --- a/src/core/composer/qgscomposeritem.h +++ b/src/core/composer/qgscomposeritem.h @@ -314,6 +314,12 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem void drawText( QPainter* p, double x, double y, const QString& text, const QFont& font ) const; /**Like the above, but with a rectangle for multiline text + * @param p painter to use + * @param rect rectangle to draw into + * @param text text to draw + * @param font font to use + * @param halignment optional horizontal alignment + * @param valignment optional vertical alignment * @param flags allows for passing Qt::TextFlags to control appearance of rendered text */ void drawText( QPainter* p, const QRectF& rect, const QString& text, const QFont& font, Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::AlignmentFlag valignment = Qt::AlignTop, int flags = Qt::TextWordWrap ) const; diff --git a/src/core/symbology-ng/qgsellipsesymbollayerv2.h b/src/core/symbology-ng/qgsellipsesymbollayerv2.h index 2c04c508a530..9fafbca11add 100644 --- a/src/core/symbology-ng/qgsellipsesymbollayerv2.h +++ b/src/core/symbology-ng/qgsellipsesymbollayerv2.h @@ -110,7 +110,10 @@ class CORE_EXPORT QgsEllipseSymbolLayerV2: public QgsMarkerSymbolLayerV2 /**Setup mPainterPath @param symbolName name of symbol @param context render context - @param f feature f to render (0 if no data defined rendering)*/ + @param scaledWidth optional width + @param scaledHeight optional height + @param f optional feature to render (0 if no data defined rendering) + */ void preparePath( const QString& symbolName, QgsSymbolV2RenderContext& context, double* scaledWidth = 0, double* scaledHeight = 0, const QgsFeature* f = 0 ); /**True if this symbol layer uses a data defined property*/ diff --git a/src/gui/symbology-ng/qgssymbolslistwidget.cpp b/src/gui/symbology-ng/qgssymbolslistwidget.cpp index 2f1b41f31241..75f5555fca14 100644 --- a/src/gui/symbology-ng/qgssymbolslistwidget.cpp +++ b/src/gui/symbology-ng/qgssymbolslistwidget.cpp @@ -208,6 +208,8 @@ void QgsSymbolsListWidget::setLineWidth( double width ) void QgsSymbolsListWidget::symbolAddedToStyle( QString name, QgsSymbolV2* symbol ) { + Q_UNUSED( name ); + Q_UNUSED( symbol ); populateSymbolView(); } diff --git a/tests/src/core/testqgsatlascomposition.cpp b/tests/src/core/testqgsatlascomposition.cpp index 700d503623cd..86ae4abc3305 100644 --- a/tests/src/core/testqgsatlascomposition.cpp +++ b/tests/src/core/testqgsatlascomposition.cpp @@ -215,9 +215,11 @@ void TestQgsAtlasComposition::autoscale_render() void TestQgsAtlasComposition::autoscale_render_2_0_api() { + Q_NOWARN_DEPRECATED_PUSH mAtlas->setComposerMap( mAtlasMap ); mAtlas->setFixedScale( false ); mAtlas->setMargin( 0.10f ); + Q_NOWARN_DEPRECATED_POP mAtlas->beginRender(); @@ -230,9 +232,11 @@ void TestQgsAtlasComposition::autoscale_render_2_0_api() QVERIFY( checker.testComposition( mReport, 0, 200 ) ); } mAtlas->endRender(); + Q_NOWARN_DEPRECATED_PUSH mAtlas->setComposerMap( 0 ); mAtlas->setFixedScale( false ); mAtlas->setMargin( 0 ); + Q_NOWARN_DEPRECATED_POP } void TestQgsAtlasComposition::fixedscale_render() @@ -260,8 +264,10 @@ void TestQgsAtlasComposition::fixedscale_render() void TestQgsAtlasComposition::fixedscale_render_2_0_api() { mAtlasMap->setNewExtent( QgsRectangle( 209838.166, 6528781.020, 610491.166, 6920530.620 ) ); + Q_NOWARN_DEPRECATED_PUSH mAtlas->setComposerMap( mAtlasMap ); mAtlas->setFixedScale( true ); + Q_NOWARN_DEPRECATED_POP mAtlas->beginRender(); for ( int fit = 0; fit < 2; ++fit ) @@ -273,8 +279,10 @@ void TestQgsAtlasComposition::fixedscale_render_2_0_api() QVERIFY( checker.testComposition( mReport, 0, 200 ) ); } mAtlas->endRender(); + Q_NOWARN_DEPRECATED_PUSH mAtlas->setComposerMap( 0 ); mAtlas->setFixedScale( false ); + Q_NOWARN_DEPRECATED_POP } void TestQgsAtlasComposition::two_map_autoscale_render() diff --git a/tests/src/core/testqgscomposertable.cpp b/tests/src/core/testqgscomposertable.cpp index 30efa24060fe..1714b557be72 100644 --- a/tests/src/core/testqgscomposertable.cpp +++ b/tests/src/core/testqgscomposertable.cpp @@ -322,7 +322,9 @@ void TestQgsComposerTable::attributeTableSetAliasOnSubset() aliases.insert( 1, QString( "1Heading" ) ); aliases.insert( 3, QString( "2Pilots" ) ); aliases.insert( 4, QString( "3Cabin Crew" ) ); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setFieldAliasMap( aliases ); + Q_NOWARN_DEPRECATED_POP //get header labels and compare QMap headerMap = mComposerAttributeTable->headerLabels(); @@ -338,7 +340,9 @@ void TestQgsComposerTable::attributeTableSetAliasOnSubset() attributes.clear(); aliases.clear(); mComposerAttributeTable->setDisplayAttributes( attributes ); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setFieldAliasMap( aliases ); + Q_NOWARN_DEPRECATED_POP } void TestQgsComposerTable::attributeTableGetAttributes() @@ -348,7 +352,9 @@ void TestQgsComposerTable::attributeTableGetAttributes() attributes << 0 << 3 << 4; mComposerAttributeTable->setDisplayAttributes( attributes ); + Q_NOWARN_DEPRECATED_PUSH QSet evaluated = mComposerAttributeTable->displayAttributes(); + Q_NOWARN_DEPRECATED_POP QCOMPARE( evaluated, attributes ); @@ -363,7 +369,9 @@ void TestQgsComposerTable::attributeTableAlias() fieldAliasMap.insert( 0, QString( "alias 0" ) ); fieldAliasMap.insert( 3, QString( "alias 3" ) ); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setFieldAliasMap( fieldAliasMap ); + Q_NOWARN_DEPRECATED_POP QStringList expectedHeaders; expectedHeaders << "alias 0" << "Heading" << "Importance" << "alias 3" << "Cabin Crew" << "Staff"; @@ -381,7 +389,9 @@ void TestQgsComposerTable::attributeTableAlias() } fieldAliasMap.clear(); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setFieldAliasMap( fieldAliasMap ); + Q_NOWARN_DEPRECATED_POP } void TestQgsComposerTable::attributeTableGetAlias() @@ -395,7 +405,9 @@ void TestQgsComposerTable::attributeTableGetAlias() fieldAliasMap.insert( 1, QString( "alias 1" ) ); fieldAliasMap.insert( 2, QString( "alias 2" ) ); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setFieldAliasMap( fieldAliasMap ); + Q_NOWARN_DEPRECATED_POP QMap expectedAliases; expectedAliases.insert( 1, QString( "alias 1" ) ); @@ -403,7 +415,9 @@ void TestQgsComposerTable::attributeTableGetAlias() expectedAliases.insert( 4, QString( "Cabin Crew" ) ); //get header labels and compare + Q_NOWARN_DEPRECATED_PUSH QMap aliasMap = mComposerAttributeTable->fieldAliasMap(); + Q_NOWARN_DEPRECATED_POP QMap::const_iterator aliasIt = aliasMap.constBegin(); QString expected; QString evaluated; @@ -415,7 +429,9 @@ void TestQgsComposerTable::attributeTableGetAlias() } fieldAliasMap.clear(); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setFieldAliasMap( fieldAliasMap ); + Q_NOWARN_DEPRECATED_POP attributes.clear(); mComposerAttributeTable->setDisplayAttributes( attributes ); } @@ -427,7 +443,9 @@ void TestQgsComposerTable::attributeTableSort() sort.append( qMakePair( 0, true ) ); sort.append( qMakePair( 1, false ) ); sort.append( qMakePair( 3, true ) ); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setSortAttributes( sort ); + Q_NOWARN_DEPRECATED_POP mComposerAttributeTable->setMaximumNumberOfFeatures( 5 ); QList expectedRows; @@ -451,7 +469,9 @@ void TestQgsComposerTable::attributeTableSort() compareTable( expectedRows ); sort.clear(); + Q_NOWARN_DEPRECATED_PUSH mComposerAttributeTable->setSortAttributes( sort ); + Q_NOWARN_DEPRECATED_POP } void TestQgsComposerTable::attributeTableVisibleOnly() diff --git a/tests/src/gui/testqgsmapcanvas.cpp b/tests/src/gui/testqgsmapcanvas.cpp index 35226fa8f9d3..2952f343792b 100644 --- a/tests/src/gui/testqgsmapcanvas.cpp +++ b/tests/src/gui/testqgsmapcanvas.cpp @@ -33,7 +33,9 @@ void TestQgsMapCanvas::cleanupTestCase() void TestQgsMapCanvas::testMapRendererInteraction() { + Q_NOWARN_DEPRECATED_PUSH QgsMapRenderer* mr = mCanvas->mapRenderer(); + Q_NOWARN_DEPRECATED_POP // CRS transforms