Use const ref

This commit is contained in:
Montel Laurent 2011-04-03 15:29:54 +02:00
parent cb3424f3cb
commit 9a07bb2f93
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ QObject *DataModel::dataSource() const
return m_dataSource; return m_dataSource;
} }
void DataModel::setKeyRoleFilter(const QString key) void DataModel::setKeyRoleFilter(const QString& key)
{ {
if (m_keyRoleFilter == key) { if (m_keyRoleFilter == key) {
return; return;

View File

@ -96,7 +96,7 @@ public:
void setDataSource(QObject *source); void setDataSource(QObject *source);
QObject *dataSource() const; QObject *dataSource() const;
void setKeyRoleFilter(const QString key); void setKeyRoleFilter(const QString& key);
QString keyRoleFilter() const; QString keyRoleFilter() const;
int roleNameToId(const QString &name); int roleNameToId(const QString &name);