From 2e582bf83d04f8eedf36c2bd910055b75ff5a827 Mon Sep 17 00:00:00 2001
From: Alessandro Portale <alessandro.portale@nokia.com>
Date: Tue, 10 Nov 2009 14:27:24 +0100
Subject: Removed unused public Api from QS60Style

QS60Style::setStyleProperty() and QS60Style::styleProperty() were
intended as generic property setter/getters, but are not needed
anymore.

Reviewed-by: Sami Merila

	modified:   src/gui/styles/qs60style.cpp
	modified:   src/gui/styles/qs60style.h
	modified:   src/gui/styles/qs60style_p.h
	modified:   src/gui/styles/qs60style_s60.cpp
	modified:   src/gui/styles/qs60style_simulated.cpp
	modified:   src/s60installs/eabi/QtGuiu.def
---
 src/gui/styles/qs60style.cpp           | 44 ----------------------------------
 src/gui/styles/qs60style.h             |  4 ----
 src/gui/styles/qs60style_p.h           |  8 -------
 src/gui/styles/qs60style_s60.cpp       | 17 -------------
 src/gui/styles/qs60style_simulated.cpp | 10 --------
 src/s60installs/eabi/QtGuiu.def        |  4 ++--
 6 files changed, 2 insertions(+), 85 deletions(-)

diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index b5e92c7..02ffb29 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -301,32 +301,6 @@ short QS60StylePrivate::pixelMetric(int metric)
     return returnValue;
 }
 
-void QS60StylePrivate::setStyleProperty(const char *name, const QVariant &value)
-{
-    if (name == propertyKeyCurrentlayout) {
-        static const QStringList layouts = styleProperty(propertyKeyLayouts).toStringList();
-        const QString layout = value.toString();
-        Q_ASSERT(layouts.contains(layout));
-        const int layoutIndex = layouts.indexOf(layout);
-        setCurrentLayout(layoutIndex);
-        QApplication::setLayoutDirection(m_layoutHeaders[layoutIndex].mirroring ? Qt::RightToLeft : Qt::LeftToRight);
-        clearCaches();
-        refreshUI();
-    }
-}
-
-QVariant QS60StylePrivate::styleProperty(const char *name) const
-{
-    if (name == propertyKeyLayouts) {
-        static QStringList layouts;
-        if (layouts.isEmpty())
-            for (int i = 0; i < m_numberOfLayouts; i++)
-                layouts.append(QLatin1String(m_layoutHeaders[i].layoutName));
-        return layouts;
-    }
-    return QVariant();
-}
-
 QColor QS60StylePrivate::stateColor(const QColor &color, const QStyleOption *option)
 {
     QColor retColor (color);
@@ -2873,24 +2847,6 @@ void QS60Style::unpolish(QApplication *application)
 }
 
 /*!
-  Sets the style property \a name to the \a value.
- */
-void QS60Style::setStyleProperty(const char *name, const QVariant &value)
-{
-    Q_D(QS60Style);
-    d->setStyleProperty_specific(name, value);
-}
-
-/*!
-  Returns the value of style property \a name.
- */
-QVariant QS60Style::styleProperty(const char *name) const
-{
-    Q_D(const QS60Style);
-    return d->styleProperty_specific(name);
-}
-
-/*!
   \reimp
  */
 bool QS60Style::event(QEvent *e)
diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h
index ab10792..885ea40 100644
--- a/src/gui/styles/qs60style.h
+++ b/src/gui/styles/qs60style.h
@@ -79,10 +79,6 @@ public:
 #ifndef Q_NO_USING_KEYWORD
     using QCommonStyle::polish;
 #endif
-
-    void setStyleProperty(const char *name, const QVariant &value);
-    QVariant styleProperty(const char *name) const;
-
     bool event(QEvent *e);
 
 #ifndef Q_WS_S60
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 46547bf..b9789b9 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -388,14 +388,6 @@ public:
     // draws a specific skin part
     static void drawSkinPart(QS60StyleEnums::SkinParts part, QPainter *painter,
         const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags);
-    // sets style property
-    void setStyleProperty(const char *name, const QVariant &value);
-    // sets specific style property
-    void setStyleProperty_specific(const char *name, const QVariant &value);
-    // gets style property
-    QVariant styleProperty(const char *name) const;
-    // gets specific style property
-    QVariant styleProperty_specific(const char *name) const;
     // gets pixel metrics value
     static short pixelMetric(int metric);
     // gets color. 'index' is NOT 0-based.
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index c2a207c..b5f2d1c 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -1014,23 +1014,6 @@ QS60StylePrivate::QS60StylePrivate()
     setActiveLayout();
 }
 
-void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value)
-{
-    if (QLatin1String(name) == QLatin1String("foo")) {
-        // BaR
-    } else {
-        setStyleProperty(name, value);
-    }
-}
-
-QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
-{
-    if (QLatin1String(name) == QLatin1String("foo"))
-        return QLatin1String("Bar");
-    else
-        return styleProperty(name);
-}
-
 QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list,
     int index, const QStyleOption *option)
 {
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 706b4e9..4317483 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -308,16 +308,6 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size,
     return result;
 }
 
-void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value)
-{
-    setStyleProperty(name, value);
-}
-
-QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
-{
-    return styleProperty(name);
-}
-
 QPixmap QS60StylePrivate::backgroundTexture()
 {
     if (!m_background) {
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 5d66fb7..3a46700 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -7006,7 +7006,7 @@ EXPORTS
 	_ZN9QPolygonFC2ERK8QPolygon @ 7005 NONAME
 	_ZN9QS60Style11qt_metacallEN11QMetaObject4CallEiPPv @ 7006 NONAME
 	_ZN9QS60Style11qt_metacastEPKc @ 7007 NONAME
-	_ZN9QS60Style16setStylePropertyEPKcRK8QVariant @ 7008 NONAME
+	_ZN9QS60Style16setStylePropertyEPKcRK8QVariant @ 7008 NONAME ABSENT
 	_ZN9QS60Style16staticMetaObjectE @ 7009 NONAME DATA 16
 	_ZN9QS60Style19getStaticMetaObjectEv @ 7010 NONAME
 	_ZN9QS60Style5eventEP6QEvent @ 7011 NONAME
@@ -10445,7 +10445,7 @@ EXPORTS
 	_ZNK9QS60Style11drawControlEN6QStyle14ControlElementEPK12QStyleOptionP8QPainterPK7QWidget @ 10444 NONAME
 	_ZNK9QS60Style11pixelMetricEN6QStyle11PixelMetricEPK12QStyleOptionPK7QWidget @ 10445 NONAME
 	_ZNK9QS60Style13drawPrimitiveEN6QStyle16PrimitiveElementEPK12QStyleOptionP8QPainterPK7QWidget @ 10446 NONAME
-	_ZNK9QS60Style13stylePropertyEPKc @ 10447 NONAME
+	_ZNK9QS60Style13stylePropertyEPKc @ 10447 NONAME ABSENT
 	_ZNK9QS60Style14subControlRectEN6QStyle14ComplexControlEPK19QStyleOptionComplexNS0_10SubControlEPK7QWidget @ 10448 NONAME
 	_ZNK9QS60Style14subElementRectEN6QStyle10SubElementEPK12QStyleOptionPK7QWidget @ 10449 NONAME
 	_ZNK9QS60Style16sizeFromContentsEN6QStyle12ContentsTypeEPK12QStyleOptionRK5QSizePK7QWidget @ 10450 NONAME
-- 
cgit v0.12

