diff options
author | Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org> | 2012-07-04 10:56:15 -0300 |
---|---|---|
committer | Adriano Rezende <adriano.1.rezende@nokia.com> | 2012-07-05 13:52:34 +0200 |
commit | a12ac2d82202caced9aad0d999f2056b2d925ac6 (patch) | |
tree | 302f5a15e4640c8e46c07c664f644a1047af9efb | |
parent | bc6d25113bcc6549e08e99d5d386680dd13caff0 (diff) | |
download | qtquickcontrols-a12ac2d82202caced9aad0d999f2056b2d925ac6.tar.gz |
Removes implicitWidth and implicitHeight override from QQuickItem
These properties were added in QDeclarativeItem after QtQuick 1.1.
Now they can use the parent's value.
Change-Id: Iddacb1c25caead38be09b75fe5d198bd6ef6daff
Reviewed-by: Adriano Rezende <adriano.1.rezende@nokia.com>
-rw-r--r-- | src/qstyleitem.cpp | 15 | ||||
-rw-r--r-- | src/qstyleitem.h | 9 |
2 files changed, 1 insertions, 23 deletions
diff --git a/src/qstyleitem.cpp b/src/qstyleitem.cpp index 397ff3c1..2e022b9b 100644 --- a/src/qstyleitem.cpp +++ b/src/qstyleitem.cpp @@ -82,8 +82,6 @@ QStyleItem::QStyleItem(QQuickPaintedItem *parent) m_value(0), m_step(0), m_paintMargins(0), - m_implicitWidth(0), - m_implicitHeight(0), m_contentWidth(0), m_contentHeight(0) @@ -627,8 +625,7 @@ QSize QStyleItem::sizeFromContents(int width, int height) void QStyleItem::updateSizeHint() { QSize implicitSize = sizeFromContents(m_contentWidth, m_contentHeight); - m_implicitWidth = implicitSize.width(); - m_implicitHeight = implicitSize.height(); + setImplicitSize(implicitSize.width(), implicitSize.height()); } int QStyleItem::pixelMetric(const QString &metric) @@ -1249,16 +1246,6 @@ double QStyleItem::fontPointSize() return qApp->font().pointSizeF(); } -int QStyleItem::implicitHeight() -{ - return m_implicitHeight; -} - -int QStyleItem::implicitWidth() -{ - return m_implicitWidth; -} - bool QStyleItem::hasThemeIcon(const QString &icon) const { return QIcon::hasThemeIcon(icon); diff --git a/src/qstyleitem.h b/src/qstyleitem.h index 49d67de5..e3feba89 100644 --- a/src/qstyleitem.h +++ b/src/qstyleitem.h @@ -73,8 +73,6 @@ class QStyleItem: public QQuickPaintedItem Q_PROPERTY( int step READ step WRITE setStep NOTIFY stepChanged) Q_PROPERTY( int paintMargins READ paintMargins WRITE setPaintMargins NOTIFY paintMarginsChanged) - Q_PROPERTY( int implicitWidth READ implicitWidth() NOTIFY implicitWidthChanged) - Q_PROPERTY( int implicitHeight READ implicitHeight() NOTIFY implicitHeightChanged) Q_PROPERTY( int contentWidth READ contentWidth() WRITE setContentWidth NOTIFY contentWidthChanged) Q_PROPERTY( int contentHeight READ contentHeight() WRITE setContentHeight NOTIFY contentHeightChanged) @@ -172,8 +170,6 @@ public: QString fontFamily(); double fontPointSize(); - int implicitHeight(); - int implicitWidth(); int contentWidth() const { return m_contentWidth; @@ -232,9 +228,6 @@ Q_SIGNALS: void hintChanged(); void fontHeightChanged(); - void implicitHeightChanged(int arg); - void implicitWidthChanged(int arg); - void contentWidthChanged(int arg); void contentHeightChanged(int arg); @@ -268,8 +261,6 @@ protected: int m_step; int m_paintMargins; - int m_implicitWidth; - int m_implicitHeight; int m_contentWidth; int m_contentHeight; |