From a0173a8b3b972ecf098515cda58b9c6d6f9486eb Mon Sep 17 00:00:00 2001
From: Caroline Chao <caroline.chao@digia.com>
Date: Fri, 3 May 2013 10:27:58 +0200
Subject: [PATCH] Fix warning unused variable 'menu'

"warning: unused variable 'menu' [-Wunused-variable]"

Change-Id: Ie7cab810475a575f9ffa375380cf62d67c0bc836
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
---
 src/private/qquickstyleitem.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/private/qquickstyleitem.cpp b/src/private/qquickstyleitem.cpp
index f308e494d..59c9eaac1 100644
--- a/src/private/qquickstyleitem.cpp
+++ b/src/private/qquickstyleitem.cpp
@@ -199,7 +199,8 @@ void QQuickStyleItem::initStyleOption()
         const QFont *font = QGuiApplicationPrivate::platformTheme()->font(platformFont);
         if (font)
             opt->fontMetrics = QFontMetrics(*font);
-        if (QObject * menu = m_properties["menu"].value<QObject *>()) {
+        QObject * menu = m_properties["menu"].value<QObject *>();
+        if (menu) {
             opt->features |= QStyleOptionButton::HasMenu;
 #ifdef Q_OS_MAC
             if (style() == "mac") {
-- 
GitLab