From 5280e866f76e38f2bf1c226ff896b4649194eec4 Mon Sep 17 00:00:00 2001
From: Ulf Hermann <ulf.hermann@digia.com>
Date: Wed, 5 Nov 2014 14:02:55 +0100
Subject: [PATCH] Mark cleanup function as unused if compiled with
 QT_QML_NO_DEBUGGER

The static cleanup function in qqmldebugserver.cpp is only used if the
debug server is actually created. If not we can mark it as unused to
avoid compile warnings. Enclosing it in #ifdef would be uglier.

Task-number: QTBUG-42394
Change-Id: Ieb7fa38ecb346e80ce815ced85eb3a168bad9d99
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
---
 src/qml/debugger/qqmldebugserver.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp
index 59ac548fa8..2a2ce663bc 100644
--- a/src/qml/debugger/qqmldebugserver.cpp
+++ b/src/qml/debugger/qqmldebugserver.cpp
@@ -419,6 +419,7 @@ QQmlDebugServer::QQmlDebugServer()
         }
     }
 #else
+    Q_UNUSED(&cleanup)
     if (!appD->qmljsDebugArgumentsString().isEmpty()) {
         qWarning() << QString(QLatin1String(
                      "QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
-- 
GitLab