only instantiate variable when required
authorMaurice Kalinowski <maurice.kalinowski@digia.com>
Wed, 13 Feb 2013 09:02:54 +0000 (10:02 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 13 Feb 2013 09:41:11 +0000 (10:41 +0100)
variable is only used for debugging purposes, where debugging part
is inside preprocessor check. Creation of the object should be there
as well.

Change-Id: I6c9e842ad05d8e45f6d67f5e5dedebc896cda157
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp

index 1642f7f..448ec55 100644 (file)
@@ -135,8 +135,8 @@ QSGDefaultRenderer::QSGDefaultRenderer(QSGContext *context)
     , m_render_node_added(false)
     , m_currentRenderOrder(1)
 {
-    QStringList args = qApp->arguments();
 #if defined(QML_RUNTIME_TESTING)
+    QStringList args = qApp->arguments();
     m_render_opaque_nodes = !args.contains(QLatin1String("--no-opaque-nodes"));
     m_render_alpha_nodes = !args.contains(QLatin1String("--no-alpha-nodes"));
 #endif