Skip to content
Permalink
Browse files

Flip some easy QLists to QVectors

  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent a463acb commit 3837ddfd3d45eb946142161bcd5731838e41e33f
@@ -1345,7 +1345,7 @@ void QgisApp::dropEvent( QDropEvent *event )
timer->setInterval( 50 );

// first, allow custom handlers to directly operate on the mime data
const QList<QPointer<QgsCustomDropHandler >> handlers = mCustomDropHandlers;
const QVector<QPointer<QgsCustomDropHandler >> handlers = mCustomDropHandlers;
for ( QgsCustomDropHandler *handler : handlers )
{
if ( handler )
@@ -1427,7 +1427,7 @@ void QgisApp::dropEvent( QDropEvent *event )
bool handled = false;

// give custom drop handlers first priority at handling the file
const QList<QPointer<QgsCustomDropHandler >>handlers = mCustomDropHandlers;
const QVector<QPointer<QgsCustomDropHandler >> handlers = mCustomDropHandlers;
for ( QgsCustomDropHandler *handler : handlers )
{
if ( handler && handler->handleFileDrop( file ) )
@@ -2053,7 +2053,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QList<QgsMapLayerConfigWidgetFactory *> mMapLayerPanelFactories;
QList<QPointer<QgsOptionsWidgetFactory>> mOptionsWidgetFactories;

QList<QPointer<QgsCustomDropHandler>> mCustomDropHandlers;
QVector<QPointer<QgsCustomDropHandler>> mCustomDropHandlers;

QDateTime mProjectLastModified;

@@ -88,9 +88,9 @@ class CORE_EXPORT QgsDataDefinedSizeLegend
QgsSizeScaleTransformer *sizeScaleTransformer() const;

//! Sets list of classes: each class is a pair of symbol size (in units used by the symbol) and label
void setClasses( const QList<QgsDataDefinedSizeLegend::SizeClass> &classes ) { mSizeClasses = classes; }
void setClasses( const QList< QgsDataDefinedSizeLegend::SizeClass > &classes ) { mSizeClasses = classes; }
//! Returns list of classes: each class is a pair of symbol size (in units used by the symbol) and label
QList<QgsDataDefinedSizeLegend::SizeClass> classes() const { return mSizeClasses; }
QList< QgsDataDefinedSizeLegend::SizeClass > classes() const { return mSizeClasses; }

//! Sets title label for data-defined size legend
void setTitle( const QString &title ) { mTitleLabel = title; }
@@ -142,7 +142,7 @@ class CORE_EXPORT QgsDataDefinedSizeLegend
private:
LegendType mType = LegendSeparated;
QString mTitleLabel; //!< Title label for the following size-based item(s)
QList<SizeClass> mSizeClasses; //!< List of classes: symbol size (in whatever units symbol uses) + label
QList< SizeClass > mSizeClasses; //!< List of classes: symbol size (in whatever units symbol uses) + label
std::unique_ptr<QgsMarkerSymbol> mSymbol;
std::unique_ptr<QgsSizeScaleTransformer> mSizeScaleTransformer; //!< Optional transformer for classes
VerticalAlignment mVAlign = AlignBottom;
@@ -1390,7 +1390,7 @@ void QgsGraduatedSymbolRenderer::addClass( double lower, double upper )

void QgsGraduatedSymbolRenderer::addBreak( double breakValue, bool updateSymbols )
{
QMutableListIterator< QgsRendererRange > it( mRanges );
QMutableVectorIterator< QgsRendererRange > it( mRanges );
while ( it.hasNext() )
{
QgsRendererRange range = it.next();
@@ -78,7 +78,7 @@ class CORE_EXPORT QgsRendererRange
void swap( QgsRendererRange &other );
};

typedef QList<QgsRendererRange> QgsRangeList;
typedef QVector<QgsRendererRange> QgsRangeList;


/** \ingroup core

0 comments on commit 3837ddf

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