aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qdeclarativedebugservice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/debugger/qdeclarativedebugservice.cpp')
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index 0a997aa2fe..2bdcf2ff92 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -61,10 +61,7 @@ QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, QObject
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,
@@ -87,7 +84,12 @@ QDeclarativeDebugService::Status QDeclarativeDebugService::registerService()
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();
}