diff options
author | abcd <amos.choy@nokia.com> | 2011-11-04 12:07:04 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-04 04:05:24 +0100 |
commit | 0813d9df572f7b2b6bee81a28276b5a569712bdb (patch) | |
tree | 5923f54da9169a749bbbf05fdd9f0c3f8dcd730f /src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp | |
parent | 89c7335216f0bd28aade700a0fe0fb4daa1b57b3 (diff) |
Rename Review::content and Editorial::content to ::text
There already exists a content object so ::content() it is
not appropriate. ::description() is unintuitive.
::text() is more natural. Note that the text could either be plain
text or rich text.
QLabel and QTextEdit have a setText() function and the text format
is automatically detected. This makes using ::text() a natural fit.
Change-Id: I77719202d0b210ae75a91d6867c3411c9c5ec51c
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp')
-rw-r--r-- | src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp index 3ecb3f52..2c06ba1d 100644 --- a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp +++ b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp @@ -72,9 +72,10 @@ QT_BEGIN_NAMESPACE \o datetime \o The date and time that the review was posted. \row - \o content + \o text \o string - \o The content of the review. + \o The text of the review. It can be either rich text or plain text + depending on the provider. \row \o language \o string @@ -133,7 +134,7 @@ QDeclarativeReviewModel::QDeclarativeReviewModel(QObject* parent) { QHash<int, QByteArray> roles = roleNames(); roles.insert(DateTimeRole, "dateTime"); - roles.insert(ContentRole, "content"); + roles.insert(TextRole, "text"); roles.insert(LanguageRole, "language"); roles.insert(RatingRole, "rating"); roles.insert(ReviewIdRole, "reviewId"); @@ -159,8 +160,8 @@ QVariant QDeclarativeReviewModel::data(const QModelIndex &index, int role) const switch (role) { case DateTimeRole: return review.dateTime(); - case ContentRole: - return review.content(); + case TextRole: + return review.text(); case LanguageRole: return review.language(); case RatingRole: |