Made a QString const refrence.
This commit is contained in:
parent
47c78427cb
commit
6248f03256
2 changed files with 4 additions and 6 deletions
|
@ -142,9 +142,8 @@ void Daemon::forceOnNetworkChange()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// I hate this, but not able to find an alternative now
|
Device*Daemon::getDevice(const QString& deviceId)
|
||||||
Device *Daemon::getDevice(QString deviceId) {
|
{
|
||||||
|
|
||||||
Q_FOREACH (Device* device, d->mDevices) {
|
Q_FOREACH (Device* device, d->mDevices) {
|
||||||
if (device->id() == deviceId) {
|
if (device->id() == deviceId) {
|
||||||
return device;
|
return device;
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
virtual void reportError(const QString &title, const QString &description) = 0;
|
virtual void reportError(const QString &title, const QString &description) = 0;
|
||||||
virtual QNetworkAccessManager* networkAccessManager();
|
virtual QNetworkAccessManager* networkAccessManager();
|
||||||
|
|
||||||
|
Device* getDevice(const QString& deviceId);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
Q_SCRIPTABLE void acquireDiscoveryMode(const QString &id);
|
Q_SCRIPTABLE void acquireDiscoveryMode(const QString &id);
|
||||||
Q_SCRIPTABLE void releaseDiscoveryMode(const QString &id);
|
Q_SCRIPTABLE void releaseDiscoveryMode(const QString &id);
|
||||||
|
@ -87,9 +89,6 @@ private:
|
||||||
void cleanDevices();
|
void cleanDevices();
|
||||||
|
|
||||||
QScopedPointer<struct DaemonPrivate> d;
|
QScopedPointer<struct DaemonPrivate> d;
|
||||||
|
|
||||||
public:
|
|
||||||
Device* getDevice(QString deviceId);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue