summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-07 00:02:41 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-07 00:02:41 (GMT)
commit2f298c32e13419d8942fa3ed6b561fa8c0cde24b (patch)
tree7e355d8edcf7824b0b095cacdb79b9deb55079e3 /src/declarative/fx
parentf0ec53447574e7d4bf2db426d9409e918f5acd69 (diff)
downloadQt-2f298c32e13419d8942fa3ed6b561fa8c0cde24b.zip
Qt-2f298c32e13419d8942fa3ed6b561fa8c0cde24b.tar.gz
Qt-2f298c32e13419d8942fa3ed6b561fa8c0cde24b.tar.bz2
Should be static
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxscalegrid.cpp11
-rw-r--r--src/declarative/fx/qfxscalegrid_p.h2
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 <QBuffer>
#include <qml.h>
+#include <QDebug>
#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;