diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2009-11-10 13:27:24 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2009-11-10 17:24:45 (GMT) |
commit | d752092080c4094bb4736108cff95a4b08abd750 (patch) | |
tree | f415a1a81249fb87b7d7c2b23de9d3b06fca4869 /src/gui/styles | |
parent | 744f74c9f401734eb84ddba4751e5a54e0efffc8 (diff) | |
download | Qt-d752092080c4094bb4736108cff95a4b08abd750.zip Qt-d752092080c4094bb4736108cff95a4b08abd750.tar.gz Qt-d752092080c4094bb4736108cff95a4b08abd750.tar.bz2 |
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
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 44 | ||||
-rw-r--r-- | src/gui/styles/qs60style.h | 4 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 8 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 17 | ||||
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 10 |
5 files changed, 0 insertions, 83 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) { |