diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-16 01:52:12 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-16 01:52:12 (GMT) |
commit | 24b0ad11174118e327a778bbdf16fa64a5eb640c (patch) | |
tree | cd5145da4b07ff51f240ec8d57f11a461ac0ab20 /src/declarative | |
parent | 84637da766fe1e3a4b4240601a6002f94f1b07c9 (diff) | |
parent | c9a868fecbe08f78c9fc5dc763a5ad178808ad77 (diff) | |
download | Qt-24b0ad11174118e327a778bbdf16fa64a5eb640c.zip Qt-24b0ad11174118e327a778bbdf16fa64a5eb640c.tar.gz Qt-24b0ad11174118e327a778bbdf16fa64a5eb640c.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/extra/qmlfolderlistmodel.cpp | 4 | ||||
-rw-r--r-- | src/declarative/util/qmlpalette.cpp | 10 | ||||
-rw-r--r-- | src/declarative/util/qmlpalette.h | 3 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/declarative/extra/qmlfolderlistmodel.cpp b/src/declarative/extra/qmlfolderlistmodel.cpp index acee5e1..4a71109 100644 --- a/src/declarative/extra/qmlfolderlistmodel.cpp +++ b/src/declarative/extra/qmlfolderlistmodel.cpp @@ -161,7 +161,9 @@ void QmlFolderListModel::classComplete() bool QmlFolderListModel::isFolder(int index) const { Q_D(const QmlFolderListModel); - return d->model.isDir(d->model.index(index, 0, d->folderIndex)); + if (index != -1) + return d->model.isDir(d->model.index(index, 0, d->folderIndex)); + return false; } void QmlFolderListModel::refresh() diff --git a/src/declarative/util/qmlpalette.cpp b/src/declarative/util/qmlpalette.cpp index eda0ded..40cfa71 100644 --- a/src/declarative/util/qmlpalette.cpp +++ b/src/declarative/util/qmlpalette.cpp @@ -151,6 +151,16 @@ QColor QmlPalette::highlightedText() const return d->palette.color(d->group, QPalette::HighlightedText); } +QColor QmlPalette::lighter(const QColor& color) const +{ + return color.lighter(); +} + +QColor QmlPalette::darker(const QColor& color) const +{ + return color.darker(); +} + void QmlPalette::setColorGroup(QPalette::ColorGroup colorGroup) { Q_D(QmlPalette); diff --git a/src/declarative/util/qmlpalette.h b/src/declarative/util/qmlpalette.h index 1401ad1..7f26f9a 100644 --- a/src/declarative/util/qmlpalette.h +++ b/src/declarative/util/qmlpalette.h @@ -101,6 +101,9 @@ public: bool virtual eventFilter(QObject *watched, QEvent *event); bool virtual event(QEvent *event); + Q_INVOKABLE QColor lighter(const QColor&) const; + Q_INVOKABLE QColor darker(const QColor&) const; + Q_SIGNALS: void paletteChanged(); }; |