kioslave: use constant reference as argument type for DeviceCache::contains()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-07-13 20:41:58 +03:00
parent 6220968ad6
commit b36ba5774e
3 changed files with 3 additions and 4 deletions

View file

@ -217,7 +217,7 @@ QHash<QString, CachedDevice*> DeviceCache::getAll()
return nameCache;
}
bool DeviceCache::contains(QString string, bool isUdi)
bool DeviceCache::contains(const QString& string, bool isUdi)
{
processEvents();

View file

@ -84,8 +84,8 @@ private slots:
public:
QHash< QString, CachedDevice* > getAll();
CachedDevice* get ( const QString& string, bool isUdi = false );
bool contains(QString string, bool isUdi = false);
CachedDevice* get(const QString& string, bool isUdi = false);
bool contains(const QString& string, bool isUdi = false);
int size();
};

View file

@ -437,7 +437,6 @@ void MTPSlave::mimetype(const KUrl& url)
}
} else {
error(ERR_DOES_NOT_EXIST, url.path());
return;
}
}