summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2011-01-18 09:13:44 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2011-01-19 06:05:05 (GMT)
commit1f54c358fcc3eb53dc0cf689f59e2e6913dcf239 (patch)
tree81d3832ea9b166ae9e6a1247f2cb46594d4aa43d /src/declarative
parenteead12e91799c766dd3913687156a37f245ee20e (diff)
downloadQt-1f54c358fcc3eb53dc0cf689f59e2e6913dcf239.zip
Qt-1f54c358fcc3eb53dc0cf689f59e2e6913dcf239.tar.gz
Qt-1f54c358fcc3eb53dc0cf689f59e2e6913dcf239.tar.bz2
Change Qt.application.layoutDirection from bool to correct type of Qt::LayoutDirection
Task-number: QTBUG-16424 Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/util/qdeclarativeapplication.cpp13
-rw-r--r--src/declarative/util/qdeclarativeapplication_p.h4
2 files changed, 13 insertions, 4 deletions
diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp
index 7559aa9..7ecce1e 100644
--- a/src/declarative/util/qdeclarativeapplication.cpp
+++ b/src/declarative/util/qdeclarativeapplication.cpp
@@ -103,7 +103,7 @@ bool QDeclarativeApplication::active() const
}
/*!
- \qmlproperty bool Application::layoutDirection
+ \qmlproperty enumeration Application::layoutDirection
This property can be used to query the default layout direction of the
application. On system start-up, the default layout direction depends on the
@@ -113,8 +113,17 @@ bool QDeclarativeApplication::active() const
property to customize your application layouts to support both layout
directions. This property is readonly.
+ Possible values are:
+
+ \list
+ \o Qt.LeftToRight - Text and graphics elements should be positioned
+ from left to right.
+ \o Qt.RightToLeft - Text and graphics elements should be positioned
+ from right to left.
+ \endlist
+
*/
-bool QDeclarativeApplication::layoutDirection() const
+Qt::LayoutDirection QDeclarativeApplication::layoutDirection() const
{
Q_D(const QDeclarativeApplication);
return d->layoutDirection;
diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h
index c5cd227..caaed18 100644
--- a/src/declarative/util/qdeclarativeapplication_p.h
+++ b/src/declarative/util/qdeclarativeapplication_p.h
@@ -57,13 +57,13 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject
{
Q_OBJECT
Q_PROPERTY(bool active READ active NOTIFY activeChanged)
- Q_PROPERTY(bool layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged)
+ Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged)
public:
explicit QDeclarativeApplication(QObject *parent = 0);
virtual ~QDeclarativeApplication();
bool active() const;
- bool layoutDirection() const;
+ Qt::LayoutDirection layoutDirection() const;
protected:
bool eventFilter(QObject *obj, QEvent *event);