From 2f298c32e13419d8942fa3ed6b561fa8c0cde24b Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 7 Aug 2009 10:02:41 +1000 Subject: Should be static --- src/declarative/fx/qfxscalegrid.cpp | 11 ++++++++--- src/declarative/fx/qfxscalegrid_p.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/fx/qfxscalegrid.cpp index 198ac6d..6ea909d 100644 --- a/src/declarative/fx/qfxscalegrid.cpp +++ b/src/declarative/fx/qfxscalegrid.cpp @@ -41,6 +41,7 @@ #include #include +#include #include "qfxscalegrid_p.h" @@ -202,14 +203,18 @@ 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; - if (s == QLatin1String("Repeat")) + else if (s == QLatin1String("Repeat")) return QFxScaleGrid::Repeat; - if (s == QLatin1String("Round")) + else if (s == QLatin1String("Round")) return QFxScaleGrid::Round; + else { + qWarning() << "TileRule not supported:" << s; + 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; -- cgit v0.12