Query for serviceNames in registerService.
Change-Id: I570bd68c424cec696ca813a7fa1b485b64e328a4
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
d->server = QDeclarativeDebugServer::instance();
d->status = QDeclarativeDebugService::NotConnected;
- if (d->server->serviceNames().contains(d->name)) {
- qWarning() << "QDeclarativeDebugService: Conflicting plugin name" << d->name;
- d->server = 0;
- }
+
}
QDeclarativeDebugService::QDeclarativeDebugService(QDeclarativeDebugServicePrivate &dd,
if (!d->server)
return NotConnected;
- d->server->addService(this);
+ if (d->server->serviceNames().contains(d->name)) {
+ qWarning() << "QDeclarativeDebugService: Conflicting plugin name" << d->name;
+ d->server = 0;
+ } else {
+ d->server->addService(this);
+ }
return status();
}