Commit 6fee6824 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Pass QHash<QString,QVariant> as const ref argument

parent a111b7ee
......@@ -563,7 +563,7 @@ bool AbstractDataPluginModel::itemExists( const QString& id ) const
return findItem( id );
}
void AbstractDataPluginModel::setItemSettings( QHash<QString,QVariant> itemSettings )
void AbstractDataPluginModel::setItemSettings(const QHash<QString, QVariant> &itemSettings)
{
d->m_itemSettings = itemSettings;
}
......
......@@ -75,7 +75,7 @@ class MARBLE_EXPORT AbstractDataPluginModel : public QObject
* Sets the settings for all items before painting. This ensures that all items react on
* changed settings.
*/
void setItemSettings( QHash<QString,QVariant> itemSettings );
void setItemSettings(const QHash<QString, QVariant> &itemSettings);
virtual void setFavoriteItems( const QStringList& list );
QStringList favoriteItems() const;
......
......@@ -96,7 +96,7 @@ QHash<QString,QVariant> OpenCachingPlugin::settings() const
return m_settings;
}
void OpenCachingPlugin::setSettings( QHash<QString,QVariant> settings )
void OpenCachingPlugin::setSettings(const QHash<QString, QVariant> &settings)
{
if ( !settings.contains( "numResults" ) ) {
settings.insert( "numResults", numberOfItemsOnScreen );
......
......@@ -51,7 +51,7 @@ void SatellitesConfigAbstractItem::setParent( SatellitesConfigAbstractItem *pare
m_parent = parent;
}
void SatellitesConfigAbstractItem::loadSettings( QHash<QString, QVariant> settings )
void SatellitesConfigAbstractItem::loadSettings(const QHash<QString, QVariant> &settings)
{
Q_UNUSED( settings );
}
......
......@@ -37,7 +37,7 @@ public:
SatellitesConfigAbstractItem *parent() const;
void setParent( SatellitesConfigAbstractItem *parent );
virtual void loadSettings( QHash<QString, QVariant> settings );
virtual void loadSettings(const QHash<QString, QVariant> &settings);
virtual QVariant data( int column, int role ) const;
virtual bool setData( int column, int role, const QVariant &data );
......
......@@ -27,7 +27,7 @@ SatellitesConfigLeafItem::~SatellitesConfigLeafItem()
{
}
void SatellitesConfigLeafItem::loadSettings( QHash<QString, QVariant> settings )
void SatellitesConfigLeafItem::loadSettings(const QHash<QString, QVariant> &settings)
{
QStringList idList = settings.value( "idList" ).toStringList();
m_isChecked = idList.contains( m_id );
......
......@@ -23,7 +23,7 @@ public:
const QString &id );
~SatellitesConfigLeafItem();
void loadSettings( QHash<QString, QVariant> settings );
void loadSettings(const QHash<QString, QVariant> &settings) override;
QVariant data( int column, int role ) const;
bool setData(int column, int role, const QVariant& data);
......
......@@ -45,7 +45,7 @@ QStringList SatellitesConfigModel::urlList() const
.toStringList();
}
void SatellitesConfigModel::loadSettings( QHash<QString, QVariant> settings)
void SatellitesConfigModel::loadSettings(const QHash<QString, QVariant> &settings)
{
m_rootItem->loadSettings( settings );
}
......
......@@ -24,7 +24,7 @@ public:
explicit SatellitesConfigModel( QObject *parent = 0 );
~SatellitesConfigModel();
void loadSettings( QHash<QString, QVariant> settings );
void loadSettings(const QHash<QString, QVariant> &settings);
void appendChild( SatellitesConfigAbstractItem *child );
void clear();
......
......@@ -27,7 +27,7 @@ SatellitesConfigNodeItem::~SatellitesConfigNodeItem()
{
}
void SatellitesConfigNodeItem::loadSettings(QHash< QString, QVariant > settings)
void SatellitesConfigNodeItem::loadSettings(const QHash<QString, QVariant> &settings)
{
foreach( SatellitesConfigAbstractItem *item, m_children ) {
item->loadSettings( settings );
......
......@@ -23,7 +23,7 @@ public:
explicit SatellitesConfigNodeItem( const QString &name );
~SatellitesConfigNodeItem();
void loadSettings( QHash<QString, QVariant> settings );
void loadSettings(const QHash<QString, QVariant> &settings) override;
QVariant data( int column, int role ) const;
bool setData(int column, int role, const QVariant& data);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment