This mirrors the behavior of the QQmlDebugServer constructor.
Unfortunately we have two #defines to disable the debug server,
QT_QML_NO_DEBUGGER and QQML_NO_DEBUG_PROTOCOL. We should honor both of
them as people might rely on either of them to effectively prevent the
debug server from working.
Change-Id: I0bc0d48632eaa05c471d0afed6fc48436116746a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
bool QQmlDebugServer::enable(int portFrom, int portTo, bool block, const QString &hostAddress)
{
+#ifndef QT_QML_NO_DEBUGGER
QQmlDebugServerInstanceWrapper *wrapper = debugServerInstance();
if (!wrapper)
return false;
return false;
}
return true;
+#else
+ Q_UNUSED(portFrom);
+ Q_UNUSED(portTo);
+ Q_UNUSED(block);
+ Q_UNUSED(hostAddress);
+ return false;
+#endif
}
void QQmlDebugServer::wakeEngine(QQmlEngine *engine)