diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-13 16:13:00 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-29 14:35:54 +0000 |
commit | db90054b186317da4e363c64207c0156d9d73da5 (patch) | |
tree | 3c9c7fd5d58ace0bb5e03e7fb67dae8661e08902 /src/qml/qml/v8/qqmlbuiltinfunctions.cpp | |
parent | 3f3de3b9b762ecc2799a3575b97a2b172fcbc79a (diff) |
Remove static proxy methods from QQmlDebugService
They all internally map to one-liners and just add to binary size and
complexity. Especially, the most used one, isDebuggingEnabled(), simply
checks if there is a QQmlDebugServer::instance().
Change-Id: Ib269928e08506894d933f6696e34ff0d3acb048b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/v8/qqmlbuiltinfunctions.cpp')
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index aff6de7f5e..26dd104753 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -42,6 +42,7 @@ #include <QFileInfo> #include <private/qqmlprofilerservice_p.h> +#include <private/qqmldebugserver_p.h> #include <private/qqmlglobal_p.h> #include <private/qqmlplatform_p.h> @@ -1447,7 +1448,7 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx) const QByteArray baSource = frame.source.toUtf8(); const QByteArray baFunction = frame.function.toUtf8(); QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); - if (!QQmlDebugService::isDebuggingEnabled()) { + if (!QQmlDebugServer::instance()) { logger.warning("Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX."); } else { QQmlProfilerService::instance()->startProfiling(v4->qmlEngine()); @@ -1466,7 +1467,7 @@ QV4::ReturnedValue ConsoleObject::method_profileEnd(CallContext *ctx) const QByteArray baFunction = frame.function.toUtf8(); QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); - if (!QQmlDebugService::isDebuggingEnabled()) { + if (!QQmlDebugServer::instance()) { logger.warning("Ignoring console.profileEnd(): the debug service is disabled."); } else { QQmlProfilerService::instance()->stopProfiling(v4->qmlEngine()); |