diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-07 01:14:06 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-07 01:14:06 (GMT) |
commit | 14466ace2ffe1b6707b1120ab76d0baa49635007 (patch) | |
tree | 1bc0ac698049219ff1f8b25c1b071afbe2819af7 /src/declarative | |
parent | 844a1c12dfcd9c78b9647993c4dac573fb5ecd44 (diff) | |
parent | aef0f96295cefdaa6e8e799733892aa00987226c (diff) | |
download | Qt-14466ace2ffe1b6707b1120ab76d0baa49635007.zip Qt-14466ace2ffe1b6707b1120ab76d0baa49635007.tar.gz Qt-14466ace2ffe1b6707b1120ab76d0baa49635007.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/fx/qfxlayoutitem.cpp | 3 | ||||
-rw-r--r-- | src/declarative/fx/qfxscalegrid.cpp | 6 | ||||
-rw-r--r-- | src/declarative/fx/qfxscalegrid_p.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/fx/qfxlayoutitem.cpp b/src/declarative/fx/qfxlayoutitem.cpp index 446a8d7..1f814e8 100644 --- a/src/declarative/fx/qfxlayoutitem.cpp +++ b/src/declarative/fx/qfxlayoutitem.cpp @@ -78,7 +78,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,LayoutItem,QFxLayoutItem) */ QFxLayoutItem::QFxLayoutItem(QFxItem* parent) - : QFxItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_preferredSize(100,100), m_minimumSize(0,0) + : QFxItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_minimumSize(0,0), m_preferredSize(100,100) { setGraphicsItem(this); } @@ -93,6 +93,7 @@ void QFxLayoutItem::setGeometry(const QRectF & rect) QSizeF QFxLayoutItem::sizeHint(Qt::SizeHint w, const QSizeF &constraint) const { + Q_UNUSED(constraint); if(w == Qt::MinimumSize){ return m_minimumSize; }else if(w == Qt::MaximumSize){ diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/fx/qfxscalegrid.cpp index 198ac6d..8eb9890 100644 --- a/src/declarative/fx/qfxscalegrid.cpp +++ b/src/declarative/fx/qfxscalegrid.cpp @@ -41,6 +41,7 @@ #include <QBuffer> #include <qml.h> +#include <QDebug> #include "qfxscalegrid_p.h" @@ -202,7 +203,7 @@ QFxGridScaledImage::QFxGridScaledImage(QIODevice *data) _pix = imgFile; } -QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s) const +QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s) { if (s == QLatin1String("Stretch")) return QFxScaleGrid::Stretch; @@ -210,6 +211,9 @@ QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s) const return QFxScaleGrid::Repeat; if (s == QLatin1String("Round")) return QFxScaleGrid::Round; + + qWarning() << "Unknown tile rule specified. Using Stretch"; + return QFxScaleGrid::Stretch; } bool QFxGridScaledImage::isValid() const diff --git a/src/declarative/fx/qfxscalegrid_p.h b/src/declarative/fx/qfxscalegrid_p.h index a8df3c1..483ade1 100644 --- a/src/declarative/fx/qfxscalegrid_p.h +++ b/src/declarative/fx/qfxscalegrid_p.h @@ -119,7 +119,7 @@ public: QString pixmapUrl() const; private: - QFxScaleGrid::TileRule stringToRule(const QString &) const; + static QFxScaleGrid::TileRule stringToRule(const QString &); private: int _l; |